treewide: preliminary Wayland!
This commit is contained in:
parent
67798937bb
commit
2602b8bc1c
11 changed files with 197 additions and 11 deletions
6
res/eww-wayland/scripts/active-workspace.sh
Executable file
6
res/eww-wayland/scripts/active-workspace.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
||||
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
||||
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
||||
17
res/eww-wayland/scripts/title.sh
Executable file
17
res/eww-wayland/scripts/title.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
out () {
|
||||
if [ -z "$1" ]; then
|
||||
echo ""
|
||||
else
|
||||
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
|
||||
11
res/eww-wayland/scripts/workspaces.sh
Executable file
11
res/eww-wayland/scripts/workspaces.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
spaces (){
|
||||
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
|
||||
seq 1 10 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
|
||||
}
|
||||
|
||||
spaces
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
||||
spaces
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue