33 lines
1 KiB
Text
33 lines
1 KiB
Text
(defpoll vpn_active :initial false
|
|
:interval "60s"
|
|
"scripts/bar/vpn-status")
|
|
|
|
(defvar reveal_vpn false)
|
|
(defwidget vpn []
|
|
(revealer-on-hover
|
|
:revealvar reveal_vpn
|
|
:revealvar-name "reveal_vpn"
|
|
(button :onclick 'notify-send "test"'
|
|
:class {vpn_active ? "active" : ""}
|
|
{vpn_active ? "" : ""})
|
|
(vpn_children)))
|
|
|
|
(defpoll home_vpn_active :initial false
|
|
:interval "60s"
|
|
"scripts/bar/vpn-status Home")
|
|
|
|
(defpoll proton_vpn_active :initial false
|
|
:interval "60s"
|
|
"scripts/bar/vpn-status Proton")
|
|
|
|
(defwidget vpn_children []
|
|
(box :class "reveal_children"
|
|
:orientation "h"
|
|
:space-evenly false
|
|
:halign "center"
|
|
(button :onclick 'scripts/bar/nmcli-vpn "HomeVPN"'
|
|
:class {home_vpn_active ? "active" : ""}
|
|
{home_vpn_active ? "" : ""})
|
|
(button :onclick 'scripts/bar/nmcli-vpn "Proton SE-NL"'
|
|
:class {proton_vpn_active ? "active" : ""}
|
|
{proton_vpn_active ? "" : ""})))
|