aboutsummaryrefslogtreecommitdiff
path: root/.config/lemonblocks
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2021-04-08 16:41:50 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2021-04-08 16:41:50 +0530
commit6e9091e26593a145e6350a01bad53f26acea75a1 (patch)
tree2d841fa503d20560d2f6e57a33c8ded65d817be8 /.config/lemonblocks
parentf94c1202afce479d61ff833d8cd05fe417c98288 (diff)
pushing all the dotfiles again
Diffstat (limited to '.config/lemonblocks')
-rw-r--r--.config/lemonblocks/config.txt5
-rwxr-xr-x.config/lemonblocks/modules/cpu_load.sh10
-rwxr-xr-x.config/lemonblocks/modules/cpu_temp.sh5
-rwxr-xr-x.config/lemonblocks/modules/date.sh3
-rwxr-xr-x.config/lemonblocks/modules/mem_usage.sh4
-rwxr-xr-x.config/lemonblocks/modules/volume.sh9
-rwxr-xr-x.config/lemonblocks/start.sh41
7 files changed, 77 insertions, 0 deletions
diff --git a/.config/lemonblocks/config.txt b/.config/lemonblocks/config.txt
new file mode 100644
index 0000000..62991c3
--- /dev/null
+++ b/.config/lemonblocks/config.txt
@@ -0,0 +1,5 @@
+0,5,NULL,/usr/bin/lbscripts/volume.sh,r,NULL,130F23,fe6c69,pamixer -t; killall lemonblocks -5,NULL,pavucontrol && killall lemonblocks -5,pamixer -i 5; killall lemonblocks -5,pamixer -d 5; killall lemonblocks -5, ,
+5,4,NULL,/usr/bin/lbscripts/cpu_temp.sh,r,NULL,130F23,1045cc,NULL,NULL,NULL,NULL,NULL, ,
+5,3,NULL,/usr/bin/lbscripts/cpu_load.sh,r,NULL,130F23,7410cc,st -e htop,NULL,NULL,NULL,NULL, ,
+5,2,NULL,/usr/bin/lbscripts/mem_usage.sh,r,NULL,130F23,10cc8e,NULL,NULL,NULL,NULL,NULL, ,
+30,1,NULL,/usr/bin/lbscripts/date.sh,r,NULL,130F23,6C71C4,NULL,NULL,NULL,NULL,NULL, ,
diff --git a/.config/lemonblocks/modules/cpu_load.sh b/.config/lemonblocks/modules/cpu_load.sh
new file mode 100755
index 0000000..1a677a9
--- /dev/null
+++ b/.config/lemonblocks/modules/cpu_load.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+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) ))
+
+printf " CPU:%s%% " $cpu
diff --git a/.config/lemonblocks/modules/cpu_temp.sh b/.config/lemonblocks/modules/cpu_temp.sh
new file mode 100755
index 0000000..a5286ad
--- /dev/null
+++ b/.config/lemonblocks/modules/cpu_temp.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+CEL=$'\xc2\xb0C'
+temp=$( cat /sys/devices/virtual/thermal/thermal_zone0/temp )
+temp=`expr $temp / 1000`
+printf " TEMP:$temp$CEL "
diff --git a/.config/lemonblocks/modules/date.sh b/.config/lemonblocks/modules/date.sh
new file mode 100755
index 0000000..dcd0681
--- /dev/null
+++ b/.config/lemonblocks/modules/date.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+date=$(date +"%d %b(%A) %H:%M")
+printf " $date "
diff --git a/.config/lemonblocks/modules/mem_usage.sh b/.config/lemonblocks/modules/mem_usage.sh
new file mode 100755
index 0000000..6b939eb
--- /dev/null
+++ b/.config/lemonblocks/modules/mem_usage.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+mem=$(free -m | grep Mem: | awk '{print$3 / $2 * 100}')
+printf " MEM: %.0f%% " $mem
diff --git a/.config/lemonblocks/modules/volume.sh b/.config/lemonblocks/modules/volume.sh
new file mode 100755
index 0000000..a0843dd
--- /dev/null
+++ b/.config/lemonblocks/modules/volume.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+printf " VOL:$(pamixer --get-volume-human)% "
+# if [ $volume_level == "muted" ]; then
+ # printf "%{F#ff0058}VOL: $(pamixer --get-volume)%{F-}"
+# else
+ # printf "VOL: $volume_level"
+# fi
+
diff --git a/.config/lemonblocks/start.sh b/.config/lemonblocks/start.sh
new file mode 100755
index 0000000..0537b89
--- /dev/null
+++ b/.config/lemonblocks/start.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+CLICKABLE_AREAS=8
+PANEL_WIDTH=566
+PANEL_HEIGHT=21
+PANEL_HORIZONTAL_OFFSET=800
+PANEL_VERTICAL_OFFSET=0
+PANEL_FONT="Source Han Sans JP:size=10"
+PANEL_ICON_FONT="RobotoMono Nerd Font:style=Regular:size=15"
+COLOR_DEFAULT_FG="#FFFFFF"
+COLOR_DEFAULT_BG="#171520"
+UNDERLINE_HEIGHT=3
+PANEL_WM_NAME="lemon"
+
+# Kill potential instances of lemonblocks
+#killall "lemonbar"
+killall "lemonblocks"
+
+# Make sure the named pipe already exists
+mkfifo /tmp/lemonblockspipe
+
+# start xmonad status lemonbar
+# Start lemonbar
+cat "/tmp/lemonblockspipe" | lemonbar -b -a "$CLICKABLE_AREAS" \
+ -g "$PANEL_WIDTH"x"$PANEL_HEIGHT"+"$PANEL_HORIZONTAL_OFFSET"+"$PANEL_VERTICAL_OFFSET" \
+ -o -3 -f "$PANEL_FONT" -o 0 -f "$PANEL_ICON_FONT" -F "$COLOR_DEFAULT_FG" -B "$COLOR_DEFAULT_BG" \
+ -u "$UNDERLINE_HEIGHT" -n "$PANEL_WM_NAME" | bash &
+
+sleep 0.5
+
+# Make sure lemonbar is hidden below a fullscreen window
+## Bspwm
+# wid=$(xdo id -a "$PANEL_WM_NAME")
+# xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" "$wid"
+
+if [ $# -eq 0 ]
+then
+ lemonblocks
+else
+ ./bin/lemonblocks
+fi