waybar: Add custom widget to list active VPN connections
This commit is contained in:
parent
666114e38a
commit
69465585d3
2 changed files with 11 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
"height": 24,
|
"height": 24,
|
||||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
"modules-left": ["sway/workspaces", "sway/mode"],
|
||||||
"modules-center": ["cpu", "memory", "tray"],
|
"modules-center": ["cpu", "memory", "tray"],
|
||||||
"modules-right": ["custom/timew", "clock#time", "clock#date"],
|
"modules-right": ["custom/vpn", "custom/timew", "clock#time", "clock#date"],
|
||||||
"sway/mode": {
|
"sway/mode": {
|
||||||
"format": "<span style=\"italic\">{}</span>"
|
"format": "<span style=\"italic\">{}</span>"
|
||||||
},
|
},
|
||||||
|
|
@ -22,8 +22,15 @@
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"format": "{: %d.%m.%Y}"
|
"format": "{: %d.%m.%Y}"
|
||||||
},
|
},
|
||||||
|
"custom/vpn": {
|
||||||
|
"format": " {}",
|
||||||
|
"max-length": 60,
|
||||||
|
"escape": true,
|
||||||
|
"interval": 60,
|
||||||
|
"exec": "nmcli -f name,type --terse connection show --active | grep vpn | cut -d : -f 1 | awk -v d=', ' '{s=(NR==1?s:s d)$0}END{print s}' -"
|
||||||
|
},
|
||||||
"custom/timew": {
|
"custom/timew": {
|
||||||
"format": "{}",
|
"format": " {}",
|
||||||
"max-length": 40,
|
"max-length": 40,
|
||||||
"escape": true,
|
"escape": true,
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@ window#waybar.hidden {
|
||||||
#network,
|
#network,
|
||||||
#pulseaudio,
|
#pulseaudio,
|
||||||
#custom-media,
|
#custom-media,
|
||||||
|
#custom-vpn,
|
||||||
|
#custom-timew,
|
||||||
#tray,
|
#tray,
|
||||||
#mode,
|
#mode,
|
||||||
#idle_inhibitor,
|
#idle_inhibitor,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue