You are not logged in.

#126 2014-04-10 16:03:57

progandy
Member
Registered: 2012-05-17
Posts: 2,890

Re: Slider: PDF presentations

There should be no need to navigate away to another window or desktop to show a video or play audio: slider honors action links in the pdf to do these things.

I believe you already have keybindings for fade to white/black. Why don't you add another to toggle between the desktop and the presentation? Sometimes you might want to switch to a live version of an application or website.

Last edited by progandy (2014-04-10 16:06:23)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#127 2014-04-10 16:07:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

That's a good idea.  Toggling the override_redirect attribute of a window is quite easy.  Thanks - that'll likely be the approach I take when I get into that tonight.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#128 2014-04-10 21:26:51

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: Slider: PDF presentations

Trilby wrote:

The command-line option issue was a silly mistake and the fix will be on github with the next push.  This was simply an oversight in the rewrite from last month.  I put in some placeholder code there that I just hadn't finished yet.

EDIT: fixes for the first two have been pushed to github - though the "-h" output is still just a placeholder.  The third will take a bit more thinking.

I was playing around with slider and noticed that if you put in a filename that doesn't exist, or don't give a filename at all, slider will segfault. If you give an argument that doesn't exist without a filename, it will tell you that argument doesn't exist and then segfault.

Offline

#129 2014-04-10 21:32:00

progandy
Member
Registered: 2012-05-17
Posts: 2,890

Re: Slider: PDF presentations

bslackr wrote:
Trilby wrote:

The command-line option issue was a silly mistake and the fix will be on github with the next push.  This was simply an oversight in the rewrite from last month.  I put in some placeholder code there that I just hadn't finished yet.

EDIT: fixes for the first two have been pushed to github - though the "-h" output is still just a placeholder.  The third will take a bit more thinking.

I was playing around with slider and noticed that if you put in a filename that doesn't exist, or don't give a filename at all, slider will segfault. If you give an argument that doesn't exist without a filename, it will tell you that argument doesn't exist and then segfault.

Since glib2 is already a dependency due to poppler/cairo, why don't you use a GOptionContext for your commandline?
https://developer.gnome.org/glib/2.37/g … arser.html
Edit: Oh, sorry. glib2 is only a dependency on arch. It should be possible to compile cairo without it, so it is not always a preexisting dependency.

Last edited by progandy (2014-04-10 21:36:37)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#130 2014-04-10 22:48:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

Thanks for the further info.

The remaining issue isn't with command line parsing, it's with checking the result of the poppler file open call.  This will be a simple fix when I sit down to work on this again.

EDIT: scratch that - the propper checks are already there for this step.  I'll have to see where this is coming from.

EDIT2: found it.  It was that the render function returns NULL if the file is not found or able to be opened.  This return value is checked to ensure a valid pointer was returned, but not until *after* a member of the data structure pointed to was set.  I fixed the order of this and that fixed this segfault.

Last edited by Trilby (2014-04-10 22:56:15)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#131 2014-04-13 20:25:52

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Re: Slider: PDF presentations

I have another, in my eyes crucial, suggestion:
If the program encounters another key press corresponding to a move action (like “prev” or “next”), the program should immediately stop the fading animation and start rendering the next slide. During a presentation, sometimes you want to get ahead quickly (but not so far as to satisfy hitting <Tab> to get to that “sorter” action and choosing the right slide with a mouse). The fading animation is incredibly annoying in that case.

Also, I suggest disabling fading when a slide is chosen in the “sorter” menu.

Offline

#132 2014-04-14 18:18:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

A little later than first anticipated, but I just implemented the override_redirect toggle (i.e. fullscreen toggle) which should make it easier to work with other windows other than the slideshow.  The toggle is set (with the default config) to Ctrl-Tab.  This will shrink the window to half the screen size, or return it to fullscreen.  The show is not scaled to half size, though this could be possible, I don't see a purpose in the extra code and calculations: I assume this option would be to temporarily exit from the presentation to pull up something else, so there would be no need for a scaled slide.

As for the fading, I have a couple comments/questions.  First, keys can be used to navigate the sorter (no need for a mouse).  The fade transition should be *very* subtle; I don't like transitions, but just a quick fade to soften the abrupt change between slides that may have substantially different color or saturation is easier on the eyes (IMHO).  The speed of this transition may likely depend on your hardware - and can be adjusted or completely disabled by the "fade" parameter in the config file.

There is no easy way to 'escape' from a transition when a key is pressed.  It would be possible, but it would also be very ugly.  Instead, I could add a transition "toggle" so you can temporarily turn the fade on and off if this would be useful.  But if you just never want the fade, set "Fade" in the config to 0.

EDIT: I use a setting for 'Fade' of 15 which is even more subtle than the default.  So much so that one would not really notice it.  The default of 25 makes it more noticable - not that 25 is a good setting, but it lets the user know there is a fade transition that they could then consider adjusting.  The number for this setting is the number of steps or increments between one image and the next.  There is a 5ms sleep (usleep) between the rendering of each step - but this is where processing power has an impact: the usleep command is not very precise, and there are also the rendering and XFlush commands at each step which take up some number of ms themselves (depending on hardware and load).

Last edited by Trilby (2014-04-14 18:28:47)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#133 2014-04-14 22:49:33

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: Slider: PDF presentations

Trilby wrote:

The toggle is set (with the default config) to Ctrl-Tab.  This will shrink the window to half the screen size, or return it to fullscreen.

For me, Ctrl-Tab will shrink the window but when I try to return to fullscreen it crashes and I get this error:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  42 (X_SetInputFocus)
  Serial number of failed request:  819
  Current serial number in output stream:  820

Last edited by bslackr (2014-04-14 22:56:43)

Offline

#134 2014-04-14 23:02:26

progandy
Member
Registered: 2012-05-17
Posts: 2,890

Re: Slider: PDF presentations

For the fading you could do something like this, and maybe turn off the fade for a second after each transition. Then fast forwarding will only have the first fade.

while elapsed < duration
    opacity = 1+sinl(elapsed/duration*pi-pi/2.0)
    prepare_context
    draw_old_page
    draw_new_page_with_opacity
    push_context_to_screen
    maybe nanosleep
    clock_gettime CLOCK_MONOTONIC
    calc_elapsed
end while
draw_new_page

Last edited by progandy (2014-04-14 23:03:21)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#135 2014-04-14 23:47:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

Another good idea progandy, thanks.  If I do opt to include such an option that would be the best way - I'll consider it.  My only idea was to check for key/button press events on the x server, grab them, check for ones bound to movements, and put them back on the server - this would have worked, but would have been hideous.  Your approach is much more elegant - so if modifying the speed of transitions isn't sufficient I'll opt for your approach.

Bslacker, thanks for that report.  I was getting the same error in an early attempt at this, I thought I fixed the issue that caused it, but it seems I didn't completely get rid of it.  I'll debug that some more over the next few days.

Last edited by Trilby (2014-04-14 23:51:12)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#136 2014-07-02 17:47:09

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: Slider: PDF presentations

Trilby, thanks for this wonderful program!

Would you mind to upload an old version of the documentation until you find the time to update it? I remember, that there once has been a man page -- right know I struggle to guess options and keybindings and I can't find the documentation on github...

Offline

#137 2014-07-02 18:52:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

Thanks for the reminder - this does desperately need some documentation.  Just the other day I was trying to remember which of my projects most needed some TLC - and I missed that slider needed docs.

Unfortunately the previous versions of the man page would be worse than useless: they'd be misleading.

I'll get to work on some documentation right away.  Much of the configuration is/will be documented in the default config file that comes with slider.  Give me a day or two for some decent man pages.

EDIT: I just pushed some updates to the default config comments, and a much more filled out man page.  I'd love to know how this reads, and which parts of the documentation may still need the most work.  As I wrote slider, it's hard for me to know what I take for granted and/or what needs clearer elaboration, so please let me know.

EDIT2: Also, while looking at this, I was reminded that I "offloaded" a few features (like autoplay) to a new tool that would send commands to slider.  I started tinkering with that tool again, but as I streamlined it more and more, I realized it served no purpose at all.  Now slider will read commands from stdin (if there are any) and exute them as they arrive.  So for an "autoplay" setup, you could do the following:

while :; do sleep 15; echo next; done | slider presentation.pdf

If you want more complex input, you can put it in a script, or just in parentheses for a subshell like the following which would "autoplay" the first 10 slides, then quit:

(for i in {1..10}; do sleep 15; echo next; done; echo quit) | slider presentation.pdf

Last edited by Trilby (2014-07-02 22:26:14)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#138 2014-07-06 08:33:14

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: Slider: PDF presentations

Thank you!

The part in the man page I struggle most with, is the configuration via a ressource class -- I've honestly no idea how to make slider aware of a particular monitor setup. Could you elaborate further? :-)

Offline

#139 2014-07-06 11:17:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

You shouldn't need to configure much of anything for that.  If there is only one video output active, Slider will show the presentation on that active output.

If there is more than one output active Slider will behave differently depending on whether it was provided one pdf or two.  In either case, the first pdf will be treated as the main 'slide show' and shown fullscreen on the first monitor listed by Xinerama (this can be changed to a different monitor with *.Monitor).  The views defined in the config file will then be created on the primary monitor - their contents depend on whether or not a second pdf was provided - but in either case, these would show notes, previews, etc.

Slider will not, however, configure your monitors for you.  An earlier version of Slider did this, but it caused all sorts of trouble - I realized it's not Slider's job to do this.  Your window manager, or a call to xrandr should be used to configure your monitors before running Slider.  Slider will detect the current monitor setup at startup.

What behavior do you want?  What have you managed to get so far?

EDIT: I just got to a dual-screen setup where I could test this out.  It seems a recent change did break multimonitor use.  I'll troubleshoot this shortly.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#140 2014-07-09 10:00:22

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: Slider: PDF presentations

Yep, Multi-monitor use doesn't seem to work correctly. I tried it without a notes file and exspected slider to show the presentation on both monitors, but slider just launched on one monitor.  I don't use xinerame, but configure my setup with xrandr, for that matter...

Offline

#141 2014-07-09 14:03:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

Those are the symptoms I was seeing as well.  I traced it to switching from an override_redirect window (which is ignored by window managers) to using a normal window and using a NET_WM signal to tell the WM to make it fullscreen.

As I only occasionally get to test this on a 'multihead' setup, I didn't realize that most WMs will not place the fullscreen window on the monitor I expected them to.  I just pushed a revision that will do this in two steps: the presentation window is first mapped as a normal window on the correct screen/video output, then it is toggled into fullscreen.  This is essentially instantaneous, and should not be noticable.

So far I've only tested this new code in openbox (where it works as intended) and in alopex (my wm) where I discovered I totally botched multi-head managing in alopex too.  So now I'm patching up both projects.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#142 2014-07-09 15:55:33

ap0calypse
Member
From: Austria
Registered: 2012-03-12
Posts: 54
Website

Re: Slider: PDF presentations

uuuuh this is a nice tool smile

accepted as primary presentation tool big_smile
btw: any other formats supported? not that it's THAT important ... tongue


projects: whistle | bazinga
open minds, open sources, open future.

Offline

#143 2014-07-09 16:05:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

Other than pdf?  No.  I use latex/beamer exclusively myself.  But even all the power-point-like tools should export pdfs.

EDIT: if there are other formats that I should consider, feel free to let me know - but it's not particularly likely.  Relatives of pdf (e.g. PS) could be doable, but I'm not sure if that'd serve much purpose.

Last edited by Trilby (2014-07-09 16:07:08)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#144 2014-07-10 07:47:48

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: Slider: PDF presentations

Trilby wrote:

Those are the symptoms I was seeing as well.  I traced it to switching from an override_redirect window (which is ignored by window managers) to using a normal window and using a NET_WM signal to tell the WM to make it fullscreen.

Thanks Trilby, I will test it as I get to my second monitor in a few days... (I use dwm.)

Offline

#145 2014-09-28 13:48:33

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 479

Re: Slider: PDF presentations

Just wanted to pop by to say that this program is fantastic. Thanks Trilby for creating and maintaining it so well.

EDIT: figured out some constructive criticism could be appreciated.
1) Config options are a bit too hidden. Maybe pop out a message in the terminal (both on installation and opening slider?) to point to the config file(s)?
2) Config files refers to a man which is not found on my system (but I see on github that it's there)
3) Config file typo: 1 - left button, 2 - left button, 3 - right button    ->    1 - left button, 2 - central button, 3 - right button
4) I'm missing a very vital "back" command, which is very useful when navigating links inside the pdf
5) What key string is bracket{left,right}[OK, answered to that myself, my bad I don't have an US keyboard]? Can you point me to a resource stating all the standard key strings (also for non-US keyboards characters)?
6) When you want to use the "Dot" as a pointer, it appears to be no way you can cancel the dot without pinning it to the page, am I wrong?

Last edited by OdinEidolon (2014-09-28 14:40:15)


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#146 2014-09-28 15:05:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

OdinEidolon wrote:

Just wanted to pop by to say that this program is fantastic. Thanks Trilby for creating and maintaining it so well.

Thanks for the appreciation - and more so for the critiques.  Software can only improve when issues are reported.  Slider is over due for some attention, and these points will help direct the updates where most needed.  I should be able to address these all soon.  For now some thoughts on each:

1 + 2) Yes, there was a man page for version 1+2, but version 3 was a complete rewrite with drastic changes, so the previous man page is no longer accurate.  I do need to write a new one.

3) Thanks - that's just in the comments though right?

4) Good idea - I don't use jump links much so it didn't occur to me.  That should be relatively easy to add

5) I don't know much about international keyboards or settings.  Slider passes the string provided in the config file through the Xlib XStringToKeysym function.  You should be able to use xev (from xorg-xev) to get the strings associated with any key.  For square brackets it would be bracketleft and bracketright, for curly braces it would be braceleft and braceright (at least on my en_US system).  Xev should be the complete reference: see the third line of xev output for any key press, the string is in the parentheses after the coma.

6) Ah, yes, that is a bug.  For a temporary work around you can hit "esc" then "enter" to end the dot 'mode' then redraw the current page.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#147 2014-09-28 15:27:56

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 479

Re: Slider: PDF presentations

Trilby wrote:
OdinEidolon wrote:

Just wanted to pop by to say that this program is fantastic. Thanks Trilby for creating and maintaining it so well.

Thanks for the appreciation - and more so for the critiques.  Software can only improve when issues are reported.  Slider is over due for some attention, and these points will help direct the updates where most needed.  I should be able to address these all soon.  For now some thoughts on each:

1 + 2) Yes, there was a man page for version 1+2, but version 3 was a complete rewrite with drastic changes, so the previous man page is no longer accurate.  I do need to write a new one.

3) Thanks - that's just in the comments though right?

4) Good idea - I don't use jump links much so it didn't occur to me.  That should be relatively easy to add

5) I don't know much about international keyboards or settings.  Slider passes the string provided in the config file through the Xlib XStringToKeysym function.  You should be able to use xev (from xorg-xev) to get the strings associated with any key.  For square brackets it would be bracketleft and bracketright, for curly braces it would be braceleft and braceright (at least on my en_US system).  Xev should be the complete reference: see the third line of xev output for any key press, the string is in the parentheses after the coma.

6) Ah, yes, that is a bug.  For a temporary work around you can hit "esc" then "enter" to end the dot 'mode' then redraw the current page.

Thank you.
As for #3, yes it's in the comments only.
#5, thanks for the hints.

Keep up the good work!


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#148 2014-09-30 08:30:19

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 479

Re: Slider: PDF presentations

Oh, another good idea, maybe difficult to implement, would be a way to move around in the slide when zoomed in, without having to zoom out and then zoom in in a new area.

Also found a kinda bug: I have a PDF which contains another PDF which has °C symbol (\textcelcius in LaTeX). Other PDF readers see the °C, slider does not.


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#149 2014-09-30 17:40:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,352
Website

Re: Slider: PDF presentations

Moving around while zoomed shouldn't be too hard - I'll add that to the todo list.  "rezooming" without zooming out first would take a couple extra steps that I don't think justify their existence, but just panning around should be simple enough.

As for the bug, is this a pdf you can share so I can do some testing?  Also, can you test it with other poppler-based tools.  Slider relies on the poppler-glib library for rendering the pdf - so if poppler can't do it, neither can slider.  If other poppler tools handle that well, then this is a slider bug, but if they don't, then it is a poppler bug.


EDIT: New HISTORY implementation:
I just pushed a history implementation.  It needs a lot of testing yet, but it seems to work so far.  I have not added bindings to the default config yet as I want it to get some more testing first.  But if you'd like to try it out and provide feedback, just add keybindings for any of the 6 new commands: history back, history forward, history start, history end, history push, history clear.  Only the first four of these would likely be of any use for bindings, the other two are used internally - though I prefer transparency where possible to allow users to come up with interesting uses I might not have thought of.  'history push' is used internally every time there is any sort of page change, so the new current page is pushed on to a stack of page numbers.

The back and forward should be self-explanatory - start and end may also be pretty obvious in general, but there are some interesting specifics: start goes to the first page in the history stack which would generally be the first page of the pdf, but this could be changed with a call to 'history clear' which clears/resets the history; end goes to the last page in the history stack, keep in mind that this will depend on how you've been moving around.  For example if you move normally from pages 0 to 3, then follow a jump link to page 7 then move forward normally to page 8, the history stack will be "0 1 2 3 7 (8)" where 8 is bracketed as the current position in history.  If you then use "history back" twice the same history stack will be "0 1 2 (3) 7 8".  If you then use "history forward" or "next" you will get different results: history forward will move you to page 7 and the history stack will be "0 1 2 3 (7) 8" so you could still do another 'history forward'.  If instead you use "next" this will overwrite any trailing history and move you to page 4 with a history stack "0 1 2 3 (4)": the previous visit to pages 7 and 8 will no longer be in the history.

This is a very verbose description - but I think this is the standard behavior expected from a history buffer.  It is the same logic used by every web browser I've used.  In short, if you go back many steps, you can only retrace forward again as long as you don't make any different new steps.

Here's what I've added to my config to test out history:

*.Bind.15.Key:      j
*.Bind.15.None:     history forward
*.Bind.15.Shift:    history end
*.Bind.16.Key:      k
*.Bind.16.None:     history back
*.Bind.16.Shift:    history start

Last edited by Trilby (2014-09-30 18:57:59)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#150 2014-10-01 09:20:42

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 479

Re: Slider: PDF presentations

Will test as soon as it's on AUR. Thanks!

PS: your history implementation makes sense to me.

EDIT: yes I can send you the PDF if you want. I have tested with Okular which I believe uses Poppler and it works.

Last edited by OdinEidolon (2014-10-01 09:21:47)


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

Board footer

Powered by FluxBB