-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
w3mimgdisplay command 6 (clear image) is not sent #67
Comments
I was thinking about this for a bit and it shouldn't be too hard, although it does require significantly changing the Images API. Basically, right here I'd need to update the type be: hDrawImage :: FilePath -> IO (IO ()) where the method not only draws the image, but also returns a cleanup function. We then collect those cleanup methods and run them after we change the slide. @anowlcalledjosh Is this something you are interested in working on, or should I give it a stab? |
I've created #69 where I define such a cleanup action; I don't actually implement the cleanup action yet though. |
Awesome! I'm unlikely to be able to help, sorry – I've got a lot on my plate at the moment and I barely know Haskell, but maybe eventually I'll get around to it. |
@anowlcalledjosh My branch at #69 now calls |
Nice! My wrapper script is now available on GitHub, if you want to test with that: https://github.com/anowlcalledjosh/uberw3m You should be able to use something like this in a presentation header: patat:
images:
backend: w3m
path: /path/to/uberw3m then use a command line like |
Right, I had time to install Stack and test your PR; I made some changes to my wrapper script, and now it works perfectly for me. I've not tested in tmux, though. |
Great! In that case I'll merge it in. |
FWIW, this doesn't seem to erase the image in konsole ; has anyone else noticed this? at least the image can be displayed though! -- edit: i guess it's because the command
doesn't work (bafflingly, i think i did work briefly, but i certainly can't reproduce it working now) |
for any poor desperate souls investigating this, i have some notes from the totally inappropriate amount of time i spent looking into it:
-- edit: ps, thanks for such a neat library @jaspervdj - it was really easy to hack around in this codebase! |
I don't know if this helps (since this seems a bit old) but if you send the command for clear, you need to sync and sync the draw. so apparently the \n4; is redundant, but yeah. |
I'm running into an issue that patat doesn't tell w3mimgdisplay when it should remove images from the screen – it would be ideal if patat could emit a w3mimgdisplay command (apparently it should look something like
6;x;y;w;h
) when the current slide is an image and the slide is changed.(the reason I noticed this is because I'm writing a pair of wrapper scripts for ueberzug that means it can be used as a drop-in replacement for w3mimgdisplay, but when used in patat my script doesn't have any way to know when to erase the image)
The text was updated successfully, but these errors were encountered: