Files
caelestia-cli/workspace-action.sh
T
2025-06-08 10:04:59 +02:00

12 lines
296 B
Bash
Executable File

#!/usr/bin/env bash
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
if [[ "$1" == *"group" ]]; then
# Move to group
hyprctl dispatch "${1::-5}" $((($2 - 1) * 10 + ${active_ws:0-1}))
else
# Move to ws in group
hyprctl dispatch "$1" $((((active_ws - 1) / 10) * 10 + $2))
fi