From e73ec46ae062fe406c6eaeb9695693c1edcb0da9 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 3 Jan 2021 22:45:59 +0530 Subject: merged both lemonbars and other minor changes --- XMonad/baraction | 45 ++++++++++++++------------------------------- XMonad/xmonad.hs | 29 ++++++++++++++--------------- 2 files changed, 28 insertions(+), 46 deletions(-) diff --git a/XMonad/baraction b/XMonad/baraction index 9e39c9b5..0c9d12f1 100755 --- a/XMonad/baraction +++ b/XMonad/baraction @@ -1,15 +1,8 @@ #!/bin/zsh -COLOR1="#0d0c13" -COLOR2="#70638F" - -A0="%{B"$COLOR1"}%{F"$COLOR2"}%{B"$COLOR2"}%{F"$COLOR1"}" -A1="%{B"$COLOR2"}%{F"$COLOR1"}%{B"$COLOR1"}%{F"$COLOR2"}" -A2="%{B"$COLOR1"}%{F"$COLOR2"}%{B"$COLOR2"}%{F"$COLOR1"}" - clock() { datetime=$(date +"%d %b(%A) %H:%M") - echo $datetime + echo "%{B#6c71c4}%{F#f0f0f0} $datetime %{B-}%{F-}" } cpu_load() { @@ -19,45 +12,35 @@ cpu_load() { read cpu a b c idle rest < /proc/stat total=$((a+b+c+idle)) cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) - echo -e "CPU: $cpu%" + 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 "TEMP: " $temp$CEL -} - -root_usage() { - root=$(df -h / | awk 'NR==2 {print $4 "/" $2}') - echo "ROOT: "$root -} - -home_usage() { - home=$(df -h /home | awk 'NR==2 {print $4 "/" $2}') - echo "HOME: "$home + echo "%{B#135ef0}%{F#FCFCFC} TEMP: "$temp$CEL" %{B-}%{F-}" } mem_usage() { mem=$(free -m | grep Mem: | awk '{print$3 / $2 * 100}') - printf "MEM: %.0f %%" $mem -} - -volume() { - vol=$(pamixer --get-mute) - if [ $vol = "true" ] - then - echo "%{B#F15BB5}%{F#232627} ミュート" - fi + echo "%{B#14eea0}%{F#232627}" + printf " MEM: %.0f%% " $mem + echo "%{B-}%{F-}" } weather() { - echo "script broken" + echo "wttr.in" # echo $( hPutStrLn notXMobar x}, startupHook = myStartupHook -} `additionalKeys` myKeys +} `additionalKeys` myKeys -- cgit v1.2.3