Commit graph

76 commits

Author SHA1 Message Date
Arthur Williams 5c6947c1c6 Make imgcursor a config variable.
Previously, the value of imgcursor was determined by where a pointer
binding was set to a ci_cursor_navigate. If it was then the pointer
would change to left/right arrows depending on the position relative to
the window. Now the user has full control of over it which also allows
them to preserve the behavior in case they wrap the function.
2021-10-13 06:05:00 +06:00
Berke Kocaoğlu 1449bfc5e9
code-style: fix consistency issues all over the codebase (#94)
* remove duplicate comment
* remove empty tabs and blank lines
* move macros and globals ontop
* comment to seprate function implementation
* fix alignment
* switch to *argv[] similar to other suckless code
* kill all empty last lines
* append comment to endif
* reuse existing ARRLEN macro
* comment fall through
* use while (true) everywhere

Co-authored-by: NRK <nrk@disroot.org>
2021-10-11 09:07:18 +06:00
N-R-K 065562d3c5
update outdated comment in config.def.h (#105)
we're not using 'background', 'foreground' and 'font' anymore.
see: 0b20783 and f7557c5
2021-09-30 07:46:14 +00:00
Lu Xu a2339e70fd Use zoom steps instead of hard-coding levels (#92)
Co-authored-by: NRK <nrk@disroot.org>
Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
2021-09-25 11:11:21 +06:00
NRK 4ec8fd5377 make keyhandler abort key configurable via config.h 2021-09-24 17:29:30 +06:00
Arthur Williams 3234b0e521 Allow any set of modifiers to be used in keybindings
Previous the code only allowed ShiftMask,ControlMask or Mod1Mask to be
used in keybindings and the presence of any others modifiers would be
ignored. Most problems generally allow certain modifiers to be be
ignored but not most and certainly don't allow Super-A to be treated
like A.
Now users can use any modifiers they want in keybindings and can also
ignore any modifiers they want. By default only ModMask2 (commonly
numlock is ignored)

Co-authored-by: N-R-K <79544946+N-R-K@users.noreply.github.com>
2021-09-20 11:17:35 +06:00
NRK f37fa0975f config.def.h: change enums to static const ints 2021-09-17 02:48:15 +06:00
Berke Kocaoğlu 7cce7ea857 Rename, Update Docs and Prepare for Release (#9)
Co-authored-by: Guilherme Rugai Freire <41879254+GRFreire@users.noreply.github.com>
Co-authored-by: N-R-K <79544946+N-R-K@users.noreply.github.com>
Co-authored-by: NRK <nrk@disroot.org>
Co-authored-by: Arthur Williams <taaparthur@gmail.com>
Co-authored-by: eylles <ed.ylles1997@gmail.com>
2021-09-16 22:55:31 +03:00
qsmodo 156a53780c set title based on prefix and suffix (#23)
Co-authored-by: Guilherme Rugai Freire <41879254+GRFreire@users.noreply.github.com>
Co-authored-by: NRK <nrk@disroot.org>
Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
2021-09-16 22:55:31 +03:00
N-R-K ca692ac485 add new keybind, Ctrl-a to toggle animation (#33)
* add new keybind, Ctrl-a to toggle animation

Closes: https://github.com/nsxiv/nsxiv/issues/27

* Format consistency

This keeps in line with other actions that have multiple keybinds

Co-authored-by: eylles <ed.ylles1997@gmail.com>
Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
2021-09-16 22:55:31 +03:00
Berke Kocaoğlu 88f77bc59c Implement fill scale mode 2021-09-16 22:55:31 +03:00
Bert Münnich 7bde7e618a Change colors and font only via X resources 2019-04-19 15:25:06 +02:00
vxid 4407a3de54 Add Xresources font support 2019-04-19 15:03:03 +02:00
Bert Münnich 24cce54ea0 New colors 2019-01-26 14:39:22 +01:00
Bert Münnich d5b8242706 Mention X resource properties in build-time color config 2019-01-26 14:12:17 +01:00
Bert Münnich 919ada1123 Align compile-time color options with X resource colors
Two colors are more than enough!
2019-01-23 21:21:15 +01:00
Bert Münnich 9d244da512 Simplify X resource retrieval
Also makes the color names in config.def.h constant again.
2019-01-23 20:13:25 +01:00
noamcore 4853e17b83 Add Xresources capability 2019-01-23 19:53:39 +01:00
Bert Münnich 7efcf55a5f Change default key-bindings of mark commands
*Shift-m* feels much more natural for *mark_range* and *Ctrl-u* is decent
enough for *unmark_all*.
2018-06-09 11:51:03 +02:00
Daniel Lublin 6e696ba98c Add mark range function
Sets the marked state of all images ranging from the latest marked/unmarked
image to the current image, to the state of that latest toggled image.
2018-06-09 11:44:47 +02:00
phi d5c5708110 Use argument to select between two drag methods 2018-01-22 09:46:38 +01:00
Bert Münnich 8081cbebf3 Improve mouse support
None of the mouse mappings uses a keyboard modifier, making it possible to
access the most basic features by only using the mouse.

Next/previous image with left button depending on cursor position, middle
button for dragging, right button for switching to thumnail mode and wheel for
zooming.

Users can keep the old behaviour by simply not adapting the changes to the
buttons array in config.def.h to their config.h file.
2017-10-06 10:15:43 +02:00
jcalve ec545a6b6c Make pan fraction configurable 2017-09-06 19:39:22 +02:00
Bert Münnich c280129cef Use Xft for font loading and text drawing 2016-08-06 15:27:58 +02:00
Bert Münnich de4649fc28 Build-time option for default thumbnail size; fixes issue #207 2015-12-20 13:10:39 +01:00
Bert Münnich 5dc7993478 Simplified command arguments 2015-01-11 11:39:38 +01:00
Bert Münnich 47e6cd0669 Apply gamma value on thumbnails too; fixes issue #193 2015-01-05 20:53:04 +01:00
Bert Münnich 39671a149c Moved thumbnail sizes array to config.def.h 2014-09-29 09:02:29 +02:00
Bert Münnich c3c70a6c3e Removed obsolete thumbnail dimension configuration setting 2014-09-28 09:55:44 +02:00
Bert Münnich 7b91e10f22 Added thumbnail zooming...
- Key mappings +/- are now general commands
- Use JPG as thumbnail cache file format instead of PNG
- Fixes issue #161
2014-09-28 00:28:50 +02:00
Bert Münnich 4310b846c1 Increased contrast in default color set 2014-08-17 22:57:09 +02:00
Bert Münnich 1094def183 Added command to remove all image marks, bound to Ctrl-m; fixes issue #163 2014-08-17 20:27:01 +02:00
Bert Münnich 5e481912ec Revised handling of GIF animations
- New option `-a`: Play animations at startup
- Ctrl-Space toggles animation for all GIF files
- Infinite loop for all animations
2014-07-25 22:52:31 +02:00
Bert Münnich 9c92de8584 Added support for multiple commands per key/button mapping; elegant fix for issue #150 2014-07-23 23:41:23 +02:00
Bert Münnich 06164c29b7 Revised command structure and key and mouse button mappings 2014-07-23 21:50:31 +02:00
Bert Münnich 7a74fae56a Use integers for mouse mappings and buttons 6+7 for horizontal scrolling
Fixes issue #143
2014-05-31 10:59:19 +02:00
Bert Münnich e685859a30 Use a checkerboard background for alpha layer; fixes issue #138 2014-04-06 22:47:42 +02:00
Bert Münnich 43a04c4757 Revised scale mode and zoom level handling
- Scale mode is not reset to default value upon image loading anymore
- New default key binding to change mode to scale-down
- Removed scale mode setting from config.h
- Removed -d command line option, as this is now the default at startup
2014-02-04 23:03:53 +01:00
Bert Münnich 524d9de877 Removed fit-win-to-img command 2014-02-04 22:38:24 +01:00
Bert Münnich f6510b0a04 Merged pull request #129 2014-01-31 13:21:23 +01:00
András Mohari 54d7b7f20f Use a prefix key to execute the key handler
The default prefix key is C-x, and can be changed in config.def.h. The
first key pressed after the prefix key will be passed the external key
handler, unless the key is Escape, which is used to cancel the prefix.
2014-01-31 14:17:52 +01:00
Bert Münnich 6a0fa2507c Slideshow mode is back, in a simplified version 2014-01-04 19:07:15 +01:00
Bert Münnich f2e0c492bd Moved external shell commands into exec/key-handler script
Gets called on all unset key mappings. Arguments are: key combo and
current file. Thanks to Francesco Orsenigo (xarvh) for the idea.
2014-01-02 23:19:31 +01:00
Bert Münnich b2eae528ed Proper support for Ctrl/Shift/Alt modifiers in key & mouse mappings 2014-01-02 14:13:08 +01:00
Bert Münnich ab28c9a8b9 Refactored remote changes 2013-12-31 16:38:42 +01:00
Aleksander Nitecki 078136d217 Read GIF's repeat information from file. 2013-12-30 23:16:17 +01:00
Bert Münnich 091aacb462 Merge remote-tracking branch 'baskerville/reverse-marks' 2013-11-14 17:57:45 +01:00
Bert Münnich 50f9ad14de Refactored remote changes 2013-11-14 17:06:20 +01:00
Bastien Dejean 562197577b Add command to reverse marked images 2013-11-14 14:45:27 +01:00
András Mohari 0353e6eea2 Add support for changing the gamma value 2013-11-13 20:54:09 +01:00