Created
May 7, 2025 07:03
-
-
Save icyleaf/64956c7a87844e748a28b9e58290aaa0 to your computer and use it in GitHub Desktop.
exec, $scrPath/workspace-switch.sh switch/movie/movesilent 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
operation=$1 | |
workspace=$2 | |
monitor_id=$(hyprctl activeworkspace | grep "monitorID" | awk '{print $2}') | |
workspace_id=$(($monitor_id * 10 + $workspace)) | |
echo "Final Operation: $operation to $workspace_id" | |
if [[ $operation == "switch" ]]; then | |
hyprctl dispatch moveworkspacetomonitor $workspace_id $monitor_id; | |
hyprctl dispatch workspace $workspace_id; | |
fi | |
if [[ $operation == "movesilent" ]]; then | |
hyprctl dispatch moveworkspacetomonitor $workspace_id $monitor_id; | |
hyprctl dispatch movetoworkspacesilent $workspace_id; | |
fi | |
if [[ $operation == "move" ]]; then | |
hyprctl dispatch moveworkspacetomonitor $workspace_id $monitor_id; | |
hyprctl dispatch movetoworkspace $workspace_id; | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment