summaryrefslogtreecommitdiffstats
path: root/commands.h
AgeCommit message (Collapse)Author
2022-05-03Declare every extern function/variable in `nsxiv.h` (#268)N-R-K
with a couple exceptions as they cause too many -Wshadow warnings. also moves the `extcmd_t` typedef on top for cosmetic purposes. also enable `-Wmissing-prototypes` in the ci
2022-01-15Add keybind to scroll to image center (#203)Nick Hanley
There are keybinds for scrolling to the edges of an image but there's no way back to the center. This is particularly annoying while zooming.
2022-01-10make thumbnail bindings configureable via config.h (#167)N-R-K
this allows for configuring thumbnail mode mouse bindings similar to image mode bindings. however we can't put the thumbnails bindings into the existing buttons[] array due to fallthrough. For example M3 would switch mode and then end up selecting an image. which is why thumbnail bindings have been put into it's own array `buttons_tns[]` and `buttons[]` has been renamed to `buttons_img[]` for consistency. Closes: https://github.com/nsxiv/nsxiv/issues/131
2022-01-06fix -Wstrict-prototype warningNRK
looks like i missed one in ff88908
2021-12-19specify func argument and related cleanup (#183)N-R-K
* specifies the function argument type in commands.h compared to leaving it unspecified. all the functions in cmd_t must have arg_t as it's argument. * changes to commands.h will now trigger a rebuild - this restores old behavior prior to 12efa0e * cg_quit now uses it's argument as exit status * DestroyNotify invokes cg_quit rather than calling exit directly. * Explicitly pass EXIT_SUCCESS to cgquit in keybinding Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
2021-10-13Add ability to bind arbitrary functions.Arthur Williams
Before all the predated commands where kept in an array and their indexes were used in bindings. This meant that users couldn't add their own functions from the config file. Now key/mouse bindings have been changed to to store the function ptr (wrapped in a cmd_t struct to also store the mode) directly instead. General cleanup done in this commit: Defined `MODE_ALL` instead of using magic number. For example, suppose one had bindings like: { 0, XK_q, g_quit, None }, { ShitMask, XK_q, {quit_err}, None } { ControlMask, XK_q, {quit_err, .mode=MODE_IMAGE}, None } The existing binding `q` has been left unchanged and is defined the same way. However, the new hypothetical binding `Shift-q` can be used to call the custom function quit_err in any mode (default). `Ctrl-q` on the other hand will be called only on image mode. Closes #50
2017-10-16One header file for type definitions and function declarationsBert Münnich
2015-01-11Simplified command argumentsBert Münnich
2014-07-23Revised command structure and key and mouse button mappingsBert Münnich
2014-04-06Use a checkerboard background for alpha layer; fixes issue #138Bert Münnich
2014-02-04Removed fit-win-to-img commandBert Münnich
2014-01-31Merged pull request #129Bert Münnich
2014-01-08Fixed handling of overloaded key mappingsBert Münnich
Issue described here: https://bbs.archlinux.org/viewtopic.php?pid=1117294#p1117294
2014-01-04Slideshow mode is back, in a simplified versionBert Münnich
2014-01-02Moved external shell commands into exec/key-handler scriptBert Münnich
Gets called on all unset key mappings. Arguments are: key combo and current file. Thanks to Francesco Orsenigo (xarvh) for the idea.
2014-01-02Proper support for Ctrl/Shift/Alt modifiers in key & mouse mappingsBert Münnich
2013-11-14Merge remote-tracking branch 'baskerville/reverse-marks'Bert Münnich
2013-11-14Add command to reverse marked imagesBastien Dejean
2013-11-13Add support for changing the gamma valueAndrás Mohari
2013-08-10Added file marks; fixes issue #94Bert Münnich
- Command it_toggle_image_mark (bound to 'm') toggles mark of current image - Command it_navigate_marked (bound to 'N'/'P') can be used to go to the next/previous marked image - When option -o is given, all marked files get printed
2013-02-08Updated/corrected license headerBert Münnich
2013-01-27Removed old definitions from commands.hhut
2012-08-16New command: i_alternate, go to last image, issue #65Bert Münnich
2012-05-13Simplified & sped up reloading of all thumbnailsBert Münnich
2012-05-08Added a command to refresh the thumbnailsbaskerville
2012-05-06Added horizontal and vertical flip commandsbaskerville
2012-02-15Added it_toggle_bar command; default mapping: XK_bBert Münnich
2012-02-15Already in the year 2012Bert Münnich
2011-10-27Added screen-wise scrolling for thumbnail modeBert Münnich
2011-10-16Added i_reset_slideshow: set slideshow delay to number prefixBert Münnich
2011-10-16Added i_set_zoom command: set zoom to number prefixBert Münnich
2011-10-16Added support for number prefix for commandsBert Münnich
2011-10-14Updated contact informationBert Münnich
2011-09-11Added own bool typeBert
2011-09-10Added slideshow supportBert
2011-09-04Made i(t)_toggle_alpha command work in thumbnail mode tooBert
2011-09-03Reformated license headerBert
2011-08-19Added command to toggle gif animationsBert
2011-08-19Added support for multi-frame imagesBert
2011-08-19Put event handling back into main.c; events -> commandsBert
2011-04-14Merged commands.h into config.hBert
2011-03-09Use ctrl for ext cmds, disable them in config.hBert
2011-03-03Use "/bin/sh -c" for external commandsBert
2011-03-01Slightly refactored commands.hBert
2011-03-01Support for external commands like mogrify & jpegtranBert