#!/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}