default config: use workspace number, not just workspace

This is strictly better: if the configured name does not match the current name,
the correct workspace will still be used.

When creating a new workspace, the configured name is still used.
This commit is contained in:
Michael Stapelberg 2019-07-28 08:58:39 -07:00
parent e4ecc6e4a1
commit ecffbed45f
2 changed files with 40 additions and 41 deletions

View File

@ -117,30 +117,29 @@ set $ws8 "8"
set $ws9 "9" set $ws9 "9"
set $ws10 "10" set $ws10 "10"
# switch to workspace # switch to workspace
bindsym Mod1+1 workspace $ws1 bindsym Mod1+1 workspace number $ws1
bindsym Mod1+2 workspace $ws2 bindsym Mod1+2 workspace number $ws2
bindsym Mod1+3 workspace $ws3 bindsym Mod1+3 workspace number $ws3
bindsym Mod1+4 workspace $ws4 bindsym Mod1+4 workspace number $ws4
bindsym Mod1+5 workspace $ws5 bindsym Mod1+5 workspace number $ws5
bindsym Mod1+6 workspace $ws6 bindsym Mod1+6 workspace number $ws6
bindsym Mod1+7 workspace $ws7 bindsym Mod1+7 workspace number $ws7
bindsym Mod1+8 workspace $ws8 bindsym Mod1+8 workspace number $ws8
bindsym Mod1+9 workspace $ws9 bindsym Mod1+9 workspace number $ws9
bindsym Mod1+0 workspace $ws10 bindsym Mod1+0 workspace number $ws10
# move focused container to workspace # move focused container to workspace
bindsym Mod1+Shift+1 move container to workspace $ws1 bindsym Mod1+Shift+1 move container to workspace number $ws1
bindsym Mod1+Shift+2 move container to workspace $ws2 bindsym Mod1+Shift+2 move container to workspace number $ws2
bindsym Mod1+Shift+3 move container to workspace $ws3 bindsym Mod1+Shift+3 move container to workspace number $ws3
bindsym Mod1+Shift+4 move container to workspace $ws4 bindsym Mod1+Shift+4 move container to workspace number $ws4
bindsym Mod1+Shift+5 move container to workspace $ws5 bindsym Mod1+Shift+5 move container to workspace number $ws5
bindsym Mod1+Shift+6 move container to workspace $ws6 bindsym Mod1+Shift+6 move container to workspace number $ws6
bindsym Mod1+Shift+7 move container to workspace $ws7 bindsym Mod1+Shift+7 move container to workspace number $ws7
bindsym Mod1+Shift+8 move container to workspace $ws8 bindsym Mod1+Shift+8 move container to workspace number $ws8
bindsym Mod1+Shift+9 move container to workspace $ws9 bindsym Mod1+Shift+9 move container to workspace number $ws9
bindsym Mod1+Shift+0 move container to workspace $ws10 bindsym Mod1+Shift+0 move container to workspace number $ws10
# reload the configuration file # reload the configuration file
bindsym Mod1+Shift+c reload bindsym Mod1+Shift+c reload

View File

@ -105,28 +105,28 @@ set $ws9 "9"
set $ws10 "10" set $ws10 "10"
# switch to workspace # switch to workspace
bindcode $mod+10 workspace $ws1 bindcode $mod+10 workspace number $ws1
bindcode $mod+11 workspace $ws2 bindcode $mod+11 workspace number $ws2
bindcode $mod+12 workspace $ws3 bindcode $mod+12 workspace number $ws3
bindcode $mod+13 workspace $ws4 bindcode $mod+13 workspace number $ws4
bindcode $mod+14 workspace $ws5 bindcode $mod+14 workspace number $ws5
bindcode $mod+15 workspace $ws6 bindcode $mod+15 workspace number $ws6
bindcode $mod+16 workspace $ws7 bindcode $mod+16 workspace number $ws7
bindcode $mod+17 workspace $ws8 bindcode $mod+17 workspace number $ws8
bindcode $mod+18 workspace $ws9 bindcode $mod+18 workspace number $ws9
bindcode $mod+19 workspace $ws10 bindcode $mod+19 workspace number $ws10
# move focused container to workspace # move focused container to workspace
bindcode $mod+Shift+10 move container to workspace $ws1 bindcode $mod+Shift+10 move container to workspace number $ws1
bindcode $mod+Shift+11 move container to workspace $ws2 bindcode $mod+Shift+11 move container to workspace number $ws2
bindcode $mod+Shift+12 move container to workspace $ws3 bindcode $mod+Shift+12 move container to workspace number $ws3
bindcode $mod+Shift+13 move container to workspace $ws4 bindcode $mod+Shift+13 move container to workspace number $ws4
bindcode $mod+Shift+14 move container to workspace $ws5 bindcode $mod+Shift+14 move container to workspace number $ws5
bindcode $mod+Shift+15 move container to workspace $ws6 bindcode $mod+Shift+15 move container to workspace number $ws6
bindcode $mod+Shift+16 move container to workspace $ws7 bindcode $mod+Shift+16 move container to workspace number $ws7
bindcode $mod+Shift+17 move container to workspace $ws8 bindcode $mod+Shift+17 move container to workspace number $ws8
bindcode $mod+Shift+18 move container to workspace $ws9 bindcode $mod+Shift+18 move container to workspace number $ws9
bindcode $mod+Shift+19 move container to workspace $ws10 bindcode $mod+Shift+19 move container to workspace number $ws10
# reload the configuration file # reload the configuration file
bindcode $mod+Shift+54 reload bindcode $mod+Shift+54 reload