mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-11-22 06:44:41 +01:00
36 lines
521 B
Bash
Executable File
36 lines
521 B
Bash
Executable File
#!/bin/bash -x
|
|
|
|
move_workspace() {
|
|
workspace="$1"
|
|
output="$2"
|
|
|
|
i3-msg "[workspace=\"$workspace\"]" move workspace to output "$output"
|
|
}
|
|
export -f move_workspace
|
|
|
|
# get primary
|
|
primary=$(xrandr | awk '/ primary / {print $1}')
|
|
|
|
declare -a movers=(
|
|
"1: "
|
|
"2: "
|
|
"3: "
|
|
"4: "
|
|
"5: "
|
|
"6: "
|
|
"7: "
|
|
"8: "
|
|
"9: "
|
|
"10: "
|
|
# "11: "
|
|
"12: "
|
|
"13: "
|
|
)
|
|
|
|
for workspace in "${movers[@]}"; do
|
|
move_workspace "$workspace" "$primary" &
|
|
done
|
|
|
|
# restart i3.
|
|
i3-msg restart
|