user/eww-wayland: rename to eww
This commit is contained in:
parent
438eb54cea
commit
da47e42111
7 changed files with 1 additions and 1 deletions
6
res/eww/scripts/active-workspace.sh
Executable file
6
res/eww/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:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
||||
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
||||
19
res/eww/scripts/network.sh
Executable file
19
res/eww/scripts/network.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
init=$(nmcli -t -f name,device connection show --active | grep wlp1s0 | cut -d\: -f1)
|
||||
|
||||
if [[ -z $init ]]; then
|
||||
echo Disconnected
|
||||
else
|
||||
echo $init
|
||||
fi
|
||||
|
||||
nmcli monitor | while read -r line ; do
|
||||
if [[ $line == *"is now the primary connection" ]]; then
|
||||
conn=$(echo $line | cut -d\' -f2)
|
||||
echo $conn
|
||||
fi
|
||||
if [[ $line == "There's no primary connection" ]]; then
|
||||
echo Disconnected
|
||||
fi
|
||||
done
|
||||
18
res/eww/scripts/title.sh
Executable file
18
res/eww/scripts/title.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
out () {
|
||||
if [ -z "$1" ] || [ "$1" == "null" ]; 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)
|
||||
trunc=$(echo $init | cut -c-60)
|
||||
out "$trunc"
|
||||
|
||||
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}' | while read -r line ; do
|
||||
trunc=$(echo $line | cut -c-60)
|
||||
out "$trunc"
|
||||
done
|
||||
11
res/eww/scripts/workspaces.sh
Executable file
11
res/eww/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:$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