Fix hyprland bind script
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
MOVE=false
|
||||
|
||||
while getopts "m" opt; do
|
||||
case $opt in
|
||||
m) MOVE=true ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
SELECTED_WORKSPACE_BASE="$1"
|
||||
ACTION="$2"
|
||||
|
||||
BLOCK_SIZE=10
|
||||
|
||||
@@ -19,7 +28,7 @@ if [ "$target_workspace_id" -eq "$current_workspace_id" ]; then
|
||||
target_workspace_id=$((next_block * BLOCK_SIZE + SELECTED_WORKSPACE_BASE))
|
||||
fi
|
||||
|
||||
if [ "$ACTION" = "move" ]; then
|
||||
if [ "$MOVE" = true ]; then
|
||||
hyprctl dispatch movetoworkspacesilent "$target_workspace_id"
|
||||
else
|
||||
hyprctl dispatch workspace "$target_workspace_id"
|
||||
|
Reference in New Issue
Block a user