From 866d9c1b2f04eaa7c81ca65419ebcafe93540d4f Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 5 Jan 2021 19:00:59 +0530 Subject: merbed both lemonbars --- XMonad/baraction | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'XMonad/baraction') diff --git a/XMonad/baraction b/XMonad/baraction index 0c9d12f1..72422d83 100755 --- a/XMonad/baraction +++ b/XMonad/baraction @@ -6,20 +6,20 @@ clock() { } cpu_load() { - read cpu a b c previdle rest < /proc/stat - prevtotal=$((a+b+c+previdle)) - sleep 0.5 - read cpu a b c idle rest < /proc/stat - total=$((a+b+c+idle)) - cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) - echo -e "%{B#ff0077}%{F#FCFCFC} CPU: $cpu% %{B-}%{F-}" + read cpu a b c previdle rest < /proc/stat + prevtotal=$((a+b+c+previdle)) + sleep 0.5 + read cpu a b c idle rest < /proc/stat + total=$((a+b+c+idle)) + cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) + echo -e "%{B#ff0077}%{F#FCFCFC} CPU: $cpu% %{B-}%{F-}" } cpu_temp() { - CEL=$'\xc2\xb0C' - temp=$( cat /sys/devices/virtual/thermal/thermal_zone0/temp ) - temp=`expr $temp / 1000` - echo "%{B#135ef0}%{F#FCFCFC} TEMP: "$temp$CEL" %{B-}%{F-}" + CEL=$'\xc2\xb0C' + temp=$( cat /sys/devices/virtual/thermal/thermal_zone0/temp ) + temp=`expr $temp / 1000` + echo "%{B#135ef0}%{F#FCFCFC} TEMP: "$temp$CEL" %{B-}%{F-}" } mem_usage() { @@ -35,7 +35,12 @@ weather() { } volume() { - echo "volume" + volume_level=$(pamixer --get-volume-human) + if [ $volume_level = "muted" ]; then + echo "%{B#ef0222}%{F-} ""muted"" %{B-}%{F-}" + else + echo "%{B#ef5902}%{F#000000} VOL: $volume_level %{B-}%{F-}" + fi } s=" " # spacing between modules -- cgit v1.2.3