snips/tmux_status.laptop

19 lines
449 B
Bash
Executable File

#!/bin/bash
# vim: filetype=sh
#while true; do
VOL=$(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/')
LOCALTIME=$(date +"%Y %h %d %I:%M%p %Z")
IP=$(for i in `ip r`; do echo $i; done | grep -A 1 src | tail -n1)
# WEATHER=$(weather fips4105192520 | grep Tempera | awk '{print $2}')
WEATHER=$(curl wttr.in/45.54,-122.83?format="%c%t")
BAT=$(acpi -b | awk '{ print $4 " " $5 }' | tr -d ',')
echo "$IP${WEATHER}"
#sleep 30
#done