making eww work more like waybar workspaces

This commit is contained in:
Chris Cochrun 2023-10-24 06:17:59 -05:00
parent 789fa95abf
commit a32286fc67
4 changed files with 25 additions and 18 deletions

View file

@ -1,5 +1,9 @@
#!/usr/bin/env bash
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
active (){
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
}
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
active
done
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'

View file

@ -7,5 +7,5 @@ spaces (){
spaces
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
spaces
hyprctl workspaces -j
done