forked from Shinonome/dots-hyprland
stuff
This commit is contained in:
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/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
|
||||
|
||||
Reference in New Issue
Block a user