status bar icon resizing
This commit is contained in:
parent
1a46c273f2
commit
0c1670068c
|
@ -13,7 +13,7 @@ getforecast() {
|
|||
showweather() {
|
||||
emoji="$(printf "\033[12m%s\033[10m" $(cut -d ' ' -f 1 $emojifile))"
|
||||
sed '16q;d' $weatherfile | grep -wo "[0-9]*%" | sort -rn | sed "s/^/$emoji /g;1q" | tr -d '\n'
|
||||
sed '13q;d' $weatherfile | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " \033[34m\033[0m " $1 "°","\033[31m\033[0m " $2 "°"}'
|
||||
sed '13q;d' $weatherfile | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " \033[34;11m\033[0m " $1 "°","\033[31;11m\033[0m " $2 "°"}'
|
||||
}
|
||||
getforecast
|
||||
showweather
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
big="\033[11m"
|
||||
reset="\033[10m"
|
||||
|
||||
update() {
|
||||
sum=0
|
||||
for arg; do
|
||||
|
@ -12,4 +16,4 @@ update() {
|
|||
}
|
||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||
printf "%5sB %5sB\\n" $(numfmt --to=iec $rx $tx)
|
||||
printf "$big$reset%5sB $big$reset%5sB\\n" $(numfmt --to=iec $rx $tx)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
if command -v pacman 1>/dev/null 2>&1; then
|
||||
echo -n "$(pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/ /;s/^ 0$//g")"
|
||||
echo -n "$(pacman -Qu | grep -Fcv "[ignored]" | sed "s/^//;s/^ 0$//g")"
|
||||
fi
|
||||
|
||||
if command -v apt 1>/dev/null 2>&1; then
|
||||
|
@ -11,5 +11,5 @@ if command -v apt 1>/dev/null 2>&1; then
|
|||
print="$print$i/"
|
||||
done
|
||||
|
||||
[ -n "$icon" ] && printf "$icon " && echo " $print" | sed 's/\/$//'
|
||||
[ -n "$icon" ] && printf "$icon" && echo " $print" | sed 's/\/$//'
|
||||
fi
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
big="\033[11m"
|
||||
reset="\033[10m"
|
||||
|
||||
pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 &
|
||||
[ "$(playerctl status 2>&1)" = "No players found" ] && echo ""ﱙ && exit 1
|
||||
[ "$(playerctl status 2>&1)" = "No players found" ] && echo "$bigﱙ$reset" && exit 1
|
||||
# song="$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)"
|
||||
song="$(playerctl metadata xesam:title) - $(playerctl metadata xesam:artist)"
|
||||
[ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…"
|
||||
icon=$(playerctl status | sed "s/Playing//;s/Paused//;")
|
||||
|
||||
icon="$big$(playerctl status | sed "s/Playing//;s/Paused//;")$reset"
|
||||
echo "$icon $song"
|
||||
|
|
Loading…
Reference in New Issue