DashNix/eww_desktop/scripts/current_name

9 lines
389 B
Bash
Executable file

#!/bin/bash
currentName() {
win=$(hyprctl activewindow | grep class | awk -F ':' '{print $2}' | tr -d ' ')
echo "(box :class \"module_app_text\" :space-evenly \"false\" :orientation \"h\" :spacing \"3\" (label :text \"$win\"))"
}
currentName
tail -f /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | grep -E --line-buffered "focus to surface" | while read -r; do
currentName
done