various updates

This commit is contained in:
2021-06-12 18:27:40 +02:00
parent d2a9963dad
commit 6859ef38c9
26 changed files with 87 additions and 586 deletions

View File

@ -16,6 +16,7 @@ if [ -n "$diff" ]; then
else
midnight=$(( $(date --date "$(date | sed 's/..:..:../23:59:59/; s/ PM//; s/ AM//')" +%s) + 1 ))
if [ $midnight -gt "$time_appointment" ]; then
#only print appointment if dunst-notifications are also shown -> "privacy screen"
if [ ! -f /tmp/nodunst ]; then
printf '%s %s' "$(date --date "@$time_appointment" +'%H:%M')" "$appointment"
fi

View File

@ -1,10 +1,5 @@
#!/bin/sh
if mpc status | grep -q '\[paused\]' || [ "$(mpc status | wc -l)" -eq 1 ]; then
printf '\n'
exit
fi
if [ $( mpc status | grep '\[playing\]' | wc -l ) -eq 1 ]; then
if [ "$( mpc status | grep -c '\[playing\]')" -eq 1 ]; then
full_length="$(mpc status | sed "/^volume:/d" | tac | sed -e "s/\\[paused\\].*//g;s/\\[playing\\].*//g" | tr -d '\n' | sed -e "s/$/ /g")"
#remove full directory structure if no title present and too long
if [ ${#full_length} -gt 40 ]; then
@ -12,5 +7,6 @@ if [ $( mpc status | grep '\[playing\]' | wc -l ) -eq 1 ]; then
else
echo "$full_length"
fi
exit
else
printf '\n'
fi

View File

@ -5,6 +5,7 @@
# second, gives network traffic per second.
lasttime=${XDG_CACHE_HOME:-$HOME/.cache}/nettraf_time
#lasttime="$NETTRAF_TIME"
update() {
sum=0