commit d1d3d0e08856af37970564209de623479a659106
parent 6b610205e29e016e7c90915cdd3829b0ba6f523d
Author: regexghost <dev@regexghost.com>
Date: Thu, 20 Aug 2026 18:47:09 +0100
qmount use echo instead of notify-send, reddit-gallery.sh need to use gallery-dl as the old method doesn't seem to work anymore
Diffstat:
2 files changed, 6 insertions(+), 19 deletions(-)
diff --git a/dotfiles/.config/newsraft/reddit-gallery.sh b/dotfiles/.config/newsraft/reddit-gallery.sh
@@ -1,31 +1,18 @@
#!/bin/sh
-# Reddit gallery link to actual, full size image links
+# Reddit gallery link viewer
-USER_AGENT="NetSurf/3.10 (Linux)"
OUTPUT_FOLDER="/tmp/reddit_images"
[ -d "$OUTPUT_FOLDER" ] && rm -rf "/tmp/reddit_images"
mkdir -p "$OUTPUT_FOLDER"
-notify-send "Extracting"
-
-url="$1"
-id="$(echo "$url" | cut -d "/" -f 5)"
-
-curl -s -L --user-agent "$USER_AGENT" "https://old.reddit.com/${id}" > /tmp/reddit_gallery.html
-
-links="$(cat /tmp/reddit_gallery.html | pup 'a[class="may-blank gallery-item-thumbnail-link"]' | grep gallery-item-thumbnail-link | sed -nE 's/.*(https:\/\/[^"]*).*/\1/p' | xmlstarlet unesc | grep -v ".gif$")"
+cd "$OUTPUT_FOLDER"
notify-send "Downloading"
-for link in $links; do
- wget -P "$OUTPUT_FOLDER" "$link" &
-done
-wait
-
-cd "$OUTPUT_FOLDER"; rename 's/[?].*//g' *
+gallery-dl "$1"
notify-send "Displaying"
-${IMAGE_VIEWER:-feh} "$OUTPUT_FOLDER"/*
+${IMAGE_VIEWER:-feh} "$OUTPUT_FOLDER"/*/*/*/
diff --git a/terminal-scripts/qmount.sh b/terminal-scripts/qmount.sh
@@ -24,7 +24,7 @@ mount () {
args="-o rw,users,umask=000"
fi
- sudo mount $args "/dev/${chosen_partition}" "$chosen_mount_point" && notify-send "Mounted Successfully" || notify-send "Mount Failed"
+ sudo mount $args "/dev/${chosen_partition}" "$chosen_mount_point" && echo "Mounted Successfully" || echo "Mount Failed"
}
unmount () {
@@ -35,7 +35,7 @@ unmount () {
chosen_path="$(echo "$mounted" | fzf | cut -d " " -f 2-)"
[ "$chosen_path" = "" ] && exit
- sudo umount "$chosen_path" && notify-send "Unmounted Successfully" || notify-send "Unmounting Failed"
+ sudo umount "$chosen_path" && echo "Unmounted Successfully" || echo "Unmounting Failed"
}
case "$1" in