dotfiles/scripts/smart-tab

17 lines
367 B
Plaintext
Raw Normal View History

2024-01-08 22:21:05 +01:00
#!/bin/bash
focusedClient=$(hyprctl clients -j | jq '[.[] | select(.focusHistoryID|contains(0))][0]')
if [[ -n "$focusedClient" ]]; then
clientClass=$(echo "$focusedClient" | jq '.class' )
case "$clientClass" in
kitty) hyprctl pass "" # cannot pass arbitrary keys to applications atm. abort mission
;;
d|D) exit 0
;;
*) exit 1
esac
fi