diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-17 16:43:58 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-17 16:43:58 +1100 |
| commit | 47733e964a6017e81f04fa1f0e620ed01b064822 (patch) | |
| tree | ffa16c626e49063e741a978b66cee8c3366be6d2 /workspace-action.sh | |
| parent | main: message shell (diff) | |
| download | caelestia-cli-47733e964a6017e81f04fa1f0e620ed01b064822.tar.gz caelestia-cli-47733e964a6017e81f04fa1f0e620ed01b064822.tar.bz2 caelestia-cli-47733e964a6017e81f04fa1f0e620ed01b064822.zip | |
main: workspace action
Diffstat (limited to 'workspace-action.sh')
| -rwxr-xr-x | workspace-action.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/workspace-action.sh b/workspace-action.sh new file mode 100755 index 0000000..64a32f0 --- /dev/null +++ b/workspace-action.sh @@ -0,0 +1,11 @@ +#!/bin/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 |