summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* always redraw imagesMarkus Teich2016-09-261-6/+3
| | | | | | Previously when covering the sent window with an image slide selected and exposing it again, the image was lost. This change always redraws the image and also removes the now redundant bit flag in the state enum.
* improve some more error messagesHiltjo Posthuma2016-08-122-9/+11
| | | | | | - remove \n in die() messages in drw.c - add a few more ':' suffix for functions that set errno. - minor typo.
* Add a manpageFRIGN2016-08-122-0/+70
|
* Use Plan 9 style for ARGENDFRIGN2016-08-121-1/+1
|
* Fix error-messagesFRIGN2016-08-122-19/+21
|
* Fix memory leak and print a warning on invalid regexFRIGN2016-08-111-1/+5
| | | | This will minimize the already low memory usage of sent.
* _exit() instead of exit() after failed execFRIGN2016-08-111-1/+2
| | | | | | die() calls exit(), but actually at this point the program could be in a state not allowing this. It's better to call _exit to stop the libc from calling any handlers that might fail at this moment anyway.
* Simplify LICENSE wordingFRIGN2016-07-182-18/+25
| | | | | | | | | | | | | | Now, before you call your lawyers, here is some explanation: The MIT/X Consortium-License and ISC-License are equivalent according to the Berne-convention. This means that a court of law presented with either licenses will act the same. The advantage of the ISC license is that it has a simpler wording and is recommended by the OpenBSD-project for new projects[0]. And as we at suckless.org love removing cruft, this also includes removing legal cruft wording that is not needed any more. [0]: http://www.openbsd.org/policy.html
* Simplify usage()FRIGN2016-07-141-2/+3
|
* Update example presentationMarkus Teich2016-07-142-2/+13
| | | | - Add a small transparent farbfeld test image
* add ff and ff.bz2 support in config.def.hFRIGN2016-07-141-1/+3
|
* Also call ffload on the current slide in advance()Markus Teich2016-06-301-0/+1
| | | | | | | This fixes a bug where the image would not be loaded if the user setup a keybinding which advances multiple slides at once. Then the preloading for the previous/next slide in advance() would not catch that case and instead of an image the text version (`@filename`) would be rendered on the slide.
* clean ffread and rename to ffloadMarkus Teich2016-06-301-44/+38
| | | | - also remove unneeded memmove in load()
* load slide image on-demandHiltjo Posthuma2016-06-061-50/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Sat, Jun 04, 2016 at 05:28:31PM +0200, Markus Teich wrote: > Hiltjo Posthuma wrote: > > previously an image file would be opened but only ffread when advancing to > > the slide, but when the slide was not used it gave an error: > > > > /usr/local/bin/2ff: failed to convert image/png > > Heyho Hiltjo, > > thanks for the patch. Unfortunately it does not work if the first slide contains > an image (ffopen is only called in advance). I think it would be good to merge > ffopen and ffread instead into a single function ffload. This makes the `LOADED` > state clearer and also enforces that the fd is closed in the same function where > it is opened. This ffload function should then be called in advance() replacing > the ffread() calls if the image is not loaded yet and once in load() for the > first slide if it is an image. > Ah yes, sorry for the oversight. > If you want to take this new approach, go for it, otherwise I'll look into it > myself. > I have attached a patch that does this, I hope you'll like it. Also I'm not sure if we need the below code in advance(), I have removed it in the patch: if (slidecount > idx + 1 && slides[idx + 1].img) ffread(slides[idx + 1].img); if (0 < idx && slides[idx - 1].img) ffread(slides[idx - 1].img); That seems to preload the next and previous slide image right? A minor issue I notice also is that images seem to flicker, it uses XPutImage directly to xw.win. Maybe it can be replaced with a backbuffer then XCopyArea? What do you think? In advance() it should also not always be needed to rescale the image. -- Kind regards, Hiltjo From 97bebdcab4003f9acdfdd4bdf424449299ffd61d Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 4 Jun 2016 21:34:25 +0200 Subject: [PATCH] merge ffread and ffopen into one function
* load slide image on-demandHiltjo Posthuma2016-06-041-1/+7
| | | | | | | | | previously an image file would be opened but only ffread when advancing to the slide, but when the slide was not used it gave an error: /usr/local/bin/2ff: failed to convert image/png this changes it to load the image on-demand once and "cache" it.
* import new drw and util from libsl.Markus Teich2016-05-246-229/+227
|
* fix include and lib paths for the BSDsMarkus Teich2016-03-151-2/+7
|
* support FreeBSDMarkus Teich2016-03-151-2/+2
| | | | On FreeBSD the lib and include directories are in /usr/local rather than /usr.
* Import arg.h OOB fix from Lucas Gabriel Vuotto.Markus Teich2016-03-061-2/+2
| | | | | This is a small fix for arg.h where it's possible to perform an out-of-boundary memory access in argv's internal string.
* Fix cmdline argument checkMarkus Teich2016-03-062-11/+12
| | | | | There was a segfault when sent was called without arguments. Now we use stdin when there's no argument or - is used. Thanks to izabera for the report.
* no need to reimplement cat hereMarkus Teich2016-02-062-11/+8
|
* improve error handlingMarkus Teich2016-02-061-73/+41
| | | | | | - errors are now fatal - no need to clean up when dying - no need for status return codes => ffread and ffprepare now return void
* style: move function return types to own lineMarkus Teich2016-02-051-26/+52
|
* Use 2ff exclusively in config.def.hFRIGN2016-02-051-2/+1
|
* Fix alpha blendingFRIGN2016-02-051-7/+7
| | | | | - "/ 257", because 255 * 257 = UINT16_MAX - "/ 255", because that's the maximum possible RGB value
* readme: update reference to farbfeldMarkus Teich2016-02-051-1/+1
|
* Change an eprintf to a die to stop child from running its own slideshowDavid Phillips2015-12-241-1/+1
| | | | | | | | | The child thread was created because execlp will not return if successful. The eprintf was placed after the call to execlp to catch any error, but the child continued to return a (closed) fds[0], resulting in a second slideshow being run by the child. This commit fixes the issue by killing the child.
* filter via shell pipelineGrant Mathews2015-12-241-2/+2
| | | | | Instead of requiring an executable, allow building arbitrary shell pipelines to filter filetypes through.
* unbreak the buildMarkus Teich2015-12-091-2/+2
|
* fix 2 uninitialized variables and bin == NULL checkMarkus Teich2015-12-092-9/+10
|
* check for bin == NULLMarkus Teich2015-12-081-1/+2
|
* minor syntax, style and README fixesMarkus Teich2015-12-083-13/+23
|
* support transparent imagesMarkus Teich2015-12-081-3/+16
|
* Support farbfeld as an intermediate formatsin2015-12-086-96/+119
| | | | | | | | | | | | | | | | | Sent now uses farbfeld[0] as an intermediate format. A series of filters is specified in config.h that matches file extensions to filter programs. The programs will convert between formats such as png to farbfeld. Internally in sent we do not need to worry on how to parse png or any other format. This also works with jpg and gif and others. The 2ff wrapper will use imagemagick conversion tools. This is temporary as jpg2ff and gif2ff will also be implemented. To make this work, you will have to clone[0] and put png2ff and 2ff in your PATH. [0] http://git.2f30.org/farbfeld/
* add 'sent: ' prefix to errorsMarkus Teich2015-12-031-0/+2
|
* Add 'n' and 'p' keys to navigate slidesAlexis2015-12-031-0/+2
|
* Refactor die() to use eprintf()Alexis2015-12-031-7/+1
|
* Use consistent wording for error messagesAlexis2015-12-031-19/+19
|
* Use right click as previous and enable scrolling to switch slidesIvan Tham2015-11-191-1/+3
|
* Bail out before allocating slides if file is emptyQuentin Rameau2015-11-181-4/+4
| | | | | | In load() we allocated slides before checking if we actually read anything from the FILE fp and then continue with an allocated but “empty” space wich would lead to errors.
* fix dying on empty slidefileMarkus Teich2015-11-181-1/+1
|
* drw.c: Avoid potential memory leak in drw_cur_create()Quentin Rameau2015-11-181-2/+2
| | | | If drw was NULL, memory was still allocated for cur.
* Add Escape key to quit sentIvan Tham2015-11-181-0/+1
|
* die if no font could be loadedMarkus Teich2015-11-181-1/+2
|
* Register space to advance to the next slideJan Christoph Ebersbach2015-11-171-0/+1
|
* shorten bulletpoints in example presentationMarkus Teich2015-11-171-2/+2
|
* fix dejavu font nameMarkus Teich2015-11-171-1/+1
|
* support even larger screensMarkus Teich2015-11-171-1/+1
|
* prevent flickering when changing slidesMarkus Teich2015-11-171-2/+2
| | | | | | | | When the window background is left at WhitePixel (from initialization) and the user has set a dark background color in config.h, the window shortly displays the white default background when clearing after advancing to another slide. This was very disturbing and is fixed now by setting the default window background color to the bgcol chosen in config.h.
* update READMEMarkus Teich2015-11-171-47/+27
|