i3: More robust workspace json parsing
Use the name instead of the number as that could be -1.
This commit is contained in:
@@ -101,7 +101,7 @@ workspace_auto_back_and_forth yes
|
|||||||
# Switch visible workspaces (e.g. multi monitor setup)
|
# Switch visible workspaces (e.g. multi monitor setup)
|
||||||
bindsym $mod+Tab exec i3-msg workspace "$( \
|
bindsym $mod+Tab exec i3-msg workspace "$( \
|
||||||
i3-msg -t get_workspaces | \
|
i3-msg -t get_workspaces | \
|
||||||
jq '.[] | select(.visible and (.focused | not)).num' | \
|
jq -r '.[] | select(.visible and (.focused | not)).name' | \
|
||||||
head -1)"
|
head -1)"
|
||||||
|
|
||||||
# move focused container to workspace
|
# move focused container to workspace
|
||||||
|
|||||||
Reference in New Issue
Block a user