Slightly improve the portability of winlist.sh
This commit is contained in:
parent
d28689133d
commit
259f566577
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user