2019-12-03 22:07:12 +00:00
|
|
|
# Note: most i3 keybindings use ◆ mod key. This is `Alt` key by default,
|
2019-12-03 21:07:43 +00:00
|
|
|
# but is frequently swapped with Meta (windows) key.
|
|
|
|
|
|
|
|
# Open new terminal
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + Enter
|
2019-12-03 21:07:43 +00:00
|
|
|
|
|
|
|
# Open application launcher
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + d
|
2019-12-03 21:07:43 +00:00
|
|
|
|
|
|
|
# Change where new window is opened:
|
|
|
|
# Horizontal split
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + h
|
2019-12-03 21:07:43 +00:00
|
|
|
# Vertical split
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + v
|
2019-12-03 21:07:43 +00:00
|
|
|
|
|
|
|
# Movement
|
|
|
|
# (like in vim, but one key to right)
|
|
|
|
^
|
|
|
|
l
|
|
|
|
< j ; >
|
|
|
|
k
|
|
|
|
V
|
|
|
|
|
|
|
|
# Switch focus around windows in workspace
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + <movement key>
|
2019-12-03 21:07:43 +00:00
|
|
|
|
|
|
|
# Move windows around workspace
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + Shift + <movement key>
|
2019-12-03 21:07:43 +00:00
|
|
|
|
|
|
|
# Workspaces
|
|
|
|
# i3 has by default 10 workspaces, labeled 1,2,...,9,0
|
|
|
|
# Each opened window resides in one of the workspaces
|
|
|
|
|
|
|
|
# Change workspace
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + 0-9
|
2019-12-03 21:07:43 +00:00
|
|
|
|
|
|
|
# Send focused window to workspace
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + Shift + 0-9
|
2019-12-03 21:07:43 +00:00
|
|
|
|
|
|
|
# Toggle fullscreen
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + f
|
2019-12-03 21:07:43 +00:00
|
|
|
|
|
|
|
# Enter resize mode (resize with movement/arrow keys, exit with Esc)
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + r
|
2019-12-03 21:07:43 +00:00
|
|
|
|
|
|
|
# Change container layout
|
|
|
|
# default: next to each other
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + e
|
2019-12-03 21:07:43 +00:00
|
|
|
# stacked: all windows but one are minimized
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + s
|
2019-12-03 21:07:43 +00:00
|
|
|
# tabbed: like browser tabs
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + w
|
|
|
|
# floating window (drag with ◆ + LeftClick):
|
|
|
|
◆ + Shift + Space
|
2019-12-03 21:22:27 +00:00
|
|
|
|
|
|
|
# Guide: precise positioning of newly spawned windows
|
|
|
|
#
|
|
|
|
# When creating new window, currently focused window
|
|
|
|
# will be split in half and one half will be used by new window.
|
|
|
|
# You can control whether it will split horiontally or
|
2019-12-03 22:07:12 +00:00
|
|
|
# vertically with ◆+v or ◆+h.
|
2019-12-03 21:22:27 +00:00
|
|
|
# You can focus multiple windows at once.
|
|
|
|
# For example with this layout with two windows:
|
|
|
|
+-------+-------+
|
2019-12-03 22:20:53 +00:00
|
|
|
| . . . | . . . |
|
|
|
|
| . . . | . . . |
|
|
|
|
| . 1 . | . 2 . |
|
|
|
|
| . . . | . . . |
|
|
|
|
| . . . | . . . |
|
2019-12-03 21:22:27 +00:00
|
|
|
+-------+-------+
|
|
|
|
# One can select both windows at once and split them vertically,
|
|
|
|
# so the new window will take half of whole screen.
|
|
|
|
# Select parent container (both windows 1 and 2):
|
2019-12-03 22:07:12 +00:00
|
|
|
◆ + a
|
|
|
|
# Vertically spawn new terminal window: ◆+v, ◆+Enter
|
2019-12-03 21:22:27 +00:00
|
|
|
# Result:
|
|
|
|
+-------+-------+
|
2019-12-03 22:20:53 +00:00
|
|
|
| . . . | . . . |
|
|
|
|
| . 1 . | . 2 . |
|
2019-12-03 21:22:27 +00:00
|
|
|
+-------+-------+
|
2019-12-03 22:20:53 +00:00
|
|
|
| . . . 3 . . . |
|
|
|
|
| . . . . . . . |
|
2019-12-03 21:22:27 +00:00
|
|
|
+---------------+
|
|
|
|
# Whenever you split window in half by spawning new window,
|
|
|
|
# both windows will be placed in an invisible container.
|
2019-12-03 22:07:12 +00:00
|
|
|
# One can focus parent container with ◆+a.
|
|
|
|
|
|
|
|
# i3 configuration
|
|
|
|
# Configuration files can be found at following locations (ordered by priority):
|
|
|
|
~/.config/i3/config (or $XDG_CONFIG_HOME/i3/config)
|
|
|
|
~/.i3/config
|
|
|
|
/etc/xdg/i3/config (or $XDG_CONFIG_DIRS/i3/config)
|
|
|
|
/etc/i3/config
|
|
|
|
# One can specify custom config file with -c option while starting i3
|
|
|
|
# Most configuration options can be inferred from default configuration
|
|
|
|
# Default configuration path:
|
|
|
|
/etc/i3/config
|
2019-12-03 22:24:53 +00:00
|
|
|
|
2019-12-03 22:07:12 +00:00
|
|
|
# Keys can be binded with bindsym like this:
|
|
|
|
bindsym $mod+4 workspace $ws4
|
|
|
|
bindsym $mod+Shift+R exec custom-script-in-path.sh --flag1 --flag2
|
|
|
|
bindcode 172 exec playerctl play-pause
|
2019-12-03 22:24:53 +00:00
|
|
|
|
2020-03-01 00:02:13 +00:00
|
|
|
# Execute code when i3 starts, but only once per session:
|
2019-12-03 22:07:12 +00:00
|
|
|
exec --no-startup-id ~/.config/polybar/launch.sh
|
2020-03-01 00:02:13 +00:00
|
|
|
# Always execute code when i3 starts, even if it's simply restarted:
|
|
|
|
exec_always --no-startup-id ~/.config/polybar/launch.sh
|
2019-12-03 22:24:53 +00:00
|
|
|
|
2019-12-03 22:07:12 +00:00
|
|
|
# One can make special modes (much like resize mode)
|
|
|
|
set $gamingMode "gaming_mode"
|
|
|
|
bindsym $mod+g mode $gamingMode
|
|
|
|
mode $gamingMode {
|
2020-03-01 00:02:13 +00:00
|
|
|
# Insert declarations for this mode. Useful when normal keybindings fight
|
|
|
|
# with keybindings of your games. Don't forget to add option to return from
|
|
|
|
# this mode!
|
|
|
|
bindsym $mod+Escape mode default
|
2019-12-03 22:07:12 +00:00
|
|
|
}
|
2019-12-03 22:24:53 +00:00
|
|
|
|
2019-12-03 22:07:12 +00:00
|
|
|
# Move workspace between multiple monitors
|
|
|
|
bindsym $mod+x move workspace to output right
|
2020-10-02 09:38:48 +00:00
|
|
|
|
|
|
|
# Reload config file
|
|
|
|
◆ + Shift + c
|
|
|
|
|
|
|
|
# Restart i3 in place
|
|
|
|
◆ + Shift + r
|
|
|
|
|
|
|
|
# Exit i3
|
|
|
|
◆ + Shift + e
|