i3: Better workspace handling when docking

This commit is contained in:
Tobias Manske 2023-03-25 14:37:28 +01:00
parent 3ddd2d5302
commit 14ebfe933e
Signed by: tobias
GPG Key ID: 9164B527694A0709

View File

@ -19,7 +19,8 @@ right() {
i3-msg "move workspace to output DP-2-2"
}
FOCUS="$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).name' | cut -d"\"" -f2)"
VISIBLE="$(i3-msg -t get_workspaces | jq '.[] | select(.visible==true).name' | cut -d"\"" -f2 | tr -d \")"
FOCUS="$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).name' | cut -d"\"" -f2 | tr -d \")"
center 1
center 2
@ -39,8 +40,11 @@ center F7
center F8
center F9
center F10
left F1
right F2
for i in $VISIBLE; do
i3-msg "workspace $i"
done
i3-msg "workspace $FOCUS"