The last time[0] this was discussed, no-one was against it but no-one
was confident in it either and so it was added to nsxiv-extra as a
patch.
But now that enough time has passed, it seems like there's a pretty high
demand for something like this because there's plenty of use-cases that
use nsxiv as a "picker" where it's meant to quickly pick a single file.
And so add this as a convenient default key-bind.
[0]: https://codeberg.org/nsxiv/nsxiv-record/pulls/42
Co-authored-by: eylles <ed.ylles1997@gmail.com>
Co-authored-by: NRK <nrk@disroot.org>
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/432
Reviewed-by: NRK <nrk@disroot.org>
Co-authored-by: eylles <eylles@noreply.codeberg.org>
Co-committed-by: eylles <eylles@noreply.codeberg.org>
* Imlib2 supports modifying gamma, brightness and contrast directly
while sxiv only supports gamma. Makes sense to extend it to brightness
and contrast as well.
* Since color corrections need to be aware of each other, they have been
refactored into one centralized function.
* This also makes the code more hackable as it makes it easier to add
more color correction functions without them interfering with each
other.
Co-authored-by: 0ion9 <finticemo@gmail.com>
Co-authored-by: NRK <nrk@disroot.org>
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/396
Reviewed-by: NRK <nrk@disroot.org>
Reviewed-by: TAAPArthur <taaparthur@noreply.codeberg.org>
Co-authored-by: Berke Kocaoğlu <kberke@metu.edu.tr>
Co-committed-by: Berke Kocaoğlu <kberke@metu.edu.tr>
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
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
* 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>
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
- 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