dotfiles/i3/scripts/ws-dock.sh

51 lines
889 B
Bash
Raw Normal View History

2022-06-01 19:06:16 +02:00
#!/bin/bash
exec &>/dev/null
# This script moves all ws where they are supposed to be when my Framework is docked.
# It is called by Grobi execute_after
center() {
i3-msg "workspace $1"
2023-03-25 13:41:16 +01:00
i3-msg "move workspace to output DP-2-3"
2022-06-01 19:06:16 +02:00
}
left() {
i3-msg "workspace $1"
2023-03-25 13:41:16 +01:00
i3-msg "move workspace to output DP-2-1"
2022-06-01 19:06:16 +02:00
}
right() {
i3-msg "workspace $1"
2023-03-25 13:41:16 +01:00
i3-msg "move workspace to output DP-2-2"
2022-06-01 19:06:16 +02:00
}
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 \")"
2022-06-01 19:06:16 +02:00
center 1
center 2
center 3
center 4
center 5
center 6
center 7
center 8
center 9
center 10
center F4
center F5
center F6
center F7
center F8
center F9
center F10
left F1
right F2
2023-03-31 23:26:16 +02:00
right F3
2022-06-01 19:06:16 +02:00
for i in $VISIBLE; do
i3-msg "workspace $i"
done
2022-06-01 19:06:16 +02:00
i3-msg "workspace $FOCUS"