This commit is contained in:
drake-newell 2020-05-29 15:03:40 -07:00
commit 2a6a0ba820
6 changed files with 12 additions and 11 deletions

View File

@ -22,6 +22,9 @@ cmd open ${{
audio/*) mpv --audio-display=no $f ;;
video/*) setsid mpv $f -quiet >/dev/null 2>&1 & ;;
application/pdf) setsid zathura $fx >/dev/null 2>&1 & ;;
application/epub+zip) setsid zathura $fx >/dev/null 2>&1 & ;;
application/vnd.comicbook+zip) setsid zathura $fx >/dev/null 2>&1 & ;;
application/vnd.comicbook-rar) setsid zathura $fx >/dev/null 2>&1 & ;;
*) for f in $fx; do setsid $OPENER $f >/dev/null 2>&1 & done;;
esac
}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 KiB

View File

@ -39,6 +39,6 @@ do
done < "$2"
# The last track must be done outside the loop.
echo "From $start to the end: $title"
file="$escbook/$track-$esctitle.$ext"
file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext"
echo "Splitting \"$title\"..." && ffmpeg -nostdin -y -loglevel -8 -i "$inputaudio" -ss "$start" -vn "$file" &&
echo "Tagging \"$title\"..." && tag -a "$author" -A "$booktitle" -t "$title" -n "$track" -N "$total" -d "$year" "$file"

View File

@ -10,16 +10,14 @@ case "$BLOCK_BUTTON" in
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
rxfile="${XDG_CACHE_HOME:-$HOME/.cache}/rxlog"
txfile="${XDG_CACHE_HOME:-$HOME/.cache}/txlog"
logfile="${XDG_CACHE_HOME:-$HOME/.cache}/netlog"
prevdata="$(cat "$logfile")"
rxcurrent="$(cat /sys/class/net/*/statistics/rx_bytes | paste -sd '+' | bc)"
txcurrent="$(cat /sys/class/net/*/statistics/tx_bytes | paste -sd '+' | bc)"
rxcurrent="$(($(cat /sys/class/net/*/statistics/rx_bytes | paste -sd '+')))"
txcurrent="$(($(cat /sys/class/net/*/statistics/tx_bytes | paste -sd '+')))"
printf "🔻%sKiB 🔺%sKiB\\n" \
"$(printf -- "(%s-%s)/1024\\n" "$rxcurrent" "$(cat "$rxfile")" | bc)" \
"$(printf -- "(%s-%s)/1024\\n" "$txcurrent" "$(cat "$txfile")" | bc)"
"$(((rxcurrent-${prevdata%% *})/1024))" \
"$(((txcurrent-${prevdata##* })/1024))"
# Log the current values for next run.
echo "$rxcurrent" > "$rxfile"
echo "$txcurrent" > "$txfile"
echo "$rxcurrent $txcurrent" > "$logfile"

View File

@ -1 +1 @@
../../.config/wall.png
thiemeyer_road_to_samarkand.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB