From e564bf0fe694f72ee2b2785ed0295d709209c260 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sat, 15 Oct 2022 19:02:29 +0200 Subject: [PATCH] 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. --- .config/i3/config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.config/i3/config b/.config/i3/config index a2ce0bd..01a4d9b 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -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