dotfiles/i3/scripts/ws-dock.sh

51 lines
889 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 DP-2-3"
}
left() {
i3-msg "workspace $1"
i3-msg "move workspace to output DP-2-1"
}
right() {
i3-msg "workspace $1"
i3-msg "move workspace to output DP-2-2"
}
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
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
right F3
for i in $VISIBLE; do
i3-msg "workspace $i"
done
i3-msg "workspace $FOCUS"