Fix minor statusbar issues (#597)

* Fix: Remove trailing space from battery

* Unify spacing in disk

* Fix news

Don't display news module when there are no news.

* Use grep -F in pacpackages

* Fix torrent

Remove trailing whitespace *after* replacing newlines.

* Quote sed command
This commit is contained in:
mokulus 2020-04-24 14:44:48 +02:00 committed by GitHub
parent 349668f423
commit 5d59b3927d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -24,4 +24,4 @@ do
printf "%s%s%s%% " "$status" "$warn" "$capacity" printf "%s%s%s%% " "$status" "$warn" "$capacity"
unset warn unset warn
done | sed s/\ $/\\n/ done | sed 's/* $//'

View file

@ -16,7 +16,7 @@ esac
case "$location" in case "$location" in
"/home"* ) icon="🏠" ;; "/home"* ) icon="🏠" ;;
"/mnt"* ) icon="💾" ;; "/mnt"* ) icon="💾" ;;
*) icon="🖥 ";; *) icon="🖥";;
esac esac
printf "%s: %s\n" "$icon" "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')" printf "%s: %s\n" "$icon" "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')"

View file

@ -13,4 +13,4 @@ case $BLOCK_BUTTON in
<b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;; <b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;;
esac esac
cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ print "📰 " $1}' | sed s/^0$//g)$(cat ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/.update 2>/dev/null)" cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ print "📰 " $1}' | sed 's/^📰 0$//g')$(cat ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/.update 2>/dev/null)"

View file

@ -25,4 +25,4 @@ case $BLOCK_BUTTON in
- Middle click to show upgradable packages" ;; - Middle click to show upgradable packages" ;;
esac esac
pacman -Qu | grep -cv "\[ignored\]" | sed "s/^/📦/;s/^📦0$//g" pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/📦/;s/^📦0$//g"

View file

@ -14,7 +14,7 @@ transmission-remote -l | grep % |
s/L/🔼/g; s/L/🔼/g;
s/M/🔽/g; s/M/🔽/g;
s/N/✅/g; s/N/✅/g;
s/Z/🌱/g" | awk '{print $2, $1}' | sed -e "s/ $//g" | tr '\n' ' ' s/Z/🌱/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed 's/ $//'
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
1) $TERMINAL -e tremc ;; 1) $TERMINAL -e tremc ;;