summaryrefslogtreecommitdiff
path: root/toggles/specialws.fish
blob: 01fcfd7f149ce0319685497bc52dd1ef7f271409 (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env fish

if ! hyprctl workspaces -j | jq -e 'first(.[] | select(.name == "special:special"))'
    set activews (hyprctl activewindow -j | jq -r '.workspace.name')
    string match -r -- '^special:' $activews && set togglews (string sub -s 9 $activews) || set togglews special
else
    set togglews special
end

hyprctl dispatch togglespecialworkspace $togglews