aboutsummaryrefslogtreecommitdiff
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
parente73ec46ae062fe406c6eaeb9695693c1edcb0da9 (diff)
merbed both lemonbars
-rwxr-xr-xXMonad/baraction29
-rw-r--r--XMonad/xmonad.hs2
2 files changed, 18 insertions, 13 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
diff --git a/XMonad/xmonad.hs b/XMonad/xmonad.hs
index 439cdd77..8adf18d3 100644
--- a/XMonad/xmonad.hs
+++ b/XMonad/xmonad.hs
@@ -46,7 +46,7 @@ import XMonad.Util.NamedScratchpad
myStartupHook :: X ()
myStartupHook = do
- spawnOnce "./baraction | lemonbar -b -g 466x21+800+0 -B '#171520' -F '#ffffff' -f 'Source Han Sans JP:size=10' -o -3 -f 'RobotoMono Nerd Font:style=Regular:size=15' -f -n 'notXMobar' -o 0"
+ spawnOnce "/home/zt/.xmonad/baraction | lemonbar -b -g 500x21+800+0 -B '#171520' -F '#ffffff' -f 'Source Han Sans JP:size=10'"
spawnOnce "nitrogen --restore"
spawnOnce "picom"
spawnOnce "deadd-notification-center"