commit 93d0f9de7c2bd5038d6e5aa190d0af480cf7558e
parent e27713a6daa2bc034e85eeb69e64f8b571876ce8
Author: regexghost <dev@regexghost.com>
Date: Sat, 30 May 2026 21:57:02 +0100
added network to lemonbar panel and fasd caching in bashrc
Diffstat:
5 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc
@@ -415,8 +415,17 @@ alias cdr='cd ..'
alias cdrr='cd ../..'
alias cdrrr='cd ../../..'
+export _FASD_DATA="$XDG_CACHE_HOME/fasd"
export _FASD_NOCASE=1
-eval "$(fasd --init auto)"
+fasd_cache="$XDG_CACHE_HOME/fasd-init-bash"
+if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
+ echo here
+ fasd --init posix-alias bash-hook bash-ccomp bash-ccomp-install >| "$fasd_cache"
+fi
+source "$fasd_cache"
+unset fasd_cache
+
+#eval "$(fasd --init auto)"
function do_z () {
command="fasd_cd -d"
diff --git a/jwm/.config/jwm/jwmrc b/jwm/.config/jwm/jwmrc
@@ -50,7 +50,7 @@
</Group>
<!-- Tray at the bottom. -->
- <Tray x="0" y="0" autohide="off" delay="1000" height="26" width="664">
+ <Tray x="0" y="0" autohide="off" delay="1000" height="26" width="614">
<TrayButton label="JWM">root:1</TrayButton>
<Spacer width="2"/>
diff --git a/panel-scripts/lemonbar-bar.sh b/panel-scripts/lemonbar-bar.sh
@@ -16,6 +16,8 @@ muted_colour="%{F#${RED}}"
volume_colour="%{F#${GREEN}}"
music_stopped_colour="%{F#${YELLOW}}"
music_playing_colour="%{F#${GREEN}}"
+wifi_up_colour="%{F#${GREEN}}"
+wifi_down_colour="%{F#${RED}}"
update_time () {
current_time="$(date +"%b, %a %d - %H:%M")"
@@ -37,6 +39,16 @@ update_vol () {
fi
}
+update_wifi () {
+ con="$(nmcli -t -f NAME c show --active | grep -v "^lo$" | head -c 6)"
+ if [ "$con" = "" ]; then
+ wifi="${wifi_down_colour} N/A${COLOUR_RESET}"
+
+ else
+ wifi="${wifi_up_colour} ${con}${COLOUR_RESET}"
+ fi
+}
+
update_mem () {
memory="${memory_colour} "$(free -m | awk '/Mem:/ {print $3}')MiB"${COLOUR_RESET}"
}
@@ -66,11 +78,11 @@ update_weather () {
}
update_music () {
- song="$(mocp -i | grep -e "SongTitle" -e "Artist" | tac | paste -sd "-" | sed 's/-Artist: / - /g' | sed 's/^SongTitle: //g' | head -c 18)"
+ song="$(mocp -i | grep -e "SongTitle" -e "Artist" | tac | paste -sd "-" | sed 's/-Artist: / - /g' | sed 's/^SongTitle: //g' | head -c 16)"
if [ "$song" = "" ]; then
music="${music_stopped_colour} N/A${COLOUR_RESET}"
else
- music="${music_playing_colour} ${song}..${COLOUR_RESET}"
+ music="${music_playing_colour} ${song}${COLOUR_RESET}"
fi
}
@@ -85,7 +97,6 @@ update_music () {
#
#
#
-#
#
#
#
@@ -97,12 +108,16 @@ update_music () {
#
#
#
+#
+#
+#
display () {
- echo "%{r} ${music} | ${sunset} | ${sunrise} | ${weather}| ${vol} | ${network_down} | ${cpu} | ${uptime} | ${cpu_temp} | ${memory} | ${current_time} "
+ echo "%{r} ${music} | ${sunset} | ${sunrise} | ${weather}| ${vol} | ${network_down} | ${wifi} | ${cpu} | ${uptime} | ${cpu_temp} | ${memory} | ${current_time} "
}
update_vol
+update_wifi
update_time
update_sunrise
update_sunset
@@ -123,6 +138,7 @@ while true; do
update_cpu_temp
update_vol
[ $((i%3)) -eq 0 ] && update_time
+ [ $((i%3)) -eq 0 ] && update_wifi
[ $((i%3)) -eq 0 ] && update_music
[ $((i % 180)) -eq 0 ] && update_sunset
[ $((i % 300)) -eq 0 ] && update_sunrise
diff --git a/panel-scripts/lemonbar-runner.sh b/panel-scripts/lemonbar-runner.sh
@@ -2,4 +2,4 @@
. "$XDG_CONFIG_HOME"/regexghost/current-theme.sh
-"$XDG_DATA_HOME/regexghost/panel/lemonbar-bar.sh" | lemonbar -o +1 -f "${FONT_FAMILY} Medium:size=10" -o -1 -f "Font Awesome 7 Free Solid:size=10" -g 1260x25+660+0 -B "#${BACKGROUND_BLACK}" -F "#${FOREGROUND_WHITE}"
+"$XDG_DATA_HOME/regexghost/panel/lemonbar-bar.sh" | lemonbar -o +1 -f "${FONT_FAMILY} Medium:size=10" -o -1 -f "Font Awesome 7 Free Solid:size=10" -g 1310x26+610+0 -B "#${BACKGROUND_BLACK}" -F "#${FOREGROUND_WHITE}"
diff --git a/wm-scripts/jwm-xinit.sh b/wm-scripts/jwm-xinit.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# lemonbar
-(sleep 10 && ~/.local/share/regexghost/panel/lemonbar-runner) &
+(sleep 10 && ~/.local/share/regexghost/panel/lemonbar-runner.sh) &
# Wallpaper
(sleep 8 && feh --bg-fill --no-fehbg ~/.config/regexghost/background.jpg) &