New backup 2026-01-03 14:00:01

This commit is contained in:
Penelope Gwen 2026-01-03 14:00:01 -08:00
parent 85d56ee424
commit 2b5e962b1a
4 changed files with 7 additions and 8 deletions

View file

@ -78,6 +78,7 @@
(include "modules/bar/idle_inhibit.yuck")
(include "modules/bar/volume.yuck")
(include "variables/bar/network.yuck")
(include "variables/bar/network-manager.yuck")
(include "modules/bar/network.yuck")
(include "modules/bar/vpn.yuck")
(include "variables/bar/bluetooth.yuck")

View file

@ -5,7 +5,7 @@
:revealvar reveal_network
:revealvar-name "reveal_network"
(button :onclick 'nm-connection-editor'
:class "revealer-preview ${network_status.wifi || network_status.wired ? 'active' : 'inactive'}"
:class "revealer-preview" ;${network_status.wifi || network_status.wired ? 'active' : 'inactive'}"
"󰇧")
(network_children)))

View file

@ -2,19 +2,14 @@
function ifstatus(){
# nmcli --terse -f NAME,TYPE,AUTOCONNECT,AUTOCONNECT-PRIORITY,ACTIVE,DEVICE,STATE connection show | column -t --table-columns name,type,autoconnect,priority,active,device,state -s ':' -J | jq '.' #jq -c '.'
# jq -s '.[0] * .[1]' <<<$(nmcli --terse -f DEVICE d s | column -t -n 'devices' --table-columns device -s ':' -J;nmcli --terse -f NAME c s | column -t -n 'connections' --table-columns name -s ':' -J)
jq -s '.[0] * {"vpns": [(.[1].connections[] | select((.type=="vpn") or (.type=="wireguard")))]}' <<<$( \
jq -cs '.[0] * {"vpns": [(.[1].cons[] | select((.type=="vpn") or (.type=="wireguard")))]}' <<<$( \
nmcli --terse -f DEVICE,TYPE,STATE,CONNECTION d s | column -t -n 'devices' --table-columns device,type,state,connection -s ':' -J; \
nmcli --terse -f NAME,TYPE,AUTOCONNECT,AUTOCONNECT-PRIORITY,ACTIVE,DEVICE,STATE c s | column -t -n 'connections' --table-columns name,type,autoconnect,priority,active,device,state -s ':' -J)
nmcli --terse -f NAME,TYPE,ACTIVE,DEVICE c s | column -t -n 'cons' --table-columns name,type,active,device -s ':' -J)
# [ .devices[] | select((.type=="wifi") or (.type=="ethernet")) ]
# jq '.table.[] | select(.type=="vpn")'
}
ifstatus
exit 1
ip monitor address | {
while read -r event; do
ifstatus

View file

@ -0,0 +1,3 @@
(deflisten network_manager
:initial '{ "devices": [], "vpns": [] }'
"scripts/bar/network-manager")