Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 13802  / 2 Years ago, fri, april 22, 2022, 4:47:07

I love using feh to organise my image collections. I've set the actions to move the current image to a certain directory, but when trying to open gifs, feh doesn't animate them.


Therefore I was searching a lightweight image/gif viewer with the possibility to execute commands with simple key strokes like --action in feh.


Thank you




I've found a program that might be good enough. It's called gifview and it's an old version of gifsicle; you can get it by installing gifsicle. The really interesting option is -w where you specify the window to open the gifs (so you can make all go to the same acting pretty much like feh), it still doesn't accept command inputs but it's close enough.


More From » 12.04

 Answers
3

It seems that there is no program that can do such thing... so I decided to make my own script, goes as follows (using feh and gifview) :



while read i; do
file+=( "$i" )
done < <(ls | sort -R)

for i in $(seq 0 "${#file[@]}");do
if [[ "${file[$i]}" =~ .*.gif ]];then
gifview -a "${file[$i]}"
read -s -n 1 choice
case $choice in
1) //Command to execute//
;;
2) //Other Command to execute//
;;
esac
else
feh -rqzZFVY --cycle-once --action1 "//Comand to execute//" --action2 "//Other command to execute// "${file[$i]}"
fi
done


The script first loads the files into the array file, then it loops through those files with the for loop. if the file is a gif the first conditional is triggered, then a read command gets the option you want to do with the file and executes the command under the case option, else it executes feh


[#32882] Sunday, April 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ronicod

Total Points: 71
Total Questions: 111
Total Answers: 111

Location: Montenegro
Member since Fri, Dec 10, 2021
2 Years ago
ronicod questions
Thu, Nov 11, 21, 06:26, 3 Years ago
Sun, May 7, 23, 13:57, 1 Year ago
Sun, Jun 26, 22, 06:13, 2 Years ago
Fri, Oct 14, 22, 13:55, 2 Years ago
;