# Restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
set $workspace1 "1 "
set $workspace2 "2 "
set $workspace3 "3 "
set $workspace4 "4 "
# switch to workspace
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace $workspace3
bindsym $mod+Shift+4 move container to workspace $workspace4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
assign [class="Firefox"] $workspace1
assign [class="Chromium"] $workspace1
assign [class="jetbrains-idea"] $workspace2
assign [class="Gedit"] $workspace2
assign [class="URxvt"] $workspace3
assign [class="Thunar"] $workspace4
# 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
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
# 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'"
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)
#--- Workspace bindings ---#
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
set $ws1 "1 "
set $ws2 "2 "
# Pressing left will shrink the window’s width.
set $ws3 "3 "
# Pressing right will grow the window’s width.
set $ws4 "4 "
# Pressing up will shrink the window’s height.
set $ws5 "5"
# Pressing down will grow the window’s height.
set $ws6 "6"
bindsym j resize shrink width 10 px or 10 ppt
set $ws7 "7"
bindsym k resize grow height 10 px or 10 ppt
set $ws8 "8"
bindsym l resize shrink height 10 px or 10 ppt
set $ws9 "9"
bindsym semicolon resize grow width 10 px or 10 ppt
set $ws10 "10"
# same bindings, but for the arrow keys
# Assign workspace to monitor
bindsym Left resize shrink width 10 px or 10 ppt
workspace $ws1 output eDP-1
bindsym Down resize grow height 10 px or 10 ppt
workspace $ws2 output eDP-1
bindsym Up resize shrink height 10 px or 10 ppt
workspace $ws3 output eDP-1
bindsym Right resize grow width 10 px or 10 ppt
workspace $ws4 output eDP-1
workspace $ws5 output eDP-1
# back to normal: Enter or Escape
bindsym Return mode "default"
# Switch to workspace
bindsym Escape mode "default"
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
# Move focused container to workspace
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
# Move workspace
bindsym $mod+Control+Left move workspace to output left
bindsym $mod+Control+Right move workspace to output right
bindsym $mod+r mode "resize"
# Get window name
# xprop -> WM_CLASS
assign [class="Firefox"] $ws1
assign [class="URxvt"] $ws3
assign [class="Thunar"] $ws4
assign [class="krita"] $ws5
# Start i3bar to display a workspace bar (plus the system information i3status