dotfiles

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

commit 1b91f341e868bc74360cecc96563b25d85d197c8
parent 6f70efd0511f47960360eb7855a721ff4c5cd2a4
Author: regexghost <dev@regexghost.com>
Date:   Thu, 28 May 2026 20:31:39 +0100

minor updates to terminal scripts

Diffstat:
Mlists/dotfiles | 3+++
Mterminal-scripts/Makefile | 1+
Mterminal-scripts/hashfolder.sh | 3++-
Mterminal-scripts/qmount.sh | 5++++-
Mterminal-scripts/rm-trash.sh | 6+++---
Mterminal-scripts/soundboard/soundboard.go | 3++-
6 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/lists/dotfiles b/lists/dotfiles @@ -31,6 +31,9 @@ ~/.config/newsraft/extract-thumbnail.sh ~/.config/newsraft/rssify.sh ~/.config/newsraft/show-image.sh +~/.config/newsraft/bbc-news.sh +~/.config/newsraft/reddit-gallery.sh +~/.config/newsraft/article.sh ~/.config/xkb/types/mytypes ~/.config/xkb/keymap/mykbd ~/.config/xkb/symbols/mysymbols diff --git a/terminal-scripts/Makefile b/terminal-scripts/Makefile @@ -19,5 +19,6 @@ normal: cd soundboard/; go1.26.2 build -o soundboard soundboard.go; mv soundboard ${BIN}/soundboard; cd .. cp tag-song.sh ${BIN}/tag-song cp download-vids.sh ${BIN}/download-vids + cp am-extract.sh ${BIN}/am-extract cp yt-data.sh ${BIN}/yt-data cp tag-music.py ${TERMINAL}/tag-music.py diff --git a/terminal-scripts/hashfolder.sh b/terminal-scripts/hashfolder.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Script to get sha256/sha512 hashes of all files in a directory +# Script to get sha256/sha512 hashes of all files in a directory if [[ "$1" == "" ]]; then echo "Usage: ./hashfolder.sh [-l] folder" @@ -10,6 +10,7 @@ fi hash_command="sha256sum" input_folder="$1" + if [[ "$1" == "-h" ]]; then echo "Usage: hashfolder [-l] folder/ (-l for sha512 instead of sha256)" elif [[ "$1" == "-l" ]]; then diff --git a/terminal-scripts/qmount.sh b/terminal-scripts/qmount.sh @@ -8,11 +8,14 @@ if [ "$1" = "mount" ]; then unmounted="$(/usr/bin/lsblk -l -n --output NAME,FSTYPE,SIZE,MOUNTPOINTS,TYPE | grep "part" | grep -v "/" | grep -v "$root_device" | tr -s " " | cut -d " " -f 1-3)" chosen_partition="$(echo "$unmounted" | fzf | cut -d " " -f 1)" + [ "$chosen_partition" = "" ] && exit chosen_mount_point="$(echo "$mount_points" | fzf | sed "s|~|$HOME|")" + [ "$chosen_mount_point" = "" ] && exit sudo mount "/dev/${chosen_partition}" "$chosen_mount_point" && notify-send "Mounted Successfully" || notify-send "Mount Failed" -elif [ "$1" = "unmount" ]; then +elif [ "$1" = "unmount" ] || [ "$1" = "umount" ]; then mounted="$(/usr/bin/lsblk -l -n --output NAME,MOUNTPOINTS | grep "/" | grep -v "$root_device" | tr -s " ")" chosen_path="$(echo "$mounted" | fzf | cut -d " " -f 2-)" + [ "$chosen_path" = "" ] && exit sudo umount "$chosen_path" && notify-send "Unmounted Successfully" || notify-send "Unmounting Failed" fi diff --git a/terminal-scripts/rm-trash.sh b/terminal-scripts/rm-trash.sh @@ -7,7 +7,7 @@ dialog="rm: Trash" if [ "$1" = "-p" ]; then shift - command="/usr/bin/rm" + command="/usr/bin/rm -rf" dialog="rm: Delete (Permanently)" else if ! which trash-put > /dev/null; then @@ -32,10 +32,10 @@ for arg; do else read -p "${dialog} ${filename} (non-empty dir) (y/N) " confirm fi - [ "$confirm" = "y" ] && "$command" -- "$filename" + [ "$confirm" = "y" ] && $command -- "$filename" continue fi read -p "${dialog} ${filename} (y/N) " confirm - [ "$confirm" = "y" ] && "$command" -- "$filename" + [ "$confirm" = "y" ] && $command -- "$filename" done diff --git a/terminal-scripts/soundboard/soundboard.go b/terminal-scripts/soundboard/soundboard.go @@ -87,7 +87,8 @@ func drawSoundboard(s tcell.Screen) { } func playSound(path string) { - cmd := exec.Command("mpv", "--no-config", "--no-resume-playback", "--force-window=no", homeDir + "/" + SOUND_LOC + "/" + path) +// cmd := exec.Command("mpv", "--no-config", "--no-resume-playback", "--force-window=no", homeDir + "/" + SOUND_LOC + "/" + path) + cmd := exec.Command("aplay", homeDir + "/" + SOUND_LOC + "/" + path) cmds = append(cmds, cmd) cmd.Start() }