dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 7f8bb3444d1dba9f56631c17c2bba05b3d032810
parent 6c7167da8edb16bb4dbbc7c5ea4ff982c4f087b8
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Wed, 18 Jul 2018 02:46:12 +0200

Add notification about VPN to dwm status

Diffstat:
Mxinitrc | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/xinitrc b/xinitrc @@ -37,6 +37,12 @@ do LOCALTIME=$(TZ=Europe/Berlin date +%Z\=%Y-%m-%dW%V%a%H:%M:%S) UTC="("$(TZ=UTC date +%Z\=%Y-%m-%dW%V%a%H:%M:%S)")" IP="IP=$(for i in `ip r`; do echo $i; done | grep -A 1 src | tail -n1)" + if [ -d "/proc/sys/net/ipv4/conf/tun0" ] + then + VPN="VPN=yes" + else + VPN="VPN=no" + fi if [ $(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000)) -ge 50 ] then TEMP="Temp=$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))°C" @@ -50,7 +56,7 @@ do else BAT="" fi - xsetroot -name "$IP $VOL $BAT $TEMP $LOCALTIME $VERSION" + xsetroot -name "$IP $VPN $VOL $BAT $TEMP $LOCALTIME $VERSION" sleep 0.1s done &