dotfiles

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

commit 421b7896ed925529a370bd9edd32fce19fba9745
parent 554c78530cb37b0e22ec272bdd4417664db2ef06
Author: regexghost <dev@regexghost.com>
Date:   Sun, 23 Aug 2026 19:18:40 +0100

bug fixes in panel and yt-data, head -n 1 on wifi connections, and remove escaped quotes from strings in yt-data

Diffstat:
Mpanel-scripts/lemonbar-bar.sh | 2+-
Mterminal-scripts/yt-data.sh | 8++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/panel-scripts/lemonbar-bar.sh b/panel-scripts/lemonbar-bar.sh @@ -52,7 +52,7 @@ update_vol () { } update_wifi () { - con="$(nmcli -t -f NAME c show --active | grep -v "^lo$" | string-trunc 6 ".." | sed 's/ $//g')" + con="$(nmcli -t -f NAME c show --active | grep -v "^lo$" | head -n 1 | string-trunc 6 ".." | sed 's/ $//g')" if [ "$con" = "" ]; then wifi="${wifi_down_colour} N/A${COLOUR_RESET}" diff --git a/terminal-scripts/yt-data.sh b/terminal-scripts/yt-data.sh @@ -7,10 +7,10 @@ TEMP_FILE=/tmp/yt-data.html curl -s "$url" > "$TEMP_FILE" -title="$(cat "$TEMP_FILE" | tr "}" "\n" | grep "videoDetails\":{\"videoId" | sed -nE 's/.*"title":"([^"]*).*/\1/p')" -channel="$(cat "$TEMP_FILE" | tr "}" "\n" | grep ownerProfileUrl | head -n 1 | sed -nE 's/.*https?:\/\/www.youtube.com\/[@]([^"]*).*/\1/p')" -description="$(cat "$TEMP_FILE" | tr "}" "\n" | grep "shortDescription" | head -n 1 | sed -nE 's/.*shortDescription":"([^"]*)".*/\1/p' | sed 's/\\u0026/\&/g')" -release_date="$(cat "$TEMP_FILE" | tr "}" "\n" | grep "publishDate\":{\"simpleText\"" | sed -nE 's/.*publishDate":\{"simpleText":"([^"]*).*/\1/p')" +title="$(cat "$TEMP_FILE" | tr "}" "\n" | grep "videoDetails\":{\"videoId" | sed 's/\\"//g' | sed -nE 's/.*"title":"([^"]*).*/\1/p')" +channel="$(cat "$TEMP_FILE" | tr "}" "\n" | grep ownerProfileUrl | head -n 1 | sed 's/\\"//g' | sed -nE 's/.*https?:\/\/www.youtube.com\/[@]([^"]*).*/\1/p')" +description="$(cat "$TEMP_FILE" | tr "}" "\n" | grep "shortDescription" | head -n 1 | sed 's/\\"//g' | sed -nE 's/.*shortDescription":"([^"]*)".*/\1/p' | sed 's/\\u0026/\&/g')" +release_date="$(cat "$TEMP_FILE" | tr "}" "\n" | grep "publishDate\":{\"simpleText\"" | sed 's/\\"//g' | sed -nE 's/.*publishDate":\{"simpleText":"([^"]*).*/\1/p')" [ "$description" = "" ] && description="$title" echo "$title"