aboutsummaryrefslogtreecommitdiff
path: root/XMonad/baraction
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2021-01-05 19:00:59 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2021-01-05 19:00:59 +0530
commit866d9c1b2f04eaa7c81ca65419ebcafe93540d4f (patch)
tree674691e546bd460ced09b3376f1fdd8a35e52d9a /XMonad/baraction
parente73ec46ae062fe406c6eaeb9695693c1edcb0da9 (diff)
merbed both lemonbars
Diffstat (limited to 'XMonad/baraction')
-rwxr-xr-xXMonad/baraction29
1 files changed, 17 insertions, 12 deletions
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