Select Git revision
-
Jiří Kalvoda authoredJiří Kalvoda authored
i3.conf 14.80 KiB
##################################################################################
# #
# I3-WOMAN #
# Two-dimensional workspace manager for i3wm #
# #
# Sample configuration file for i3wm #
# #
# (c) 2022 Jiri Kalvoda <jirikalvoda@kam.mff.cuni.cz> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
# #
##################################################################################
set $mod Mod4
# Set workspace for GUI
for_window [title="^i3-woman$"] move to workspace 0
# Set workspace for temporary window for mowing container
for_window [title="^i3-woman-daemon-tmp-window$"] move to workspace tmp
# On startup or config reload start daemon (and exit old instance)
exec_always "i3-woman exit; i3-woman-daemon --gui"
# switch to workspace (slave)
bindsym $mod+grave exec "i3-woman goto-workspace --slave=0"
bindsym $mod+1 exec "i3-woman goto-workspace --slave=1"
bindsym $mod+2 exec "i3-woman goto-workspace --slave=2"
bindsym $mod+3 exec "i3-woman goto-workspace --slave=3"
bindsym $mod+4 exec "i3-woman goto-workspace --slave=4"
bindsym $mod+5 exec "i3-woman goto-workspace --slave=5"
bindsym $mod+6 exec "i3-woman goto-workspace --slave=6"
bindsym $mod+7 exec "i3-woman goto-workspace --slave=7"
bindsym $mod+8 exec "i3-woman goto-workspace --slave=8"
bindsym $mod+9 exec "i3-woman goto-workspace --slave=9"
bindsym $mod+0 exec "i3-woman goto-workspace --slave=10"
bindsym $mod+minus exec "i3-woman goto-workspace --slave=11"
bindsym $mod+equal exec "i3-woman goto-workspace --slave=12"
# switch to workspace (master)
bindsym $mod+F1 exec "i3-woman goto-workspace --master=1"
bindsym $mod+F2 exec "i3-woman goto-workspace --master=2"
bindsym $mod+F3 exec "i3-woman goto-workspace --master=3"
bindsym $mod+F4 exec "i3-woman goto-workspace --master=4"
bindsym $mod+F5 exec "i3-woman goto-workspace --master=5"
bindsym $mod+F6 exec "i3-woman goto-workspace --master=6"
bindsym $mod+F7 exec "i3-woman goto-workspace --master=7"
bindsym $mod+F8 exec "i3-woman goto-workspace --master=8"
bindsym $mod+F9 exec "i3-woman goto-workspace --master=9"
bindsym $mod+F10 exec "i3-woman goto-workspace --master=10"
bindsym $mod+F11 exec "i3-woman goto-workspace --master=11"
bindsym $mod+F12 exec "i3-woman goto-workspace --master=12"
# move focused container to workspace (slave)
bindsym $mod+Shift+grave exec "i3-woman container-to --slave=0"
bindsym $mod+Shift+1 exec "i3-woman container-to --slave=1"
bindsym $mod+Shift+2 exec "i3-woman container-to --slave=2"
bindsym $mod+Shift+3 exec "i3-woman container-to --slave=3"
bindsym $mod+Shift+4 exec "i3-woman container-to --slave=4"
bindsym $mod+Shift+5 exec "i3-woman container-to --slave=5"
bindsym $mod+Shift+6 exec "i3-woman container-to --slave=6"
bindsym $mod+Shift+7 exec "i3-woman container-to --slave=7"
bindsym $mod+Shift+8 exec "i3-woman container-to --slave=8"
bindsym $mod+Shift+9 exec "i3-woman container-to --slave=9"
bindsym $mod+Shift+0 exec "i3-woman container-to --slave=10"
bindsym $mod+Shift+minus exec "i3-woman container-to --slave=11"
bindsym $mod+Shift+equal exec "i3-woman container-to --slave=12"
# move focused container to workspace (master)
bindsym $mod+Shift+F1 exec "i3-woman container-to --master=1"
bindsym $mod+Shift+F2 exec "i3-woman container-to --master=2"
bindsym $mod+Shift+F3 exec "i3-woman container-to --master=3"
bindsym $mod+Shift+F4 exec "i3-woman container-to --master=4"
bindsym $mod+Shift+F5 exec "i3-woman container-to --master=5"
bindsym $mod+Shift+F6 exec "i3-woman container-to --master=6"
bindsym $mod+Shift+F7 exec "i3-woman container-to --master=7"
bindsym $mod+Shift+F8 exec "i3-woman container-to --master=8"
bindsym $mod+Shift+F9 exec "i3-woman container-to --master=9"
bindsym $mod+Shift+F10 exec "i3-woman container-to --master=10"
bindsym $mod+Shift+F11 exec "i3-woman container-to --master=11"
bindsym $mod+Shift+F12 exec "i3-woman container-to --master=12"
# move focused container and switch to workspace (slave)
bindsym $mod+Ctrl+grave exec "i3-woman goto-with-container-to-to --slave=0"
bindsym $mod+Ctrl+1 exec "i3-woman goto-with-container-to-to --slave=1"
bindsym $mod+Ctrl+2 exec "i3-woman goto-with-container-to-to --slave=2"
bindsym $mod+Ctrl+3 exec "i3-woman goto-with-container-to-to --slave=3"
bindsym $mod+Ctrl+4 exec "i3-woman goto-with-container-to-to --slave=4"
bindsym $mod+Ctrl+5 exec "i3-woman goto-with-container-to-to --slave=5"
bindsym $mod+Ctrl+6 exec "i3-woman goto-with-container-to-to --slave=6"
bindsym $mod+Ctrl+7 exec "i3-woman goto-with-container-to-to --slave=7"
bindsym $mod+Ctrl+8 exec "i3-woman goto-with-container-to-to --slave=8"
bindsym $mod+Ctrl+9 exec "i3-woman goto-with-container-to-to --slave=9"
bindsym $mod+Ctrl+0 exec "i3-woman goto-with-container-to-to --slave=10"
bindsym $mod+Ctrl+minus exec "i3-woman goto-with-container-to-to --slave=11"
bindsym $mod+Ctrl+equal exec "i3-woman goto-with-container-to-to --slave=12"
# move focused container and switch to workspace (master)
bindsym $mod+Ctrl+F1 exec "i3-woman goto-with-container-to-to --master=1"
bindsym $mod+Ctrl+F2 exec "i3-woman goto-with-container-to-to --master=2"
bindsym $mod+Ctrl+F3 exec "i3-woman goto-with-container-to-to --master=3"
bindsym $mod+Ctrl+F4 exec "i3-woman goto-with-container-to-to --master=4"
bindsym $mod+Ctrl+F5 exec "i3-woman goto-with-container-to-to --master=5"
bindsym $mod+Ctrl+F6 exec "i3-woman goto-with-container-to-to --master=6"
bindsym $mod+Ctrl+F7 exec "i3-woman goto-with-container-to-to --master=7"
bindsym $mod+Ctrl+F8 exec "i3-woman goto-with-container-to-to --master=8"
bindsym $mod+Ctrl+F9 exec "i3-woman goto-with-container-to-to --master=9"
bindsym $mod+Ctrl+F10 exec "i3-woman goto-with-container-to-to --master=10"
bindsym $mod+Ctrl+F11 exec "i3-woman goto-with-container-to-to --master=11"
bindsym $mod+Ctrl+F12 exec "i3-woman goto-with-container-to-to --master=12"
# swap workspace with / rename to (slave)
bindsym $mod+Mod1+grave exec "i3-woman swap-with-workspace --notify --slave=0"
bindsym $mod+Mod1+1 exec "i3-woman swap-with-workspace --notify --slave=1"
bindsym $mod+Mod1+2 exec "i3-woman swap-with-workspace --notify --slave=2"
bindsym $mod+Mod1+3 exec "i3-woman swap-with-workspace --notify --slave=3"
bindsym $mod+Mod1+4 exec "i3-woman swap-with-workspace --notify --slave=4"
bindsym $mod+Mod1+5 exec "i3-woman swap-with-workspace --notify --slave=5"
bindsym $mod+Mod1+6 exec "i3-woman swap-with-workspace --notify --slave=6"
bindsym $mod+Mod1+7 exec "i3-woman swap-with-workspace --notify --slave=7"
bindsym $mod+Mod1+8 exec "i3-woman swap-with-workspace --notify --slave=8"
bindsym $mod+Mod1+9 exec "i3-woman swap-with-workspace --notify --slave=9"
bindsym $mod+Mod1+0 exec "i3-woman swap-with-workspace --notify --slave=10"
bindsym $mod+Mod1+minus exec "i3-woman swap-with-workspace --notify --slave=11"
bindsym $mod+Mod1+equal exec "i3-woman swap-with-workspace --notify --slave=12"
# rename to unused slave on master
bindsym $mod+Mod1+F1 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=1"
bindsym $mod+Mod1+F2 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=2"
bindsym $mod+Mod1+F3 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=3"
bindsym $mod+Mod1+F4 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=4"
bindsym $mod+Mod1+F5 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=5"
bindsym $mod+Mod1+F6 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=6"
bindsym $mod+Mod1+F7 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=7"
bindsym $mod+Mod1+F8 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=8"
bindsym $mod+Mod1+F9 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=9"
bindsym $mod+Mod1+F10 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=10"
bindsym $mod+Mod1+F11 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=11"
bindsym $mod+Mod1+F12 exec "i3-woman swap-with-workspace --notify --slave=alloc --master=12"
# special (named) workspaces
bindsym $mod+M exec "i3-woman goto-workspace --workspace=MAIL"
bindsym $mod+Shift+M exec "i3-woman goto-workspace --workspace=MAIL" ; exec "xdg-terminal mutt"
bindsym $mod+Ctrl+M exec "i3-woman goto-with-container-to --workspaces=MAIL"
bindsym $mod+Z exec "i3-woman goto-workspace --workspace=ZOOM"
bindsym $mod+Shift+Z exec "i3-woman goto-workspace --workspace=ZOOM" ; exec "zoom"
bindsym $mod+Ctrl+Z exec "i3-woman goto-with-container-to --workspace=ZOOM"
# Allocate new workspace (first unused workspace)
# Show notification with workspace number
bindsym $mod+comma exec "i3-woman goto-workspace --slave=alloc --notify"
bindsym $mod+Shift+comma exec "i3-woman goto-workspace --master=alloc --notify"
bindsym $mod+Ctrl+comma exec "i3-woman goto-with-container-to --slave=alloc --notify"
bindsym $mod+Ctrl+Shift+comma exec "i3-woman goto-with-container-to --master=alloc --notify"
# Show GUI
bindsym $mod+slash exec "i3-woman gui"
# Move by arrows or h/j/k/l
bindsym $mod+Ctrl+J exec "i3-woman goto-workspace --master=next-skip --notify"
bindsym $mod+Ctrl+Down exec "i3-woman goto-workspace --master=next-skip --notify"
bindsym $mod+Ctrl+K exec "i3-woman goto-workspace --master=prev-skip --notify"
bindsym $mod+Ctrl+Up exec "i3-woman goto-workspace --master=prev-skip --notify"
bindsym $mod+Ctrl+H exec "i3-woman goto-workspace --slave=prev-skip --notify"
bindsym $mod+Ctrl+Left exec "i3-woman goto-workspace --slave=prev-skip --notify"
bindsym $mod+Ctrl+L exec "i3-woman goto-workspace --slave=next-skip --notify"
bindsym $mod+Ctrl+Right exec "i3-woman goto-workspace --slave=next-skip --notify"
bindsym $mod+Ctrl+Shift+J exec "i3-woman goto-workspace --master=next --notify"
bindsym $mod+Ctrl+Shift+Down exec "i3-woman goto-workspace --master=next --notify"
bindsym $mod+Ctrl+Shift+K exec "i3-woman goto-workspace --master=prev --notify"
bindsym $mod+Ctrl+Shift+Up exec "i3-woman goto-workspace --master=prev --notify"
bindsym $mod+Ctrl+Shift+H exec "i3-woman goto-workspace --slave=prev-limit --notify"
bindsym $mod+Ctrl+Shift+Left exec "i3-woman goto-workspace --slave=prev-limit --notify"
bindsym $mod+Ctrl+Shift+L exec "i3-woman goto-workspace --slave=next-limit --notify"
bindsym $mod+Ctrl+Shift+Right exec "i3-woman goto-workspace --slave=next-limit --notify"
#################################################
# The rest of file is standard i3 configuration #
#################################################
font pango:DejaVu Sans Mono 8
floating_modifier $mod
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Shift+q kill
bindsym $mod+d exec dmenu_run
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# 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
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}