feat: added display for wireguard and openvpn VPNs in polybar
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
52a75000c2
commit
0d1a559f81
@ -50,7 +50,7 @@ font-1 = IPAゴシック:style=Regular
|
|||||||
|
|
||||||
modules-left = date bspwm
|
modules-left = date bspwm
|
||||||
modules-center = xwindow
|
modules-center = xwindow
|
||||||
modules-right = pulseaudio memory cpu wlan eth_dock eth_internal battery
|
modules-right = wireguard openvpn pulseaudio memory cpu wlan eth_dock eth_internal battery
|
||||||
|
|
||||||
wm-restack = bspwm
|
wm-restack = bspwm
|
||||||
|
|
||||||
@ -61,6 +61,26 @@ tray-position = right
|
|||||||
tray-padding = 2
|
tray-padding = 2
|
||||||
tray-detached = false
|
tray-detached = false
|
||||||
|
|
||||||
|
[module/openvpn]
|
||||||
|
type = custom/script
|
||||||
|
exec = nmcli connection show --active | grep 'vpn' | cut -f 1 -d' '
|
||||||
|
exec-if = pgrep -x openvpn
|
||||||
|
|
||||||
|
format-prefix = "嬨 "
|
||||||
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-underline = #e481ea
|
||||||
|
label = %output:0:15:...%
|
||||||
|
|
||||||
|
[module/wireguard]
|
||||||
|
type = custom/script
|
||||||
|
exec = sudo wg | grep interface | cut -f 2 -d' ' | tr '\n' ' '
|
||||||
|
exec-if = sudo wg | grep interface
|
||||||
|
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-underline = #bdd4e7
|
||||||
|
label = %output:0:15:...%
|
||||||
|
|
||||||
[module/xwindow]
|
[module/xwindow]
|
||||||
type = internal/xwindow
|
type = internal/xwindow
|
||||||
label = %title:0:50:...%
|
label = %title:0:50:...%
|
||||||
@ -98,7 +118,7 @@ label-empty-padding = 2
|
|||||||
[module/cpu]
|
[module/cpu]
|
||||||
type = internal/cpu
|
type = internal/cpu
|
||||||
interval = 2
|
interval = 2
|
||||||
format-prefix = ""
|
format-prefix = " "
|
||||||
format-prefix-foreground = ${colors.foreground-alt}
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
format-underline = #f90000
|
format-underline = #f90000
|
||||||
label = %percentage:2%%
|
label = %percentage:2%%
|
||||||
|
Loading…
Reference in New Issue
Block a user