dotfiles

regexghost dotfiles and scripts
git clone https://git.regexghost.com/dotfiles.git
Log | Files | Refs | README

commit ce7624dbf4bcd3d87eb95381c11b3e51e7df866b
parent 6c9c07cdcec5db792a67b679b45f1ae46d578ee9
Author: regexghost <regexghost@protonmail.com>
Date:   Fri,  8 May 2026 21:38:22 +0100

added lemonbar-xft config

Diffstat:
Ainit.sh | 6++++++
Mpanel-scripts/Makefile | 4+++-
Apanel-scripts/lemonbar-bar.sh | 111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apanel-scripts/lemonbar-runner.sh | 3+++
4 files changed, 123 insertions(+), 1 deletion(-)

diff --git a/init.sh b/init.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +cd panel-scripts; make; cd .. +cd terminal-scripts; make; cd .. +cd other; make; cd .. +cd wm-scripts; make; cd .. diff --git a/panel-scripts/Makefile b/panel-scripts/Makefile @@ -1,4 +1,4 @@ -PREFIX="${XDG_DATA_HOME}/regexghost/panel/" +PREFIX=${XDG_DATA_HOME}/regexghost/panel normal: mkdir -p ${PREFIX} @@ -8,5 +8,7 @@ normal: cp sunrise.sh ${PREFIX}/sunrise.sh cp metoffice.sh ${PREFIX}/metoffice.sh cp music.sh ${PREFIX}/music.sh + cp lemonbar-bar.sh ${PREFIX}/lemonbar-bar.sh + cp lemonbar-runner.sh ${PREFIX}/lemonbar-runner.sh gcc -o uptime uptime.c mv cpu network_up network_down uptime ${PREFIX}/ diff --git a/panel-scripts/lemonbar-bar.sh b/panel-scripts/lemonbar-bar.sh @@ -0,0 +1,111 @@ +#!/bin/sh + +echo "$$" > ~/.cache/bar_pid + +COLOUR_RESET="%{F-}" +sunset_colour="%{F#EF2F27}" +sunrise_colour="%{F#FBB829}" +network_down_colour="%{F#E02C6D}" +cpu_colour="%{F#2C78BF}" +cpu_temp_colour="%{F#EF2F27}" +memory_colour="%{F#FBB829}" +uptime_colour="%{F#519F50}" +muted_colour="%{F#EF2F27}" +volume_colour="%{F#519F50}" + +update_time () { + current_time="$(date +"%b, %a %d - %H:%M")" +} + +update_cpu () { + cpu="$(~/.local/share/regexghost/panel/cpu)%" +} + +update_network_down () { + network_down=$(~/.local/share/regexghost/panel/network_down) +} + +update_vol () { + if [ $(cat ~/.cache/muted) = "yes" ]; then + vol="${muted_colour} : Muted${COLOUR_RESET}" + else + vol="${volume_colour} : $(cat ~/.cache/volume)%%${COLOUR_RESET}" + fi +} + +update_mem () { + memory=$(free -m | awk '/Mem:/ {print $3}')MiB +} + +update_cpu_temp () { + cpu_temp=$(vcgencmd measure_temp | cut -d "=" -f 2) +} + +update_uptime () { + uptime=$(~/.local/share/regexghost/panel/uptime) +} + +update_sunrise () { + sunrise=$(~/.local/share/regexghost/panel/sunrise.sh --sunrise --blank) +} + +update_sunset () { + sunset=$(~/.local/share/regexghost/panel/sunrise.sh --sunset --blank) +} + +update_weather () { + weather="$(~/.local/share/regexghost/panel/metoffice.sh --lemonbar)" +} + +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# + +display () { + echo "%{r} ${sunset_colour}: ${sunset}${COLOUR_RESET} | ${sunrise_colour} : ${sunrise}${COLOUR_RESET} | ${weather} | ${vol} | ${network_down_colour} ${network_down}${COLOUR_RESET} | ${cpu_colour} : ${cpu}${COLOUR_RESET} | ${uptime_colour} : ${uptime}${COLOUR_RESET} | ${cpu_temp_colour}: ${cpu_temp}${COLOUR_RESET} | ${memory_colour} : ${memory}${COLOUR_RESET} | ${current_time} " +} + +update_vol +update_time +update_sunrise +update_sunset +update_weather + +i=1 + +trap "update_vol;display" "RTMIN" + +while true; do + sleep 2 & wait && { + update_network_down + update_cpu + update_mem + update_uptime + update_cpu_temp + update_vol + [ $((i%3)) -eq 0 ] && update_time + [ $((i % 180)) -eq 0 ] && update_sunset + [ $((i % 300)) -eq 0 ] && update_sunrise + [ $((i % 360)) -eq 0 ] && update_weather + i=$((i+1)) + [ $i -gt 900 ] && i=0 + display + } +done diff --git a/panel-scripts/lemonbar-runner.sh b/panel-scripts/lemonbar-runner.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +"$XDG_DATA_HOME/regexghost/panel/lemonbar-bar.sh" | lemonbar -o -0 -f "Fira Code Regular:size=11" -o -2 -f "Font Awesome 7 Free Solid:size=10" -g 1200x26+720+0 -B '#1c1b19'