2019-05-05 03:18:08 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# vim: filetype=sh
|
|
|
|
|
|
|
|
VOL=$(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/')
|
|
|
|
LOCALTIME=$(date +"%Y %h %d %I:%M%p %Z")
|
2021-01-23 04:14:40 +00:00
|
|
|
#IP=$(for i in `ip r`; do echo $i; done | grep -A 1 src | tail -n1)
|
|
|
|
IP=$(getent ahosts google.com | head -n 1 | awk '{print $1}' | xargs ip route get | head -n 1 | awk '{print $7}')
|
2019-05-05 03:18:08 +00:00
|
|
|
WEATHER=$(weather fips4105192520 | grep Tempera | awk '{print $2}')
|
2021-01-23 04:14:40 +00:00
|
|
|
BAT=$(acpi -b | awk '{ print " " $5 }' | tr -d ',')
|
2019-05-05 03:18:08 +00:00
|
|
|
|
|
|
|
xsetroot -name " 🔊 $VOL | $IP | 🔋 $BAT | ${WEATHER}°F | $LOCALTIME"
|