#!/bin/bash

if hyprctl -j clients | jq -e '.[] | select(.title == "'$1'")' > /dev/null; then
    hyprctl dispatch togglespecialworkspace "$1"
else
    hyprctl dispatch exec "$2"
    hyprctl dispatch togglespecialworkspace "$1"
fi

