i3: Add binding to switch between visible monitors

I have not tested this with more than 2 monitors. I am unsure if the
binding will cycle through them or just between two.
This commit is contained in:
2022-10-15 19:02:29 +02:00
parent 61e8ccc176
commit e564bf0fe6

View File

@@ -97,6 +97,12 @@ bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
# Switch visible workspaces (e.g. multi monitor setup)
bindsym $mod+Tab exec i3-msg workspace "$( \
i3-msg -t get_workspaces | \
jq '.[] | select(.visible and (.focused | not)).num' | \
head -1)"
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2