X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=home%2Fbin%2Fwallpaper_review;h=8b15bcb677d0822ed3fd1237115bd8ce631bdef7;hb=dbc03ddf2472416405188cf46bcfdf2e0d58968b;hp=5c6966ae241b8bdc83e6c03c752911fa24f94ff3;hpb=fdc8785261d04be8df8158cf1eef192bf2d000e7;p=khome.git diff --git a/home/bin/wallpaper_review b/home/bin/wallpaper_review index 5c6966a..8b15bcb 100755 --- a/home/bin/wallpaper_review +++ b/home/bin/wallpaper_review @@ -134,18 +134,57 @@ paths_preview() { done } +help_print() { + cat <&2 + +Navigation help: + +key | action +----+---------------------------------------------- + q | quit + h | move back + l | move forward + f | add to favorites + r | remove from favorites + s | set current + z | fuzzy search for next file path + :N | goto Nth image +----+---------------------------------------------- + +EOF +} + +usage() { + cat <&2 + +$(basename "$0") [cmd] + +cmd | args | meaning +----+-------+------------------------------------------------ + f | | favorites + d | | from given dir + a | | all from $DIR_WALLPAPERS <- DEFAULT if no cmd. + h | | usage help. i.e. this message. +----+-------+------------------------------------------------ + +EOF +} + main() { case "$1" in f | fav) paths_set_from_favs;; d | dir) paths_set_from_dir_find "$2";; a | all) paths_set_from_dir_find "$DIR_WALLPAPERS";; + h | -h | help | -help | --help) + usage; + exit 1;; '') paths_set_from_dir_find "$DIR_WALLPAPERS";; *) printf 'Error: unknown source "%s"\n' "$1" >&2 exit 1;; esac - + help_print paths_preview }