From ab5dca873c0d3765f30adeeb984ddc9cc380dafa Mon Sep 17 00:00:00 2001 From: finga Date: Thu, 31 Oct 2024 21:19:37 +0100 Subject: [PATCH] workspaces: Move workspaces config into its own file --- .config/i3/config | 60 +---------------------------- .config/i3/config.d/workspaces.conf | 59 ++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 59 deletions(-) create mode 100644 .config/i3/config.d/workspaces.conf diff --git a/.config/i3/config b/.config/i3/config index e7d8f87..679f9db 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -89,52 +89,6 @@ bindsym $mod+a focus parent # focus the child container bindsym $mod+q focus child -# 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 $ws0 "0" -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" -set $ws10 "10" -set $ws11 "11" -set $ws12 "12" - -# switch to workspace -bindsym $mod+grave workspace $ws0 -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 -bindsym $mod+minus workspace $ws11 -bindsym $mod+equal workspace $ws12 - -# move focused container to workspace -bindsym $mod+Shift+grave move container to workspace $ws0 -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 -bindsym $mod+Shift+underscore move container to workspace $ws11 -bindsym $mod+Shift+plus move container to workspace $ws12 - # reload the configuration file bindsym $mod+Shift+c reload @@ -244,16 +198,4 @@ bar { } } -workspace $ws0 output $screen0 -workspace $ws1 output $screen0 -workspace $ws2 output $screen0 -workspace $ws3 output $screen0 -workspace $ws4 output $screen0 -workspace $ws5 output $screen0 -workspace $ws6 output $screen1 -workspace $ws7 output $screen1 -workspace $ws8 output $screen1 -workspace $ws9 output $screen1 -workspace $ws10 output $screen1 -workspace $ws11 output $screen1 -workspace $ws12 output $screen1 +include ~/.config/i3/config.d/*.conf diff --git a/.config/i3/config.d/workspaces.conf b/.config/i3/config.d/workspaces.conf new file mode 100644 index 0000000..a0cd82a --- /dev/null +++ b/.config/i3/config.d/workspaces.conf @@ -0,0 +1,59 @@ +# create workspace names +set $ws0 "0" +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" +set $ws10 "10" +set $ws11 "11" +set $ws12 "12" + +# switch to workspace +bindsym $mod+grave workspace $ws0 +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 +bindsym $mod+minus workspace $ws11 +bindsym $mod+equal workspace $ws12 + +# move focused container to workspace +bindsym $mod+Shift+grave move container to workspace $ws0 +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 +bindsym $mod+Shift+underscore move container to workspace $ws11 +bindsym $mod+Shift+plus move container to workspace $ws12 + +# put workspaces on fixed screens +workspace $ws0 output $screen0 +workspace $ws1 output $screen0 +workspace $ws2 output $screen0 +workspace $ws3 output $screen0 +workspace $ws4 output $screen0 +workspace $ws5 output $screen0 +workspace $ws6 output $screen1 +workspace $ws7 output $screen1 +workspace $ws8 output $screen1 +workspace $ws9 output $screen1 +workspace $ws10 output $screen1 +workspace $ws11 output $screen1 +workspace $ws12 output $screen1