From 259f5665771c9697d581d7b33a68794f92d7c8fd Mon Sep 17 00:00:00 2001 From: Mid Favila Date: Mon, 5 Jul 2021 23:18:19 -0300 Subject: [PATCH] Slightly improve the portability of winlist.sh --- misc/bar.sh | 4 ++-- misc/winlist.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/bar.sh b/misc/bar.sh index 0079d29..900dc87 100755 --- a/misc/bar.sh +++ b/misc/bar.sh @@ -11,8 +11,8 @@ pwr() #Display current battery capacity and whether we're discharging or not. { x=$(cat /sys/class/power_supply/BAT1/status) if [ "${x}" = "Discharging" ] - then printf "--%s%%" "$(cat /sys/class/power_supply/BAT1/capacity)" - else printf "++%s%%" "$(cat /sys/class/power_supply/BAT1/capacity)" + then printf "%s%%--" "$(cat /sys/class/power_supply/BAT1/capacity)" + else printf "%s%%++" "$(cat /sys/class/power_supply/BAT1/capacity)" fi } diff --git a/misc/winlist.sh b/misc/winlist.sh index 25d2534..a0fb5d8 100755 --- a/misc/winlist.sh +++ b/misc/winlist.sh @@ -14,7 +14,7 @@ getname() { if [ ${x} -gt 0 ] then - sed ${x}!d /tmp/winlist.jnk|sed "s/commandante/ /g"|cut -d ' ' -f 3 + sed ${x}!d /tmp/winlist.jnk|sed "s/commandante/ /g"|sed 's/ */ /g'|cut -d '\t' -f 3 else exit fi