Format code resolving to name of last saved filelist #112

Closed
0ion9 opened this Issue Dec 8, 2012 · 2 comments

Projects

None yet

1 participant

@0ion9
Contributor
0ion9 commented Dec 8, 2012

It's currently impossible to get access to the current filelist in --actions, unless you were involved directly in generating it. For a generic feh wrapper or theme, that is not possible to know.

I propose a format code which resolves to '' (ie. empty string) if the filelist has not been saved yet, and otherwise to the name of the latest filelist saved.

This would be helpful for, for example, filtering the current filelist (and then invoking a new instance of feh on the new filelist), or simple batch processing. The procedure that would become possible is, press f to save the current filelist and then the corresponding action key to invoke the action.

Note: The format code cannot resolve to the parameter given to --filelist (if any), AFAICS, as this could not be guaranteed to match the current filelist state until feh exits. This is a shame since most applications for this I can think of really just want "the filelist in its current state".

%L seems a natural fit for this format code.
.

@0ion9
Contributor
0ion9 commented Dec 8, 2012

Also note that while it's possible to guess the last saved filelist via the command 'ls -t feh_*_filelist | head -n 1', this is imperfect (it only finds in ./ the latest filelist saved by any feh instance, not the latest one saved by -this- instance.)

@0ion9
Contributor
0ion9 commented Dec 8, 2012

... though ls -t feh_*$1_*_filelist | head -n 1 has the correct behaviour, if $1 is feh's PID. There's probably other merit in getting the filelist directly, but I'm closing this for now.

It would be nice to have some documentation of the save_filelist|image format in the man page, though, so that this is obvious in the future.

Something like "Save the current filelist to a unique filename (in the form 'feh_$PID_$INDEX_filelist')"

@0ion9 0ion9 closed this Dec 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment