New backup 2025-03-03 22:45:02

This commit is contained in:
Penelope Gwen 2025-03-03 22:45:02 -08:00
parent 894bb92fe3
commit 9c2d1122d4
2 changed files with 13 additions and 1 deletions

View file

@ -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" : ""}

View 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}"