eww
This commit is contained in:
parent
4667653ed1
commit
d149a7704b
8 changed files with 41 additions and 117 deletions
|
|
@ -1,10 +1,17 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
xtitle -s | while read -r line ; do
|
||||
trunc=$(echo $line | cut -c-85)
|
||||
if [ -z "$line" ]; then
|
||||
out () {
|
||||
if [ -z "$1" ]; then
|
||||
echo ""
|
||||
else
|
||||
echo "(box :class \"widget title\" :halign \"center\" :valign \"center\" :vexpand true :hexpand true (label :text \"${trunc}\"))"
|
||||
echo "(box :class \"widget title\" :halign \"center\" :valign \"center\" :vexpand true :hexpand true (label :text \"$1\"))"
|
||||
fi
|
||||
}
|
||||
|
||||
init=$(hyprctl activewindow -j | jq --raw-output .title)
|
||||
out "$init"
|
||||
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}' | while read -r line ; do
|
||||
trunc=$(echo $line | cut -c-85)
|
||||
out "$trunc"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue