Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions redyt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ configdir="${XDG_CONFIG_HOME:-$HOME/.config}/redyt"
# if it does not exist
defaultsub="linuxmemes"

# If subbreddit.txt does not exist, create it to prevent
# If subreddit.txt does not exist, create it to prevent
# the program from not functioning properly
[ ! -f "$configdir/subreddit.txt" ] && echo "$defaultsub" >> "$configdir/subreddit.txt"

Expand Down Expand Up @@ -46,7 +46,8 @@ if [ ! -d "$cachedir" ]; then
fi

# Limit the maximum number of requests to make
limit=100
#limit=100 # For firm limit
limit=$(printf "10\n100\n150\n200\n300" | dmenu -p "Queries to make: " -l 5) # Allows user to set desired limit

# Send a notification
$notifier "Redyt" "📩 Downloading your 🖼️ Memes"
Expand All @@ -69,7 +70,7 @@ wget -P "$cachedir" $imgs
$notifier "Redyt" "👍 Download Finished, Enjoy! 😊"

# Display the images
sxiv -a "$cachedir"/*.png "$cachedir"/*.jpg
sxiv -a "$cachedir"/{*.png,*.jpg}

# Once finished, remove all of the cached images
rm "${cachedir:?}"/*