mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
16 lines
403 B
Bash
Executable File
16 lines
403 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Moves all workspaces to the passed in monitor id, which can be useful when
|
|
# connecting or disconnecting from a monitor.
|
|
|
|
MONITOR=$1
|
|
|
|
if [ ! $# = 1 ]; then
|
|
echo "Usage: mv-all-workspaces-to-monitor <monitor-id>"
|
|
exit 1
|
|
fi
|
|
|
|
hyprctl workspaces -j |
|
|
jq '.[] | select(.monitorID != "$MONITOR") | .id' |
|
|
xargs -I{} hyprctl dispatch moveworkspacetomonitor {} "$MONITOR" >/dev/null 2>&1
|