# Begin configuration for workspaces (virtual desktops)

# workspace back and forth (with/without active container)
workspace_auto_back_and_forth yes
bindsym $mod+b workspace back_and_forth
bindsym $mod+Shift+b move container to workspace back_and_forth

# switch to workspace with urgent window automatically
for_window [urgent=latest] focus

# Workspace labels - uses font icons
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 numbered workspace
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

# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2
bindsym $mod+Ctrl+3 move container to workspace $ws3
bindsym $mod+Ctrl+4 move container to workspace $ws4
bindsym $mod+Ctrl+5 move container to workspace $ws5
bindsym $mod+Ctrl+6 move container to workspace $ws6
bindsym $mod+Ctrl+7 move container to workspace $ws7
bindsym $mod+Ctrl+8 move container to workspace $ws8
bindsym $mod+Ctrl+9 move container to workspace $ws9

# Move to workspace with focused container
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9

# Move to next/previous workspace
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev

# Assign window classes to specific workspaces on launch
assign [class="^telegram-desktop"] $ws2
assign [class="^Telegram"] $ws2
assign [class="^Discord"] $ws2
assign [class="^Spotify"] $ws6
assign [class="^discord"] $ws2
assign [class="^Steam"] $ws8
assign [class="^Java"] $ws7
assign [class="^Synergy"] $ws4
assign [class="^AnyDesk"] $ws4
assign [class="^Code"] $ws5

# End workspace configuration
