aboutsummaryrefslogtreecommitdiff
path: root/XMonad/baraction
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/baraction')
-rwxr-xr-xXMonad/baraction30
1 files changed, 14 insertions, 16 deletions
diff --git a/XMonad/baraction b/XMonad/baraction
index 72422d83..9cdbbbb2 100755
--- a/XMonad/baraction
+++ b/XMonad/baraction
@@ -1,8 +1,14 @@
#!/bin/zsh
+COLOR1="#130F23"
+COLOR2="#8D5BD0"
+A1="%{B"$COLOR2"}%{F"$COLOR1"}%{B"$COLOR1"}%{F-}"
+A2="%{B"$COLOR1"}%{F"$COLOR2"}%{B"$COLOR2"}%{F-}"
+
clock() {
datetime=$(date +"%d %b(%A) %H:%M")
- echo "%{B#6c71c4}%{F#f0f0f0} $datetime %{B-}%{F-}"
+ # echo "%{B#6c71c4}%{F#f0f0f0} $datetime %{B-}%{F-}"
+ echo $datetime
}
cpu_load() {
@@ -12,40 +18,32 @@ 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 "%{B#ff0077}%{F#FCFCFC} CPU: $cpu% %{B-}%{F-}"
+ echo CPU:$cpu%
}
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-}"
+ echo TEMP:$temp$CEL
}
mem_usage() {
mem=$(free -m | grep Mem: | awk '{print$3 / $2 * 100}')
- echo "%{B#14eea0}%{F#232627}"
- printf " MEM: %.0f%% " $mem
- echo "%{B-}%{F-}"
-}
-
-weather() {
- echo "wttr.in"
- # echo $(</tmp/weather_stat)
+ # echo "%{B#14eea0}%{F#232627}"
+ printf "MEM: %.0f%%" $mem
}
volume() {
volume_level=$(pamixer --get-volume-human)
if [ $volume_level = "muted" ]; then
- echo "%{B#ef0222}%{F-} ""muted"" %{B-}%{F-}"
+ echo "%{F#ff0058}VOL: $(pamixer --get-volume)%{F-}"
else
- echo "%{B#ef5902}%{F#000000} VOL: $volume_level %{B-}%{F-}"
+ echo "VOL: $volume_level"
fi
}
-s=" " # spacing between modules
-
while :; do
- echo "%{r}"$(weather)$s$(volume)$s$(cpu_temp)$s$(cpu_load)$s$(mem_usage)$s$(clock)
+ echo "%{r}"$A2$A1$(volume)$A2$(cpu_temp)$A1$(cpu_load)$A2$(mem_usage)$A1$(clock)
sleep 3
done