How do you use SXIV?
This might seem a silly question but I just want to know how do you use sxiv to view your images.
- Firstly, I am very much used to opening an image and go back and forward with my arrow keys. But afaik this not possible in sxiv; you need to open the whole folder with sxiv command. How do you navigate back and forth by opening a single image?
- If you need minor annotations how do you do that?
Thanks in advance!
About this post
- Posted
- Archived
- Score
- 5 · 86% up
- Kind
- Text
- ID
- 16duc56
14 comments
I just open the images from my graphical file viewer and you can navigate them by pressing
n&pfor next and previous.We also have
nsxivin the repos which might be interesting for you :)Is it possible to navigate by opening a single file?
No I just mark multiple in my file manager
I have written a shell script for lf file manager. Whenever I open an image I can go back and forth:
image/*) bash -c 'shopt -s nullglobdir="$0"selected_file="$1"images=()for file in "$dir"/*.{jpg,jpeg,png,webp,bmp,tiff,tif,raw,ico,exif,heic,heif,gif,avif,jxl,JPG,PNG}; do[[ -f "$file" ]] && images+=("$file")donesorted_images=()while IFS= read -r line; dosorted_images+=("$line")done < <(printf "%s\n" "${images[@]}" | sort -fV)for ((i=0; i<${#sorted_images[@]}; i++)); do[[ "${sorted_images[i]}" = "$selected_file" ]] && {setsid nsxiv -aon "$((i + 1))" "${sorted_images[@]}"break}done' "$PWD" "$fx";;That's automatic if you use it with ranger.
sxiv *.pngorsxiv ~/pictures/*I've never used annotations, can't help you there.
Not sure if this works with
sxiv, but withnsxiv(a maintained fork) you can just pass a directory like this:nsxiv .I'll check; thanks for suggesting.
Yeah, that works with
sxivtoo.Isn't giving this command every time you want to view a folder's images a bit tiring?
No. It's super short and you can tab-complete it. Plus if you're lazier there's always ctrl-r.
you can use “sxiv image-to-see” and navigate with “n” for next and “p” for previous.