mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-07-01 19:49:25 +00:00
First commit
This commit is contained in:
12
.config/polybar/scripts/check_vpn
Executable file
12
.config/polybar/scripts/check_vpn
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
OUTPUT=""
|
||||
|
||||
openvpn=$(pgrep -c openvpn$)
|
||||
[[ $openvpn -gt 0 ]] && OUTPUT=$(eval printf "%.0s" {1..$openvpn})
|
||||
|
||||
openfortivpn=$(pgrep -c openfortivpn$)
|
||||
[[ $openfortivpn -gt 0 ]] && OUTPUT=${OUTPUT}$(eval printf '%.0s' {1..$openfortivpn})
|
||||
|
||||
echo $OUTPUT | sed -e 's/\(.\)/\1 /g'
|
||||
|
Reference in New Issue
Block a user