From 42050220b5adee48aa324d0c8892a075a9201400 Mon Sep 17 00:00:00 2001 From: tiyn Date: Sat, 14 Oct 2023 03:17:34 +0200 Subject: [PATCH] statusbar: matched % display between internet and volume scripts --- .local/bin/tools/statusbar/internet | 2 +- .local/bin/tools/statusbar/volume | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/tools/statusbar/internet b/.local/bin/tools/statusbar/internet index cc7e796..0d09df0 100755 --- a/.local/bin/tools/statusbar/internet +++ b/.local/bin/tools/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=" -%" [ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "", int($3 * 100 / 70) "%" }') diff --git a/.local/bin/tools/statusbar/volume b/.local/bin/tools/statusbar/volume index aff18c2..2c07574 100755 --- a/.local/bin/tools/statusbar/volume +++ b/.local/bin/tools/statusbar/volume @@ -1,6 +1,6 @@ #!/bin/sh -vol=$(pulsemixer --get-volume | awk '{print $1}') +vol="$(pulsemixer --get-volume | awk '{print $1}')" if [ "$vol" -eq "0" ]; then icon="" @@ -10,7 +10,7 @@ else icon="" fi -[ "$(pulsemixer --get-mute)" = "1" ] && icon="" && vol="M" +[ "$(pulsemixer --get-mute)" = "1" ] && icon="" && vol="-" if amixer get Capture | tail -2 | grep -q '\[on\]'; then mic=""