dotfiles/i3/scripts/ws-dock.sh

47 lines
714 B
Bash
Executable File

#!/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"
i3-msg "move workspace to output DP1"
}
left() {
i3-msg "workspace $1"
i3-msg "move workspace to output DP3-2"
}
right() {
i3-msg "workspace $1"
i3-msg "move workspace to output DP3-1"
}
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"