Commit Graph

77 Commits (850bc788c3fd4bb96f425ceedfe4237754cabe46)

Author SHA1 Message Date
LuXu 57754572bc Add default key-binding for DRAG_RELATIVE (#117)
Ctrl-Button1 now has a relative drag using the XC_fleur cursor.
XC_fleur is normally the cursor for "size all" action, which has 4
arrows pointing to 4 directions.

Co-authored-by: NRK <nrk@disroot.org>
3 years ago
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.
3 years ago
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>
3 years ago
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
3 years ago
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>
3 years ago
NRK 4ec8fd5377 make keyhandler abort key configurable via config.h 3 years ago
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>
3 years ago
NRK f37fa0975f config.def.h: change enums to static const ints 3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
Berke Kocaoğlu 88f77bc59c Implement fill scale mode 3 years ago
Bert Münnich 7bde7e618a Change colors and font only via X resources 5 years ago
vxid 4407a3de54 Add Xresources font support 5 years ago
Bert Münnich 24cce54ea0 New colors 5 years ago
Bert Münnich d5b8242706 Mention X resource properties in build-time color config 5 years ago
Bert Münnich 919ada1123 Align compile-time color options with X resource colors
Two colors are more than enough!
5 years ago
Bert Münnich 9d244da512 Simplify X resource retrieval
Also makes the color names in config.def.h constant again.
5 years ago
noamcore 4853e17b83 Add Xresources capability 5 years ago
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*.
6 years ago
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.
6 years ago
phi d5c5708110 Use argument to select between two drag methods 7 years ago
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.
7 years ago
jcalve ec545a6b6c Make pan fraction configurable 7 years ago
Bert Münnich c280129cef Use Xft for font loading and text drawing 8 years ago
Bert Münnich de4649fc28 Build-time option for default thumbnail size; fixes issue #207 9 years ago
Bert Münnich 5dc7993478 Simplified command arguments 10 years ago
Bert Münnich 47e6cd0669 Apply gamma value on thumbnails too; fixes issue #193 10 years ago
Bert Münnich 39671a149c Moved thumbnail sizes array to config.def.h 10 years ago
Bert Münnich c3c70a6c3e Removed obsolete thumbnail dimension configuration setting 10 years ago
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
10 years ago
Bert Münnich 4310b846c1 Increased contrast in default color set 10 years ago
Bert Münnich 1094def183 Added command to remove all image marks, bound to Ctrl-m; fixes issue #163 10 years ago
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
10 years ago
Bert Münnich 9c92de8584 Added support for multiple commands per key/button mapping; elegant fix for issue #150 10 years ago
Bert Münnich 06164c29b7 Revised command structure and key and mouse button mappings 10 years ago
Bert Münnich 7a74fae56a Use integers for mouse mappings and buttons 6+7 for horizontal scrolling
Fixes issue #143
10 years ago
Bert Münnich e685859a30 Use a checkerboard background for alpha layer; fixes issue #138 10 years ago
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
11 years ago
Bert Münnich 524d9de877 Removed fit-win-to-img command 11 years ago
Bert Münnich f6510b0a04 Merged pull request #129 11 years ago
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.
11 years ago
Bert Münnich 6a0fa2507c Slideshow mode is back, in a simplified version 11 years ago
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.
11 years ago
Bert Münnich b2eae528ed Proper support for Ctrl/Shift/Alt modifiers in key & mouse mappings 11 years ago
Bert Münnich ab28c9a8b9 Refactored remote changes 11 years ago
Aleksander Nitecki 078136d217 Read GIF's repeat information from file. 11 years ago
Bert Münnich 091aacb462 Merge remote-tracking branch 'baskerville/reverse-marks' 11 years ago
Bert Münnich 50f9ad14de Refactored remote changes 11 years ago
Bastien Dejean 562197577b Add command to reverse marked images 11 years ago