From 02eb9e6abbb0313b5fcc8b309dc2a13fe2f3f879 Mon Sep 17 00:00:00 2001 From: b8000h Date: Mon, 9 Sep 2019 22:31:57 +0800 Subject: [PATCH] added \n to printf (forced by i3blocks 1.5) --- .local/bin/statusbar/battery | 2 +- .local/bin/statusbar/disk | 2 +- .local/bin/statusbar/internet | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery index 208bc51b..d5a91370 100755 --- a/.local/bin/statusbar/battery +++ b/.local/bin/statusbar/battery @@ -29,4 +29,4 @@ fi [ "$status" = "Charging" ] && color="#ffffff" -printf "%s%s%s" "$color" "$(echo "$status" | sed -e "s/,//;s/Discharging/🔋/;s/Not Charging/🛑/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" +printf "%s%s%s\n" "$color" "$(echo "$status" | sed -e "s/,//;s/Discharging/🔋/;s/Not Charging/🛑/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" diff --git a/.local/bin/statusbar/disk b/.local/bin/statusbar/disk index 3d2c2e45..d9dedf3f 100755 --- a/.local/bin/statusbar/disk +++ b/.local/bin/statusbar/disk @@ -15,4 +15,4 @@ case $BLOCK_BUTTON in - Click to show all disk info." ;; esac -printf "%s: %s" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')" +printf "%s: %s\n" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')" diff --git a/.local/bin/statusbar/internet b/.local/bin/statusbar/internet index 3a41f55d..86746589 100755 --- a/.local/bin/statusbar/internet +++ b/.local/bin/statusbar/internet @@ -14,4 +14,4 @@ esac [ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }') -printf "%s %s" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")" +printf "%s %s\n" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"