From a0749450f6bf66fff5637974bbce885d5a9f09ed Mon Sep 17 00:00:00 2001 From: TiynGER Date: Sat, 28 Mar 2020 23:45:20 +0100 Subject: [PATCH] no bloat statusbar --- .local/bin/statusbar/battery | 2 +- .local/bin/statusbar/internet | 6 +++--- .local/bin/statusbar/volume | 12 ++---------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery index beae402..21fb0af 100755 --- a/.local/bin/statusbar/battery +++ b/.local/bin/statusbar/battery @@ -9,4 +9,4 @@ status=$(cat /sys/class/power_supply/"$1"/status) [ "$status" = "Charging" ] && color="#ffffff" -printf "%s%s%s\n" "$(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/$/%/' ) " " ($time)" +printf "%s%s%s\n" "$(echo "$status" | sed -e "s/,//;s/Discharging/-/;s/Not Charging/X/;s/Charging/+/;s/Unknown/0/;s/Full/F/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/' ) " " ($time)" diff --git a/.local/bin/statusbar/internet b/.local/bin/statusbar/internet index 660ac46..f6bad6d 100755 --- a/.local/bin/statusbar/internet +++ b/.local/bin/statusbar/internet @@ -1,7 +1,7 @@ #!/usr/bin/env sh -[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡" +[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="S" -[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }') +[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "W", int($3 * 100 / 70) "%" }') -printf "%s %s\n" "$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/X/;s/up/L/")" diff --git a/.local/bin/statusbar/volume b/.local/bin/statusbar/volume index 73efe42..7f7b750 100755 --- a/.local/bin/statusbar/volume +++ b/.local/bin/statusbar/volume @@ -1,15 +1,7 @@ #!/bin/sh -[ "$(pulsemixer --get-mute)" = "1" ] && printf "🔇\\n" && exit +[ "$(pulsemixer --get-mute)" = "1" ] && printf "M\\n" && exit vol=$(pulsemixer --get-volume | awk '{print $1}') -if [ "$vol" -gt "70" ]; then - icon="🔊" -elif [ "$vol" -lt "30" ]; then - icon="🔈" -else - icon="🔉" -fi - -printf "%s %s%%\\n" "$icon" "$vol" +printf "%s %%\\n" "$vol"