Skip to content

Instantly share code, notes, and snippets.

@bearcatsandor
Created January 12, 2017 01:41
Show Gist options
  • Save bearcatsandor/b4df4cd13b531c073f658b67a5aaab0a to your computer and use it in GitHub Desktop.
Save bearcatsandor/b4df4cd13b531c073f658b67a5aaab0a to your computer and use it in GitHub Desktop.
config
# config file based on https://gogs.sr.ht/SirCmpwn/dotfiles/src/master/bin/custom_statusbar
# setup base colors Base16-tomorow-night colors taken from https://github.com/khamer/base16-i3/blob/master/themes/base16-tomorrow-night.config
#
set $base00 #1d1f21
set $base01 #282a2e
set $base02 #373b41
set $base03 #969896
set $base04 #b4b7b4
set $base05 #c5c8c6
set $base06 #e0e0e0
set $base07 #ffffff
set $base08 #cc6666
set $base09 #de935f
set $base0A #f0c674
set $base0B #b5bd68
set $base0C #8abeb7
set $base0D #81a2be
set $base0E #b294bb
set $base0F #a3685a
new_window pixel 1
# Logo key on most keyboards
set $mod Mod4
font pango:DejaVu Sans Mono 9
# Meta key bindings
# Move window with mod+mouse drag
floating_modifier $mod
# Kill focused window with mod+shift+q
bindsym $mod+Shift+q kill
# Toggle fullscreen with mod+f
bindsym $mod+f fullscreen
bindsym $mod+Escape exec xkill
# change focus with mod+hjkl or mod+arrow
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+Mod1+h workspace prev_on_output
bindsym $mod+Mod1+l workspace next_on_output
bindsym $mod+Mod1+Left workspace prev_on_output
bindsym $mod+Mod1+Right workspace next_on_output
# move focused window with mod+shift+hjkl
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# switch to workspace with mod+1234567890
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
bindsym $mod+Tab exec aworkspace switch
# move container to workspace with meta+shift+1234567890
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
bindsym $mod+Control+Mod1+h move container to workspace prev_on_output
bindsym $mod+Control+Mod1+l move container to workspace next_on_output
bindsym $mod+Control+Mod1+Left move container to workspace prev_on_output
bindsym $mod+Control+Mod1+Right move container to workspace next_on_output
bindsym $mod+Shift+Tab exec aworkspace move
# vim-style window splits and resizing after hitting mod+w
mode "window" {
bindsym s split v; mode "default"
bindsym v split h; mode "default"
bindsym Shift+comma resize shrink width 10 px or 10 ppt
bindsym Shift+period resize grow width 10 px or 10 ppt
bindsym Shift+equal resize grow height 10 px or 10 ppt
bindsym minus resize shrink height 10 px or 10 ppt
# Leave window mode with return/escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+w mode "window"
# Change layouts with mod+,./
bindsym $mod+comma layout stacking
bindsym $mod+period layout tabbed
bindsym $mod+slash layout toggle split
# Toggle floating with mod+shift+space
bindsym $mod+Shift+space floating toggle
# Swap focus between tiling windows and floating windows
bindsym $mod+space focus mode_toggle
# Move focus to parent container with mod+a
bindsym $mod+a focus parent
# Move windows in and out of the scratchpad with mod+(shift)+t
bindsym $mod+Shift+t move scratchpad
bindsym $mod+t scratchpad show
# Cycle through border styles with mod+b
bindsym $mod+b border toggle
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace with mod+shift+r
bindsym $mod+Shift+r restart
# exit i3 with mod+shift+e
bindsym $mod+Shift+e exit
# Run terminal with mod+enter
bindsym $mod+Return exec xfce4-terminal
# File manager with mod+e
bindsym $mod+e exec nautilus
# Screenshots
bindsym Print exec swaygrab ~/Pictures/screenshots/$(date +"%Y-%m-%d_%H:%M:%S.png")
bindsym $mod+Print exec sleep 0.1 && srht
# dmenu with mod+d for arbituary programs
bindsym $mod+d exec dmenu_run -p "Run:" -l 10
bindsym $mod+shift+d exec i3-dmenu-desktop
bindsym $mod+grave exec dmenu | xargs swaymsg
# passwords
bindsym $mod+p exec pass-dmenu
# volume controls (special keys on keyboard)
bindsym XF86AudioMute exec pa-adjust mute
bindsym XF86AudioLowerVolume exec pa-adjust minus
bindsym XF86AudioRaiseVolume exec pa-adjust plus
bindsym $mod+XF86AudioLowerVolume exec pa-adjust seekb
bindsym $mod+XF86AudioRaiseVolume exec pa-adjust seekf
bindsym $mod+Shift+XF86AudioLowerVolume exec pa-adjust seekbb
bindsym $mod+Shift+XF86AudioRaiseVolume exec pa-adjust seekff
# music controls (special keys on keyboard)
bindsym XF86AudioNext exec stewdio skip
bindsym XF86AudioPlay exec stewdio play
bindsym XF86AudioPrev exec stewdio dmenu-search
bindsym $mod+XF86AudioPlay exec stewdio qfav
bindsym $mod+XF86AudioNext exec stewdio dmenu-queue
# i3-lock on mod+pause
bindsym XF86Sleep exec swaylock -i `wallpaper` -s stretch
bindsym $mod+XF86Sleep exec swaylock -c 00000000
bindsym $mod+Pause exec lock-system
bindsym $mod+i exec ibus-toggle
# Status bar uses custom script
set bg #323232
set bgu #323232B0
set fg #ffffff
set fgu #aaaaaa
bar {
status_command ./custom_statusbar
position top
pango_markup disabled
font pango:DejaVu Sans Mono 10
colors {
statusline $fg
background $bgu
focused_background $bgu
focused_workspace $bgu #222222 $fg
active_workspace $bgu #222222 $fg
inactive_workspace $bgu $bgu $fg
}
}
# border background text indicator child
client.unfocused $bgu $bgu $fgu $bgu $bgu
client.focused_inactive $bgu $bgu $fgu $bgu $bgu
client.focused $bgu $bgu $fg $bgu $bgu
new_window normal 4
include ~/.config/sway/config.d/`hostname`/*
include ~/.config/sway/config.d/*
output * bg ~/.config/sway/waves.jpg fill
#exec startup sway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment