New backup 2026-01-03 16:45:02
This commit is contained in:
parent
4d9f3a7a47
commit
6a33ee0c0f
1 changed files with 29 additions and 14 deletions
|
|
@ -7,22 +7,37 @@
|
|||
(button :onclick 'notify-send "TODO"'
|
||||
:class "revealer-preview ${(jq(network_manager.vpns, '[ .[] | select(.active=="yes") ] | length') > 0 ? 'active' : 'inactive')}"
|
||||
{network_status.vpn ? "" : ""})
|
||||
(vpn_children)))
|
||||
(vpn_children :array "${network_manager.vpns}")))
|
||||
|
||||
(defwidget vpn_children []
|
||||
(defwidget vpn_children [array]
|
||||
(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 ? "" : ""}")))
|
||||
(for vpn in array
|
||||
(button :onclick "nmcli connection ${( vpn.active == 'yes' ? 'down' : 'up' )} ${vpn.device}"
|
||||
:class {( vpn.active == "yes" ? 'active' : 'inactive' )}
|
||||
:tooltip "${vpn.name}"
|
||||
{( vpn.name =~ '^[Hh]ome.*' ?
|
||||
( vpn.name =~ '.*[Ff]ull.*' ? '' : '') :
|
||||
( vpn.name =~ '^pia-.*' ?
|
||||
( vpn.name =~ '.*sea.*' ? '' : '' ) :
|
||||
'' )
|
||||
)}
|
||||
)
|
||||
)
|
||||
; (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 ? "" : ""}")
|
||||
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue