Files
illogical-impulse/early/.config/eww/scripts/winnumbers
T
2024-02-22 15:35:06 +07:00

30 lines
648 B
Bash
Executable File

#!/usr/bin/bash
geticonlist() {
classes=$(hyprctl clients | grep -e 'class: ' | sed 's/class: Code/class: code/' | sed 's/\tclass: //')
addresses=$(hyprctl clients | grep -e ' -> ')
# echo "$classes"
IFS=$'\n'
classarr=($(echo "$classes"))
printf '['
for i in "${!classarr[@]}"; do
if [ $i -ne 0 ]; then
printf ', '
fi
printf "$i"
done
echo ']'
}
geticonlist
if [ "$1" == "--once" ]; then
exit 0
else
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "window>>" | while read -r line; do
geticonlist
done
fi