Open nimr0d opened 1 year ago
You can already do this. You can open a new window by executing new_window
command or from the command line by passing --new-window
option.
I tried this before posting the issue, but this doesn't seem to do anything for me. Only one document is opened (the first one in the list). I am not sure what I'm doing wrong here. Also, I don't necessarily want it to open multiple windows. I just want multiple files to be readily available.
Btw, the usage is not completely clear from the help message. It says "sioyek [options]", where I think it would be better if was something like sioyek [options] file1 file2 ...
Only one document is opened (the first one in the list
You can't do
sioyek file1.pdf file2.pdf ...
You need to do this:
sioyek file1.pdf
sioyek file2.pdf --new-window
sioyek file3.pdf --new-window
This script allows you to pass arguments as file1.pdf file2.pdf
to open multiple files @nimr0d.
#!/bin/sh
pdfs=()
options="--new-window"
for arg in "$@"
do
if [[ "$arg" == *".pdf" ]]
then
pdfs+=("$arg")
else
options+=" ${arg}"
fi
done
for pdf in "${pdfs[@]}"
do
sioyek $options "$pdf" > /dev/null 2>&1
done
It would be useful if sioyek could open multiple documents at once. i.e. sioyek doc1.pdf doc2.pdf ... should open multiple files. I might implement it myself if it is wanted.