Comments (10)
@eXeC64 a toggle command. Thanks for all the work that you've been putting into the 4.0 branch! (the round thing is a bit silly, but I don't use decimal places for slideshows anyway. Could be made a little more elegant tho)
toggle = exec ([ $(calc -p "round($imv_slideshow_duration)") -eq "0" ] && imv-msg $imv_pid "ss 2") || imv-msg $imv_pid "ss 0"
from imv.
This is one of those features that I'm not strongly opposed to, but I'm certainly hesitant about. Could you expand upon the use case for this? When would a user need this? For a custom electronic picture frame? As a screensaver of some sort?
I'm just struggling to see when this would be useful where imv would also be the appropriate tool for the job.
from imv.
My use case would be something like "Being at a family gathering and showing some images on a projector." I guess I could use a remote to switch between images, but a fixed delay works well in my experience. Electronic picture frame would be another example where this is useful (not for me but in general), as you said.
Right now I'm using feh for this, but if you think this feature could be useful to have imv, I'd give it a go.
from imv.
I'll accept it, but if done I think it should behave like this:
-t [time]
option to set how long to show each image fort
key binding increases display time by 1 secondT
key binding decreases display time by 1 second- If non-zero, the time left and display time should be shown in the overlay and window title in the form
[display-time-so-far/display-time]
- A display time of
0
indicates the slideshow is not active
This way, the speed can be adjusted at run-time, and playback even paused, with information about how much time is left.
from imv.
That sound good, I will try implementing this as soon as I have some time.
from imv.
Is their currently a way to pause the slideshow? I suppose you could set $imv_slideshow_duration
to zero. But currently this variable is only mentioned in the docs.
EDIT:
rather hacky solution I came up with:
void command_pause(struct list *args, const char *argstr, void *data)
{
(void)args;
(void)argstr;
struct imv *imv = data;
imv->slideshow_image_duration = 0;
imv->need_redraw = true;
}
Ideally, the previous image duration just would be restored (I think?) Would you be willing to implement a PR based on this code?
from imv.
There isn't a way to pause slideshows as of yet, but it's something that can go into v4. I'm going to be changing around the commands to make them more friendly, but I've not decided how to structure the slideshow commands, perhaps slideshow <n>
to start the slideshow with a given duration, +- prefix to adjust the duration, and slideshow pause
to pause/unpause. ss
would probably be an alias for slideshow
from imv.
I like the current solution! You can do something like:
[alias]
pause = slideshow 0
And probably do something like a toggle too by inspecting the $imv_slideshow_duration
from imv.
I'm not sure it's possible to create a toggle bind/command without further extensions. Also, it's not documented, but ss
is a builtin alias for slideshow
so I do ss 0
to pause and ss 3
to resume, which I quite like.
from imv.
Neat! I think it wasn't possible before $imv_pid
, but with that addition a whole bunch of scripting possibilities have opened up.
from imv.
Related Issues (20)
- Multiline overlay text HOT 3
- Unable to redner BIG png image HOT 11
- No longer builds with -Dlibrsvg=disabled due to missing libm for exp()
- Launching imv displays a black window
- image list HOT 1
- Fullscreen + reset/center key binding with shrink scaling mode
- Add option to launch imv with the initial image's width and height
- imv unable to open huge images HOT 1
- broken link prevents loading some images from the directory HOT 1
- Slow zoom speed on large images HOT 2
- wayland: committing resized buffer is delayed HOT 1
- Please cut a new release HOT 1
- Padding for the overlay
- Mouse cursor state not set when entering window
- recursively configuration option is unknown
- full-core usage on wayland compositor exit
- scientific tif options?
- Shutdown errors on arch linux / sway
- Weird/laggy mouse movement
- Imv-wayland on enlightenment wayland session.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imv.