Files
dots/gui/.local/lib/hyde/windowpin.sh
T
2026-09-17 20:45:06 +02:00

22 lines
671 B
Bash
Executable File

#!/usr/bin/env bash
# enable float
WinFloat=$(hyprctl -j clients | jq '.[] | select(.focusHistoryID == 0) | .floating')
WinPinned=$(hyprctl -j clients | jq '.[] | select(.focusHistoryID == 0) | .pinned')
if [ "${WinFloat}" == "false" ] && [ "${WinPinned}" == "false" ] ; then
hyprctl dispatch togglefloating active
fi
# toggle pin
hyprctl dispatch pin active
# disable float
WinFloat=$(hyprctl -j clients | jq '.[] | select(.focusHistoryID == 0) | .floating')
WinPinned=$(hyprctl -j clients | jq '.[] | select(.focusHistoryID == 0) | .pinned')
if [ "${WinFloat}" == "true" ] && [ "${WinPinned}" == "false" ] ; then
hyprctl dispatch togglefloating active
fi