Skip to content

Latest commit

 

History

History
83 lines (58 loc) · 2.82 KB

File metadata and controls

83 lines (58 loc) · 2.82 KB

NOT WORKING ANYMORE!

Reddit seems to have changed the way that their API works, breaking this TUI app... I probably won't fix this. Sorry!

wppfzf

Browse and download images from reddit with fzf and ueberzug

demo gif

Content

  1. Installation
  2. Usage
  3. Theming
  4. Notes

Installation

Arch

This fork is not in the AUR.

To install the original wppfzf AUR package, use your AUR-helper of choice. For example:

paru -S wppfzf

General

Dependencies

  • bash
  • fzf
  • ueberzug

Install the necessary dependencies first. Then, get the latest release by running:

sudo wget "https://raw.githubusercontent.com/botus99/wppfzf/master/wppfzf" \
-O /usr/bin/wppfzf
sudo chmod +x /usr/bin/wppfzf

Usage

All cli options are shown and explained when running wppfzf -h

To start a simple query, run wppfzf with no arguments. This will use the defaults. Each line shows the posts title as well as the number of up- and downvotes.

  • To open the currently selected image in your default image-viewer, press ctrl-p.
  • To download the currently selected image, press ENTER.
  • Press ESC to quit wppfzf.

To search a specific subreddit, use the -r option, -l N will limit the api query to N posts.

Note that less images may be show in wppfzf itself due to filtering of incompatible posts (e.g. imgur albums).

wppfzf defaults to searching the last 100 posts of r/wallpaper & r/wallpapers and saving desired images to $HOME/.wallpapers/reddit. These settings, as well as the default preview window size and location, can be temporarily changed through the cli arguments.

To make these changes permanent, the script itself has to be edited. The settings are located at the top of the script:

# query limit 
LIMIT=100
# default subreddit to search
SUBREDDIT="wallpaper+wallpapers"
# dir to save images to
declare -x WPP_FZF_DL_DIR=$HOME/.wallpapers/reddit
# default preview position
declare -x DEFAULT_PREVIEW_POSITION="up"
# default preview size
declare -x DEFAULT_PREVIEW_SIZE="67%"

Theming

Theming the fzf interface is done at the top of the script itself. To see all available color options, refer to fzf's man page.

# default interface colors: 'option:term_color_code'
COLOR_OPTS="bg+:0,fg:15,fg+:1,border:8,hl+:2,prompt:15,hl:2,pointer:8,info:8,spinner:1"

Notes

This project is made possible through both fzf and ueberzug.