New backup 2025-03-04 15:30:02
This commit is contained in:
parent
233739f049
commit
30a9b5d711
2 changed files with 21 additions and 4 deletions
|
@ -101,13 +101,20 @@
|
|||
(button :onclick 'sp-powermenu'
|
||||
"")))
|
||||
|
||||
(defpoll wireless_active :initial false
|
||||
:interval "1s"
|
||||
"scripts/network-status wireless")
|
||||
(defpoll wired_active :initial false
|
||||
:interval "1s"
|
||||
"scripts/network-status wired")
|
||||
(defvar reveal_network false)
|
||||
(defwidget network []
|
||||
(revealer-on-hover
|
||||
:revealvar reveal_network
|
||||
:revealvar-name "reveal_network"
|
||||
(button :onclick 'nm-connection-editor'
|
||||
{reveal_network ? "" : ""})
|
||||
:class {wireless_active || wired_active ? "active" : ""}
|
||||
"")
|
||||
(network_children)))
|
||||
|
||||
(defwidget network_children []
|
||||
|
@ -115,12 +122,13 @@
|
|||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
(button :onclick 'sp-powermenu'
|
||||
(button :onclick 'notify-send test'
|
||||
:class {wireless_active ? "active" : ""}
|
||||
"")
|
||||
(button :onclick 'sp-powermenu'
|
||||
(button :onclick 'notify-send test'
|
||||
:class {wired_active ? "active" : ""}
|
||||
"🖧")))
|
||||
|
||||
|
||||
(defvar reveal_volume false)
|
||||
(defwidget volume []
|
||||
(revealer-on-hover
|
||||
|
|
9
de/home/.config/eww/scripts/network-status
Executable file
9
de/home/.config/eww/scripts/network-status
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
network_status='false'
|
||||
|
||||
if nmcli -g TYPE connection show --active | grep -q "${1}";then
|
||||
network_status='true'
|
||||
fi
|
||||
|
||||
printf '%s' "${network_status}"
|
Loading…
Add table
Reference in a new issue