Wireguard script.

This commit is contained in:
Bartek Stalewski 2023-11-05 21:59:54 +01:00
parent b0cf9135d7
commit bd710e65ff
2 changed files with 13 additions and 0 deletions

View File

@ -178,6 +178,12 @@ screens = [
update_interval=1,
cmd="sb-volume",
),
widget.GenPollCommand(
background='#770000',
foreground='#feffff',
update_interval=1,
cmd="sb-wireguard",
),
widget.Wlan(
background='#770000',
foreground='#feffff',

7
_gui/_scripts/sb-wireguard Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
interface=$(ip a | grep 'wg[0-9]:' | awk -F': ' '{print $2}')
case $interface in
wg0) printf 'wireguard running' ;;
wg1) printf 'wireguard running (all traffic)' ;;
esac