New backup 2026-01-03 14:00:01
This commit is contained in:
parent
85d56ee424
commit
2b5e962b1a
4 changed files with 7 additions and 8 deletions
|
|
@ -78,6 +78,7 @@
|
||||||
(include "modules/bar/idle_inhibit.yuck")
|
(include "modules/bar/idle_inhibit.yuck")
|
||||||
(include "modules/bar/volume.yuck")
|
(include "modules/bar/volume.yuck")
|
||||||
(include "variables/bar/network.yuck")
|
(include "variables/bar/network.yuck")
|
||||||
|
(include "variables/bar/network-manager.yuck")
|
||||||
(include "modules/bar/network.yuck")
|
(include "modules/bar/network.yuck")
|
||||||
(include "modules/bar/vpn.yuck")
|
(include "modules/bar/vpn.yuck")
|
||||||
(include "variables/bar/bluetooth.yuck")
|
(include "variables/bar/bluetooth.yuck")
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
:revealvar reveal_network
|
:revealvar reveal_network
|
||||||
:revealvar-name "reveal_network"
|
:revealvar-name "reveal_network"
|
||||||
(button :onclick 'nm-connection-editor'
|
(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)))
|
(network_children)))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,19 +2,14 @@
|
||||||
|
|
||||||
|
|
||||||
function ifstatus(){
|
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 -cs '.[0] * {"vpns": [(.[1].cons[] | select((.type=="vpn") or (.type=="wireguard")))]}' <<<$( \
|
||||||
# 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")))]}' <<<$( \
|
|
||||||
nmcli --terse -f DEVICE,TYPE,STATE,CONNECTION d s | column -t -n 'devices' --table-columns device,type,state,connection -s ':' -J; \
|
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")) ]
|
# [ .devices[] | select((.type=="wifi") or (.type=="ethernet")) ]
|
||||||
# jq '.table.[] | select(.type=="vpn")'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ifstatus
|
ifstatus
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
ip monitor address | {
|
ip monitor address | {
|
||||||
while read -r event; do
|
while read -r event; do
|
||||||
ifstatus
|
ifstatus
|
||||||
|
|
|
||||||
3
de/home/.config/eww/variables/bar/network-manager.yuck
Normal file
3
de/home/.config/eww/variables/bar/network-manager.yuck
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
(deflisten network_manager
|
||||||
|
:initial '{ "devices": [], "vpns": [] }'
|
||||||
|
"scripts/bar/network-manager")
|
||||||
Loading…
Add table
Reference in a new issue