commit f04067201e374edb753fe81bd9a51578a487c172
parent e53052995377d760879612321ef5e75ea7d9e0cc
Author: regexghost <dev@regexghost.com>
Date: Mon, 6 Jul 2026 00:43:15 +0100
couple of new small scripts
Diffstat:
4 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/init.sh b/init.sh
@@ -3,7 +3,7 @@
set -e
# Install programs
-sudo apt install curl wget golang xorg xinit x11-xserver-utils bluetooth unzip git firefox mpv vlc tar moc fasd fonts-roboto fonts-firacode figlet jq xcompmgr picom trash-cli ncdu pulsemixer
+sudo apt install curl wget golang xorg xinit x11-xserver-utils bluetooth unzip git firefox mpv vlc tar moc fasd fonts-roboto fonts-firacode figlet jq xcompmgr picom trash-cli ncdu pulsemixer feh moc-ffmpeg-plugin keepassxc-full
# Install dotfile scripts
cd panel-scripts; make; cd ..
diff --git a/terminal-scripts/Makefile b/terminal-scripts/Makefile
@@ -31,3 +31,5 @@ normal:
mv string-trunc ${BIN}/string-trunc
cp ytdl-wrapper.sh ${BIN}/ytdl-wrapper
cp mymv.sh ${BIN}/mymv
+ cp login-bsky.sh ${BIN}/login-bsky
+ cp favs-backup.sh ${BIN}/favs-backup
diff --git a/terminal-scripts/favs-backup.sh b/terminal-scripts/favs-backup.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+# Backup and restore ~/Music/Favourites
+
+if [[ "$1" == "restore" ]]; then
+ if [ -d "$HOME/Music/Favourites" ]; then
+ cp -r "$HOME/Music/Favourites/" /tmp/favourites-backup
+ rm -rf "$HOME/Music/Favourites"
+ fi
+ inputFile="$2"
+ oldIFS="$IFS"
+ IFS=$'\n'
+ lines=( $(cat "$inputFile") )
+ IFS="$oldIFS"
+ for line in "${lines[@]}"; do
+ if ! [[ "$line" == *".m4a" ]]; then
+ mkdir "$HOME/Music/${line}"
+ continue
+ fi
+ realFile="$(echo "$line" | sed 's/Favourites\///g')"
+ ln -sf "$HOME/Music/${realFile}" "$HOME/Music/${line}"
+ done
+elif [[ "$1" == "backup" ]]; then
+ outputFile="$2"
+ cp "$outputFile" /tmp/backup-file
+ find "$HOME/Music/Favourites" > "$outputFile"
+fi
diff --git a/terminal-scripts/login-bsky.sh b/terminal-scripts/login-bsky.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Quick script to login to bsky cli without saving password to shell history
+
+read -p "Enter handle: " handle
+read -p "Enter password: " password
+bsky login "$handle" "$password"