aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
Commit message (Collapse)AuthorAgeFilesLines
* add config.h option for top statusbar (#231)N-R-K2022-02-261-0/+3
| | | | Closes: https://github.com/nsxiv/nsxiv/issues/230 Co-authored-by: mamg22 <45301823+mamg22@users.noreply.github.com>
* use win-title script for customizing window title (#213)N-R-K2022-02-231-13/+0
| | | | | this removes the cli flag `-T` as well as related config.h options. Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
* Add keybind to scroll to image center (#203)Nick Hanley2022-01-151-0/+1
| | | 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.
* make thumbnail bindings configureable via config.h (#167)N-R-K2022-01-101-1/+12
| | | | | | | | | | | | | | 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
* Allow setting cache size based on memory percentage (#184)MahouShoujoMivutilde2022-01-011-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem: 1. For the most people imlib2's default 4MiB is unreasonably low; 2. Hardcoding cache size to ~256MiB has performance benefits and doesn't increase RAM usage too much on relatively modern systems; 3. But we can't do that, because that would be detrimental to low spec systems that (apparently) not (?) building nsxiv from source, as been discussed #171 Solution: Calculate cache size based on total memory. Default is set as 3%, which means: * ~245MiB for 8GiB * ~30MiB for 1GiB * and so on CACHE_SIZE_LIMIT (256MiB by default) sets the highest possible value. And in case we cannot determine the total memory (e.g since _SC_PHYS_PAGES isn't POSIX) use CACHE_SIZE_FALLBACK (32MiB by default) instead. Co-authored-by: NRK <nrk@disroot.org>
* fix: broken compilation when using HAVE_LIBFONTS=0 (#194)N-R-K2021-12-291-1/+1
| | | | | | | | | | | | | compilation currently fails with `make HAVE_LIBFONTS=0` due to `EXIT_SUCCESS` not being defined. I assume Xft.h includes stdlib.h which is why compilation works with HAVE_LIBFONTS=1 this switches to using 0 as cg_quit argument in keybindings. if my interpretation of the C99 standard is correct, then 0 and EXIT_SUCCESS means the same thing. > If the value of status is zero or EXIT_SUCCESS, an > implementation-defined form of the status successful termination is > returned.
* specify func argument and related cleanup (#183)N-R-K2021-12-191-1/+1
| | | | | | | | | | | | * 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>
* bring back zoom_levels (#156)N-R-K2021-12-011-4/+7
| | | | | | | this still keeps the shorter zoom logic, but adds back the zoom_levels array so that stay close to sxiv. for users who would like to have the zoom step behavior see: https://github.com/nsxiv/nsxiv/pull/156#issuecomment-975182631
* allow configuring imlib2's cache size (#171)N-R-K2021-11-261-0/+6
| | | | | | | | by default imlib2 uses a 4mb cache, which is quite small. this allows users who have more memory to spare to set a bigger cache size and avoid reloading an already viewed image if it fits into the cache. Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
* switch back to whitelisting modifers (#150)N-R-K2021-11-241-3/+3
| | | | | | | | | | | | | * Revert "Allow any set of modifiers to be used in keybindings" this keeps things equal with sxiv while giving users possibility to customize USED_MODMASK if they wish. This reverts commit 3234b0e521cca006a94cb135a88d146122d7f66d. Closes: https://github.com/nsxiv/nsxiv/issues/149 Closes: https://github.com/nsxiv/nsxiv/issues/123 Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
* rename: keyhandler_abort -> KEYHANDLER_ABORT (#172)N-R-K2021-11-241-1/+1
| | | | | | | | with the exception of arrays, all other var names in config.h are in ALL CAPS. since keyhandler_abort is an unreleased feature, it should be okay to rename it for consistency. though.. in the future we should be more careful about naming when adding new vars to config.h (or the codebase in general.)
* make width of navigation area configurable (#155)LuXu2021-11-041-0/+5
| | | | | | | | | this allows users to configure navigation width from config.h. it also allows disabling the navigation function entirely by using a 0 width. one extra functionality this adds is being able to define an absolute width (in pixels) instead of just percentage via `NAV_IS_REL`. Co-authored-by: NRK <nrk@disroot.org>
* Add colors and fonts to config.h (#115)Arthur Williams2021-10-291-1/+9
| | | | | | | | Adds a set of config vars to control window fg/bg, bar fg/bg, mark color and bar font. This allows everything that can be done from .Xresources to be configurable from config.h. Co-authored-by: N-R-K <79544946+N-R-K@users.noreply.github.com>
* Add default key-binding for DRAG_RELATIVE (#117)LuXu2021-10-271-0/+1
| | | | | | | | 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>
* Make imgcursor a config variable.Arthur Williams2021-10-131-0/+5
| | | | | | | | 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.
* code-style: fix consistency issues all over the codebase (#94)Berke Kocaoğlu2021-10-111-1/+1
| | | | | | | | | | | | | | | * 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>
* update outdated comment in config.def.h (#105)N-R-K2021-09-301-3/+2
| | | | we're not using 'background', 'foreground' and 'font' anymore. see: 0b20783 and f7557c5
* Use zoom steps instead of hard-coding levels (#92)Lu Xu2021-09-251-7/+4
| | | | | Co-authored-by: NRK <nrk@disroot.org> Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
* make keyhandler abort key configurable via config.hNRK2021-09-241-0/+3
|
* Allow any set of modifiers to be used in keybindingsArthur Williams2021-09-201-0/+3
| | | | | | | | | | | | | 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>
* config.def.h: change enums to static const intsNRK2021-09-171-7/+3
|
* Rename, Update Docs and Prepare for Release (#9)Berke Kocaoğlu2021-09-161-1/+1
| | | | | | | 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>
* set title based on prefix and suffix (#23)qsmodo2021-09-161-0/+15
| | | | | | 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>
* add new keybind, Ctrl-a to toggle animation (#33)N-R-K2021-09-161-0/+1
| | | | | | | | | | | | * 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>
* Implement fill scale modeBerke Kocaoğlu2021-09-161-0/+1
|
* Change colors and font only via X resourcesBert Münnich2019-04-191-11/+3
|
* Add Xresources font supportvxid2019-04-191-0/+1
|
* New colorsBert Münnich2019-01-261-2/+2
|
* Mention X resource properties in build-time color configBert Münnich2019-01-261-0/+1
|
* Align compile-time color options with X resource colorsBert Münnich2019-01-231-5/+2
| | | | Two colors are more than enough!
* Simplify X resource retrievalBert Münnich2019-01-231-5/+5
| | | | Also makes the color names in config.def.h constant again.
* Add Xresources capabilitynoamcore2019-01-231-5/+5
|
* Change default key-bindings of mark commandsBert Münnich2018-06-091-3/+3
| | | | | *Shift-m* feels much more natural for *mark_range* and *Ctrl-u* is decent enough for *unmark_all*.
* Add mark range functionDaniel Lublin2018-06-091-0/+1
| | | | | 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.
* Use argument to select between two drag methodsphi2018-01-221-1/+1
|
* Improve mouse supportBert Münnich2017-10-061-10/+4
| | | | | | | | | | | | 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.
* Make pan fraction configurablejcalve2017-09-061-0/+3
|
* Use Xft for font loading and text drawingBert Münnich2016-08-061-2/+2
|
* Build-time option for default thumbnail size; fixes issue #207Bert Münnich2015-12-201-0/+3
|
* Simplified command argumentsBert Münnich2015-01-111-88/+88
|
* Apply gamma value on thumbnails too; fixes issue #193Bert Münnich2015-01-051-3/+3
|
* Moved thumbnail sizes array to config.def.hBert Münnich2014-09-291-0/+6
|
* Removed obsolete thumbnail dimension configuration settingBert Münnich2014-09-281-6/+0
|
* Added thumbnail zooming...Bert Münnich2014-09-281-6/+6
| | | | | | - Key mappings +/- are now general commands - Use JPG as thumbnail cache file format instead of PNG - Fixes issue #161
* Increased contrast in default color setBert Münnich2014-08-171-2/+2
|
* Added command to remove all image marks, bound to Ctrl-m; fixes issue #163Bert Münnich2014-08-171-0/+1
|
* Revised handling of GIF animationsBert Münnich2014-07-251-7/+0
| | | | | | - New option `-a`: Play animations at startup - Ctrl-Space toggles animation for all GIF files - Infinite loop for all animations
* Added support for multiple commands per key/button mapping; elegant fix for ↵Bert Münnich2014-07-231-0/+2
| | | | issue #150
* Revised command structure and key and mouse button mappingsBert Münnich2014-07-231-51/+47
|
* Use integers for mouse mappings and buttons 6+7 for horizontal scrollingBert Münnich2014-05-311-9/+11
| | | | Fixes issue #143