dotfiles/eggs/hypr/scripts/specia-workspace-movment-toggle.sh

16 lines
558 B
Bash
Executable File

#!/usr/bin/env bash
# Args: $1 = special workspace name
any_special_workspace=$(hyprctl monitors -j)
for (( i = 0; i < $(jq '. | length' <<< "$any_special_workspace"); i++ )); do
echo "$(jq ".[$i].specialWorkspace.name" <<< $any_special_workspace)"
echo "\"special:${1}\""
if [ "$(jq ".[$i].specialWorkspace.name" <<< $any_special_workspace)" = "\"special:${1}\"" ] ; then
hyprctl dispatch movetoworkspacesilent $(hyprctl activeworkspace -j | jq '.id')
exit
fi
done
#else
hyprctl dispatch movetoworkspacesilent special:${1}