Added wayland, hyprland and eww
This commit is contained in:
6
config/eww/scripts/get-active-workspace.sh
Normal file
6
config/eww/scripts/get-active-workspace.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
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}'
|
||||
7
config/eww/scripts/get-volume-info.sh
Normal file
7
config/eww/scripts/get-volume-info.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/env bash
|
||||
|
||||
amixer sget Master | \
|
||||
grep 'Left:' | \
|
||||
sed -e 's/[^[]*\[\([0-9]*\)%\][^[]\[\(\w*\)\]/{"volume": \1, "muted": \2}/' \
|
||||
-e 's/on/false/' \
|
||||
-e 's/off/true/'
|
||||
8
config/eww/scripts/get-wifi-info.sh
Normal file
8
config/eww/scripts/get-wifi-info.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/env bash
|
||||
|
||||
CONN_INFO=$(nmcli -g in-use,ssid,signal dev wifi list | \
|
||||
grep "^*" | \
|
||||
sed -e 's/\*:\([^:]*\):\([0-9]*\)/ ,"ssid": "\1", "signal": \2/')
|
||||
CONNECTED=$([[ -z $CONN_INFO ]] && echo "false" || echo "true")
|
||||
|
||||
echo "{\"connected\": \"$CONNECTED\"$CONN_INFO}"
|
||||
11
config/eww/scripts/get-workspaces.sh
Normal file
11
config/eww/scripts/get-workspaces.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/env bash
|
||||
|
||||
spaces (){
|
||||
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
|
||||
seq 1 6 | 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
|
||||
Reference in New Issue
Block a user