benji / i3

~/.config/i3/config Commits Diff Raw
set $mod Mod4
set $term xterm
set $scripts ~/scripts
font pango: SourceCodePro Black 10.5

exec $scripts/set-res

exec xrdb -merge ~/.Xresources
exec xset s off
exec xset -dpms
exec setxkbmap -layout 'us,us(intl)' -option grp:shifts_toggle

exec compton &
exec polybar mybar &

workspace_layout stacking

default_border none
for_window [class=XTerm] border pixel 5

#class                   border  backg   text    indic   child
client.focused          #225522 #225522 #ffffff #225522 #225522
client.focused_inactive #333333 #333333 #ffffff #333333 #333333
client.unfocused        #333333 #333333 #ffffff #333333 #333333

bindsym --release $mod+a exec $scripts/sshot
bindsym --release $mod+q exec $scripts/sshot-full

bindsym $mod+Return fullscreen toggle

bindsym $mod+w exec --no-startup-id $scripts/potd
bindsym $mod+h exec $scripts/headphones
bindsym $mod+l exec $scripts/lock
bindsym $mod+b exec $scripts/toggle-bar

bindsym $mod+t exec $term
bindsym $mod+s exec $term -e pulsemixer

mode "run" {
  bindsym c exec vscode; mode "default"
  bindsym d exec discord --no-sandbox; mode "default"
  bindsym s exec steam; mode "default"
  bindsym t exec spotify; mode "default"
  bindsym v exec virtualbox; mode "default"

  bindsym Escape mode "default"
} bindsym $mod+o mode "run"

mode "kill" {
  bindsym f exec killall -9 firefox; mode "default"
  bindsym s exec killall -9 steam; mode "default"
  bindsym z exec killall -9 zoom; mode "default"

  bindsym Escape mode "default"
} bindsym $mod+k mode "kill"

mode "games" {
  bindsym d exec firefox -new-window dominion.games; mode "default"
  bindsym i exec steam steam://rungameid/1127400; mode "default"
  bindsym k exec ~/opt/games/ksp/1.12.3/KSP.x86_64; mode "default"
  bindsym m exec ~/opt/games/mc/launcher/minecraft-launcher; mode "default"
  bindsym o exec openrct2; mode "default"
  bindsym t exec steam steam://rungameid/285920; mode "default"

  bindsym Escape mode "default"
} bindsym $mod+g mode "games"

mode "firefox" {
  bindsym space exec firefox -new-window about:newtab; mode "default"

  bindsym c exec firefox -new-window desmos.com/calculator; mode "default"
  bindsym d exec firefox -new-window duolingo.com; mode "default"
  bindsym h exec firefox -new-window hulu.com; mode "default"
  bindsym n exec firefox -new-window netflix.com; mode "default"
  bindsym t exec firefox -new-window en.wiktionary.org; mode "default"
  bindsym u exec firefox -new-window uncc.instructure.com; mode "default"
  bindsym w exec firefox -new-window en.wikipedia.org; mode "default"
  bindsym y exec firefox -new-window youtube.com; mode "default"

  bindsym Escape mode "default"
} bindsym $mod+f mode "firefox"

bindsym $mod+BackSpace kill
bindsym $mod+Shift+Tab kill

bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+comma focus parent
bindsym $mod+period focus child
bindsym $mod+Tab focus next

bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

bindsym $mod+z split h
bindsym $mod+c split v
bindsym $mod+x layout toggle split
bindsym $mod+v layout stacking

bindsym $mod+Shift+a workspace a; mode "default"
bindsym $mod+Shift+b workspace b; mode "default"
bindsym $mod+Shift+c workspace c; mode "default"
bindsym $mod+Shift+d workspace d; mode "default"
bindsym $mod+Shift+e workspace e; mode "default"
bindsym $mod+Shift+f workspace f; mode "default"
bindsym $mod+Shift+g workspace g; mode "default"
bindsym $mod+Shift+h workspace h; mode "default"
bindsym $mod+Shift+i workspace i; mode "default"
bindsym $mod+Shift+j workspace j; mode "default"
bindsym $mod+Shift+k workspace k; mode "default"
bindsym $mod+Shift+l workspace l; mode "default"
bindsym $mod+Shift+m workspace m; mode "default"
bindsym $mod+Shift+n workspace n; mode "default"
bindsym $mod+Shift+o workspace o; mode "default"
bindsym $mod+Shift+p workspace p; mode "default"
bindsym $mod+Shift+q workspace q; mode "default"
bindsym $mod+Shift+r workspace r; mode "default"
bindsym $mod+Shift+s workspace s; mode "default"
bindsym $mod+Shift+t workspace t; mode "default"
bindsym $mod+Shift+u workspace u; mode "default"
bindsym $mod+Shift+v workspace v; mode "default"
bindsym $mod+Shift+w workspace w; mode "default"
bindsym $mod+Shift+x workspace x; mode "default"
bindsym $mod+Shift+y workspace y; mode "default"
bindsym $mod+Shift+z workspace z; mode "default"

mode "move" {
  bindsym Left  move workspace to output left;  mode "default"
  bindsym Right move workspace to output right; mode "default"

  bindsym a move container to workspace a; workspace a; mode "default"
  bindsym b move container to workspace b; workspace b; mode "default"
  bindsym c move container to workspace c; workspace c; mode "default"
  bindsym d move container to workspace d; workspace d; mode "default"
  bindsym e move container to workspace e; workspace e; mode "default"
  bindsym f move container to workspace f; workspace f; mode "default"
  bindsym g move container to workspace g; workspace g; mode "default"
  bindsym h move container to workspace h; workspace h; mode "default"
  bindsym i move container to workspace i; workspace i; mode "default"
  bindsym j move container to workspace j; workspace j; mode "default"
  bindsym k move container to workspace k; workspace k; mode "default"
  bindsym l move container to workspace l; workspace l; mode "default"
  bindsym m move container to workspace m; workspace m; mode "default"
  bindsym n move container to workspace n; workspace n; mode "default"
  bindsym o move container to workspace o; workspace o; mode "default"
  bindsym p move container to workspace p; workspace p; mode "default"
  bindsym q move container to workspace q; workspace q; mode "default"
  bindsym r move container to workspace r; workspace r; mode "default"
  bindsym s move container to workspace s; workspace s; mode "default"
  bindsym t move container to workspace t; workspace t; mode "default"
  bindsym u move container to workspace u; workspace u; mode "default"
  bindsym v move container to workspace v; workspace v; mode "default"
  bindsym w move container to workspace w; workspace w; mode "default"
  bindsym x move container to workspace x; workspace x; mode "default"
  bindsym y move container to workspace y; workspace y; mode "default"
  bindsym z move container to workspace z; workspace z; mode "default"

  bindsym Escape mode "default"
} bindsym $mod+m mode "move"

mode "resize" {
  bindsym Left resize shrink width 50
  bindsym Right resize grow width 50
  bindsym Up resize grow height 50
  bindsym Down resize shrink height 50

  bindsym Shift+Left resize shrink width 10
  bindsym Shift+Right resize grow width 10
  bindsym Shift+Up resize grow height 10
  bindsym Shift+Down resize shrink height 10

  bindsym Return mode "default"
} bindsym $mod+r mode "resize"