Skip to content

Instantly share code, notes, and snippets.

@kyleterry
Created April 23, 2020 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyleterry/196185f44fc6449d4c4f3d3a88271670 to your computer and use it in GitHub Desktop.
Save kyleterry/196185f44fc6449d4c4f3d3a88271670 to your computer and use it in GitHub Desktop.
# vim:filetype=i3
set $mod Mod4
set $locker ${HOME}/.local/bin/screen-locker
set $lightson ${HOME}/.local/bin/lightson
#smart_borders on
# window title font
font pango: xos4 Terminus 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run -i -fn 'xos4 Terminus'
exec_always --no-startup-id xmodmap ${HOME}/.Xmodmap &
# volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -3%
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +3%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
# screen brightness
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 8 &
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 8 &
# media keys
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause &
bindsym XF86AudioStop exec --no-startup-id playerctl stop &
bindsym XF86AudioNext exec --no-startup-id playerctl next &
bindsym XF86AudioPrev exec --no-startup-id playerctl prev &
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# move focused window to scratchpad
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
# split direction
bindsym Control+$mod+h split h
bindsym Control+$mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit?' -B 'Yes' 'i3-msg exit'"
set $mode_display "display: [p]rimary-only [e]xtend-right [m]irror"
bindsym $mod+o mode $mode_display
mode $mode_display {
bindsym e exec --no-startup-id mons -e right; mode "default"
bindsym p exec --no-startup-id mons -o; mode "default"
bindsym m exec --no-startup-id mons -m; mode "default"
bindsym Escape mode "default"
bindsym $mod+o mode "default"
}
set $mode_resize "resize"
bindsym $mod+r mode $mode_resize
mode $mode_resize {
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+Shift+P exec $locker
exec --no-startup-id xautolock -time 10 -locker $locker
exec --no-startup-id $lightson &
exec --no-startup-id udiskie &
exec --no-startup-id picom --config ~/.config/compton.conf &
# move current workspace to another display
bindsym $mod+x move workspace to output right
bindsym $mod+Shift+x move workspace to output left
assign [class="Firefox"] $ws1
assign [class="firefox"] $ws1
assign [class="Spotify"] $ws9
assign [class="spotify"] $ws9
bar {
font pango: xos4 Terminus 10
status_command relevantd
position top
mode dock
tray_output none
colors {
separator #928374
background #282828
statusline #ebdbb2
focused_workspace #689d6a #689d6a #282828
active_workspace #1d2021 #1d2021 #928374
inactive_workspace #32302f #32302f #928374
urgent_workspace #cc241d #cc241d #ebdbb2
}
}
client.focused #689d6a #689d6a #282828 #282828
client.focused_inactive #1d2021 #1d2021 #928374 #282828
client.unfocused #32302f #32302f #928374 #282828
client.urgent #cc241d #cc241d #ebdbb2 #282828
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment