dotfiles/i3/scripts/ws-dock.sh

47 lines
719 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
}
FOCUS="$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).name' | cut -d"\"" -f2)"
center 1
center 2
center 3
center 4
center 5
center 6
center 7
center 8
center 9
center 10
center F3
center F4
center F5
center F6
center F7
center F8
center F9
center F10
left F1
right F2
i3-msg "workspace $FOCUS"