commit ced113aa7044c58d7dfa63ba028e92cbb190f671
parent 4d38e848b7a357c1ef0046fb0a29bffedd241567
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date: Mon, 17 Jun 2019 14:42:39 +0200
Add info about currently playing song
Diffstat:
3 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/bin/dmenu_statusbar b/bin/dmenu_statusbar
@@ -0,0 +1,23 @@
+#!/bin/dash
+
+if [ $(amixer get Master | tail -1 | awk '{ print $6 " " }' | tr -d '[' | tr -d ']') = 'on' ]
+then
+ VOL="$(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/')"
+elif [ $(amixer get Master | tail -1 | awk '{ print $6 " " }' | tr -d '[' | tr -d ']') = 'off' ]
+then
+ VOL="muted"
+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)"
+if [ -d "/proc/sys/net/ipv4/conf/tun0" ]
+then
+ VPN="yes"
+else
+ VPN="no"
+fi
+TEMP="$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))°C"
+BAT="$(acpi -b | awk '{ print $4 " " }' | tr -d ',' | tr -d ' ')"
+CURRENT_SONG="$(mpc --format "[%composer%|%artist%][ - %album%][ - %title%]" current)"
+
+echo "LOCALTIME = $LOCALTIME\nVOL = $VOL\nIP = $IP\nVPN = $VPN\nTEMP = $TEMP\nBAT = $BAT\nUTC = $UTC\nSONG = $CURRENT_SONG" | dmenu -p System\ Info: -l 8 -fn "Sans:size=11"
diff --git a/bin/dmenu_statusbar.sh b/bin/dmenu_statusbar.sh
@@ -1,22 +0,0 @@
-#!/bin/dash
-
-if [ $(amixer get Master | tail -1 | awk '{ print $6 " " }' | tr -d '[' | tr -d ']') = 'on' ]
-then
- VOL="$(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/')"
-elif [ $(amixer get Master | tail -1 | awk '{ print $6 " " }' | tr -d '[' | tr -d ']') = 'off' ]
-then
- VOL="muted"
-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)"
-if [ -d "/proc/sys/net/ipv4/conf/tun0" ]
-then
- VPN="yes"
-else
- VPN="no"
-fi
-TEMP="$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))°C"
-BAT="$(acpi -b | awk '{ print $4 " " }' | tr -d ',' | tr -d ' ')"
-
-echo "LOCALTIME = $LOCALTIME\nVOL = $VOL\nIP = $IP\nVPN = $VPN\nTEMP = $TEMP\nBAT = $BAT\nUTC = $UTC" | dmenu -p System\ Info: -l 8 -fn "Sans:size=11"
diff --git a/dotfiles.sh b/dotfiles.sh
@@ -85,8 +85,8 @@ echo "$GIT_REPO/bin/mutt.sh --> ~/bin/mutt.sh"
rsync -ac --progress $GIT_REPO/bin/mutt.sh ~/bin/mutt.sh
echo "$GIT_REPO/bin/top.sh --> ~/bin/top.sh"
rsync -ac --progress $GIT_REPO/bin/top.sh ~/bin/top.sh
-echo "$GIT_REPO/bin/dmenu_statusbar.sh --> ~/bin/dmenu_statusbar.sh"
-rsync -ac --progress $GIT_REPO/bin/dmenu_statusbar.sh ~/bin/dmenu_statusbar.sh
+echo "$GIT_REPO/bin/dmenu_statusbar --> ~/bin/dmenu_statusbar"
+rsync -ac --progress $GIT_REPO/bin/dmenu_statusbar ~/bin/dmenu_statusbar
echo "$GIT_REPO/bin/cowsay_battery.sh --> ~/bin/cowsay_battery.sh"
rsync -ac --progress $GIT_REPO/bin/cowsay_battery.sh ~/bin/cowsay_battery.sh
echo "$GIT_REPO/bin/cowsay_ip.sh --> ~/bin/cowsay_ip.sh"