1
0
Fork 0

waybar: Add custom widget to list active VPN connections

This commit is contained in:
coderkun 2021-09-12 20:46:48 +02:00
commit 69465585d3
2 changed files with 11 additions and 2 deletions

View file

@ -4,7 +4,7 @@
"height": 24,
"modules-left": ["sway/workspaces", "sway/mode"],
"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": {
"format": "<span style=\"italic\">{}</span>"
},
@ -22,8 +22,15 @@
"interval": 60,
"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": {
"format": "{}",
"format": "{}",
"max-length": 40,
"escape": true,
"interval": 60,