Give EWW scripts proper extensions
This commit is contained in:
parent
448bdfc231
commit
287df92d65
13 changed files with 11 additions and 11 deletions
15
eww/scripts/get-workspaces.sh
Executable file
15
eww/scripts/get-workspaces.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/env sh
|
||||
|
||||
# Modified from: https://wiki.hyprland.org/Useful-Utilities/Status-Bars/#eww
|
||||
|
||||
spaces (){
|
||||
ACTIVE_ID="$(hyprctl activeworkspace -j | jq -Mc '.id')"
|
||||
WORKSPACES="$(hyprctl workspaces -j | jq -Mc 'sort_by(.id)')"
|
||||
FIRSTS="$(echo "$WORKSPACES" | jq -Mc 'group_by(.monitor) | map(.[0].id)')"
|
||||
echo "$WORKSPACES" | jq -Mc 'map(. as $ws | {id, name, monitor, active: (.id == '"$ACTIVE_ID"'), first: any('"$FIRSTS"' | .[] == $ws.id)})'
|
||||
}
|
||||
|
||||
spaces
|
||||
socat -u UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r _line; do
|
||||
spaces
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue