dotfiles

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

commit 833ff61df121d36591d2c38e9f2aa9d7889fc87a
parent bf0b472f9620a5925f933ca6ef42d47c1c43619e
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Sat, 16 Feb 2019 15:47:49 +0100

Add public ip to status bar

Diffstat:
Mbin/dmenu_statusbar.sh | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/dmenu_statusbar.sh b/bin/dmenu_statusbar.sh @@ -8,6 +8,7 @@ fi LOCALTIME=$(date +%Z%Y-%m-%dW%V%a%H:%M:%S) UTC=$(TZ=UTC date +%Z%Y-%m-%dW%V%a%H:%M:%S) IP="$(for i in `ip r`; do echo $i; done | grep -A 1 src | tail -n1)" +PUBIP="$(dig +short myip.opendns.com @resolver1.opendns.com)" if [ -d "/proc/sys/net/ipv4/conf/tun0" ] then VPN="yes" @@ -17,4 +18,4 @@ fi TEMP="$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))°C" BAT="$(acpi -b | awk '{ print $4 " " }' | tr -d ',' | tr -d ' ')" -echo -e "time=$LOCALTIME\nvol=$VOL\nip=$IP\nvpn=$VPN\ntemp=$TEMP\nbat=$BAT\nutc=$UTC" | dmenu -fn "Sans:size=11" +echo -e "time=$LOCALTIME\nvol=$VOL\nip=$IP\npubip=$PUBIP\nvpn=$VPN\ntemp=$TEMP\nbat=$BAT\nutc=$UTC" | dmenu -fn "Sans:size=11"