# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
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"
# switch to workspace
bindsym $mod+ampersand workspace $ws1
bindsym $mod+eacute workspace $ws2
bindsym $mod+quotedbl workspace $ws3
bindsym $mod+apostrophe workspace $ws4
bindsym $mod+parenleft workspace $ws5
bindsym $mod+minus workspace $ws6
bindsym $mod+egrave workspace $ws7
bindsym $mod+underscore workspace $ws8
bindsym $mod+ccedilla workspace $ws9
# move focused container to workspace
bindsym $mod+Shift+ampersand move container to workspace $ws1
bindsym $mod+Shift+eacute move container to workspace $ws2
bindsym $mod+Shift+quotedbl move container to workspace $ws3
bindsym $mod+Shift+apostrophe move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+minus move container to workspace $ws6
bindsym $mod+Shift+egrave move container to workspace $ws7
bindsym $mod+Shift+underscore move container to workspace $ws8
bindsym $mod+Shift+ccedilla move container to workspace $ws9
bindsym $mod+Shift+agrave move container to workspace $ws10
# 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 m 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 or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r 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 i3blocks
#status_command i3status
tray_output primary
position top
colors {
background #021215
statusline #93a1a1
separator #2aa198
# Type border background font
focused_workspace #2aa198 #073642 #eee895
active_workspace #073642 #002b36 #839496
inactive_workspace #002b36 #021215 #586e75
urgent_workspace #cb4b16 #dc322f #fdf6e3
}
}
# Shtudown menu
set $mode_shutdown (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_shutdown" {
# FIXME: add scripts folder to git
bindsym l exec --no-startup-id ~/scripts/i3exit lock, mode "default"
bindsym s exec --no-startup-id ~/scripts/i3exit suspend, mode "default"
bindsym u exec --no-startup-id ~/scripts/i3exit switch_user, mode "default"
bindsym e exec --no-startup-id ~/scripts/i3exit logout, mode "default"
bindsym h exec --no-startup-id ~/scripts/i3exit hibernate, mode "default"
bindsym r exec --no-startup-id ~/scripts/i3exit reboot, mode "default"