28 lines
1.2 KiB
Text
28 lines
1.2 KiB
Text
(defvar reveal_vpn false)
|
|
(defwidget vpn []
|
|
(revealer-on-hover
|
|
:class "${reveal_vpn} vpn"
|
|
:revealvar reveal_vpn
|
|
:revealvar-name "reveal_vpn"
|
|
(button :onclick 'notify-send "test"'
|
|
:class "revealer-preview ${network_status.proton || network_status.homevpn ? 'active' : 'inactive'}"
|
|
{network_status.vpn ? "" : ""})
|
|
(vpn_children)))
|
|
|
|
(defwidget vpn_children []
|
|
(box :class "reveal-children"
|
|
:orientation "h"
|
|
:space-evenly false
|
|
:halign "center"
|
|
(button :onclick 'scripts/bar/nmcli-vpn "HomeVPN"'
|
|
:class {network_status.homevpn ? "active" : "inactive"}
|
|
" ${network_status.homevpn ? "" : ""}")
|
|
(button :onclick 'scripts/bar/nmcli-vpn "HomeVPN-Full"'
|
|
:class {network_status.homevpn_full ? "active" : "inactive"}
|
|
" ${network_status.homevpn ? "" : ""}")
|
|
(button :onclick 'scripts/bar/nmcli-vpn "ProtonVPN"'
|
|
:class {network_status.proton ? "active" : "inactive"}
|
|
" ${network_status.homevpn ? "" : ""}")
|
|
(button :onclick 'scripts/bar/nmcli-vpn "ProtonVPN-SC"'
|
|
:class {network_status.proton_sc ? "active" : "inactive"}
|
|
" ${network_status.proton ? "" : ""}")))
|