dotfiles

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

commit bc950f8a06d4429e6da501dc0c905ed187a9cb55
parent 469ac1f4de24152f310bfc57bd8dbb8d779aa71d
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Sat,  3 Aug 2019 22:38:35 +0200

Show time format as compliant to ISO 8601

Diffstat:
Mbin/dmenu_statusbar | 6+++---
Dbin/dmenu_statusbar.sh | 23-----------------------
2 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/bin/dmenu_statusbar b/bin/dmenu_statusbar @@ -7,8 +7,8 @@ elif [ $(amixer get Master | tail -1 | awk '{ print $6 " " }' | tr -d '[' | tr - 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) +LOCALTIME=$(date -Iseconds) +UTC=$(TZ=UTC date -Iseconds) 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 @@ -18,6 +18,6 @@ else 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)" +CURRENT_SONG="$(mpc --format "[[%composer%|%artist%][ - %album%][ - %title%] | [%file%]]" 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,23 +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 ' ')" -CURRENT_SONG="$(mpc --format "[[%composer%|%artist%][ - %album%][ - %title%] | [%file%]]" 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"