correctly reflect new nmcli-info-rs info
This commit is contained in:
parent
99138177f4
commit
85c9e9f969
2 changed files with 5 additions and 5 deletions
|
|
@ -5,8 +5,8 @@
|
|||
:revealvar reveal_vpn
|
||||
:revealvar-name "reveal_vpn"
|
||||
(button :onclick 'notify-send "TODO"'
|
||||
:class "revealer-preview ${(jq(network_manager.vpn_connections, '[ .[] | select(.active=="yes") ] | length') > 0 ? 'active' : 'inactive')}"
|
||||
"${(jq(network_manager.vpn_connections, '[ .[] | select(.active=="yes") ] | length') > 0 ? '' : '')}")
|
||||
:class "revealer-preview ${(jq(network_manager.vpn_connections, '[ .[] | select(.active) ] | length') > 0 ? 'active' : 'inactive')}"
|
||||
"${(jq(network_manager.vpn_connections, '[ .[] | select(.active) ] | length') > 0 ? '' : '')}")
|
||||
(vpn_children :array "${jq(network_manager.vpn_connections,'.|sort_by(.name)')}")))
|
||||
|
||||
(defwidget vpn_children [array]
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
:space-evenly false
|
||||
:halign "center"
|
||||
(for vpn in array
|
||||
(button :onclick "nmcli connection ${( vpn.active == 'yes' ? 'down' : 'up' )} ${vpn.name}"
|
||||
:class {( vpn.active == "yes" ? 'active' : 'inactive' )}
|
||||
(button :onclick "nmcli connection ${( vpn.active ? 'down' : 'up' )} ${vpn.name}"
|
||||
:class {( vpn.active ? 'active' : 'inactive' )}
|
||||
:tooltip "${vpn.name}"
|
||||
"${( vpn.name =~ '^[Hh]ome.*' ?
|
||||
( vpn.name =~ '.*[Ff]ull.*' ? '' : '') :
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
(deflisten network_manager
|
||||
:initial '{ "network_devices": [], "vpn_connections": [] }'
|
||||
"nmcli-info-rs")
|
||||
"nmirs")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue