New backup 2025-03-03 22:45:02
This commit is contained in:
parent
894bb92fe3
commit
9c2d1122d4
2 changed files with 13 additions and 1 deletions
|
@ -43,7 +43,9 @@
|
|||
:class {inhibit_active ? "active" : ""}
|
||||
{inhibit_active ? "" : ""}))
|
||||
|
||||
(defvar vpn_active false)
|
||||
(defpoll vpn_active :initial false
|
||||
:interval "5s"
|
||||
"scripts/vpn-status")
|
||||
(defwidget vpn []
|
||||
(button :onclick 'notify-send "test"'
|
||||
:class {vpn_active ? "active" : ""}
|
||||
|
|
10
de/home/.config/eww/scripts/vpn-status
Executable file
10
de/home/.config/eww/scripts/vpn-status
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
nm_active=`nmcli con show --active`
|
||||
vpn_active='false'
|
||||
|
||||
if echo "${nm_active}" | grep -q 'vpn' || echo "${nm_active}" | grep -q 'wireguard';then
|
||||
vpn_active='true'
|
||||
fi
|
||||
|
||||
printf '%s' "${vpn_active}"
|
Loading…
Add table
Reference in a new issue