Index

i3

default key bindings

resize windows
~ RMB
dmenu
~d
full screen
~ f
select window
~ left
~ right
~ up
~ down
move window
~ ^ left
~ ^ right
~ ^ up
~ ^ down
split orientation
~ h
~ v
toggle fullscreen
~ f
stacked layout
~ s
tabbed layout
~ w
split layout
~ e
float window
~ ^ space
shift workspace
~ [1-8]
window to workspace
~ ^ [1-8]
reload config
~ ^ c
restart i3
~ ^ r
exit i3
~ ^ e
open terinal
~ enter
window resize mode until enter or escape
~ r

config

define variable for alt key
set $alt Mod1
define variable for ctrl key
set $alt Control
bind ctrl+alt+t = open terminal
$ctrl $alt t exec i3-sensible-terinal
bind a key to multiple commands (separate commands by ;)
bindsym $mod+1 workspace 1; move workspace to output right
set default desktop layout (tiling, stacking, tabbed)
workspace_layout tabbed
execute a command on system startup
exec --no-startup-id [cmd]
execute a command on system startup and i3 restart
exec_always --no-startup-id [cmd]
specify rules for specific applications
for_window [class="[regex]"] [cmd]
case insensitive match
for_window [class="(?i)firefox"] move workspace 1; workspace 1
combine matching selectors
for_window [class="Firefox" window_role="About"] [cmd]
only exact match (no partial matches)
for_window [class="^firefox$"] [cmd]

scripting

message dialog
i3-nagbar -t warning -m "my message" '/path/to/cmd'
exit i3 (logout)
i3-msg exit
get window list (JSON)
i3-msg -t get_tree | jq .
list window classes
i3-msg -t get_tree | jq . | grep class
get selected workspace
i3-msg -t get_workspaces | jq '.[] | select(.focused).num'
get display for selected workspace
i3-msg -t get_workspaces | jq '.[] | select(.focused).output'
move workspace to display
workspace $workspace1 output $monitor_one
focus the window with the specified title
i3-msg "[title=\"$TITLE\"] focus"
focus the window with the specified container id ( get_tree)
i3-msg "[con_id=\"$target\"] focus"

additions

show system tray
trayer
show panel
xfce4-panel

documentation

official site
https://i3wm.org/docs/
i3 support reddit
https://www.reddit.com/r/i3wm/
example config: distro tube
https://gitlab.com/dwt1/dotfiles/-/blob/master/.i3/config
example config: luke smith
https://github.com/LukeSmithxyz/voidrice/blob/master/.config/i3/config