Commit Graph

288 Commits (80c5a1cd9faaa49f8970b832500d063829456ab1)

Author SHA1 Message Date
NRK 4ec8fd5377 make keyhandler abort key configurable via config.h 3 years ago
NRK 3bec517655 fix: unable to bind anything to XK_Escape 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
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
Arthur Williams 9c73646d9c Exit when window is destroyed
If the user closed our window, the program won't automatically be die.
It may look dead as there would be no graphical indication that it was
running, but it still would be using/wasting the same resources.
Now the program will abruptly exit when its window is killed.
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
Bert Münnich 55777ba9f4 Fix indentation 5 years ago
Bert Münnich 07300da7df Do not keep track of fullscreen state
There is no more need for this after the removal of the special color handling
for fullscreen mode in commit 2886876.
5 years ago
Bert Münnich 674f69f2c9 Fix file list indexes when deleting last image
Fixes issue #331
6 years ago
Bert Münnich 0bf3265430 Set window title only once at startup
Putting image info in the title predates the info bar; it no longer seems
necessary.

Fixes issue #318.
6 years ago
Kacper Gutowski e6c9218319 Don't skip dot files when cleaning cache 6 years ago
Bert Münnich 1de5f06f83 Set global markidx whenever a single img is (un)marked
This also sets *markidx* when using the right mouse button in thumbnail mode.
6 years ago
Bert Münnich 5367b75867 (Un)mark thumbnails while holding Button3 down 6 years ago
Bert Münnich 87a1ace8a1 (Un)mark single image through generic function 6 years ago
Bert Münnich a1165df878 Rename variable toggledidx to markidx 6 years ago
Bert Münnich 1e5cc7e382 Fix cg_mark_range after removing images from file list 6 years ago
Bert Münnich cc476be7cc Remove unnecessary special cases in cg_mark_range 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
Bert Münnich 09b04d7aef Revise waiting for child processes 6 years ago
Bert Münnich 762420cdf1 Close image-info explicitly 6 years ago
Bert Münnich 4124857137 Skip imlib cache when reloading due to inotify event 6 years ago
Bert Münnich 8017b75de4 Refactoring 7 years ago
Hyleus 6d261b4e7a Fix a potential uninitialized variable 7 years ago
Bert Münnich 8a9e3ea43e Separate bar fields only by spaces 7 years ago
Bert Münnich 30e2356622 Remove obsolete files[].base 7 years ago
Bert Münnich 004fcd5c5b Left bar shows file name as given by user 7 years ago
Squibby eb96c71725 Try to match a fallback font if needed
Fixes #276

Instead of rendering the entire filename at once, Xft will let us do it
character by character. This will allow sxiv to query fontconfig for
a font that can provide any missing codepoints, if needed.

A known issue of this patch is that the "..." dots rendering will not
work properly for very long multibyte filenames. That is because we
cannot easily predict the final width of the rendered filename before
drawing it. I couldn't figure out a clean way to deal with this, so I
ended up just truncating the offending filenames.
7 years ago
Bert Münnich 64b885b6a9 Fix navigating from last to previous image over invalid files 7 years ago
Bert Münnich 2d34c4b9bf Set LC_COLLATE for -r file list sorting
Fixes issue #293.
7 years ago
Bert Münnich 148026007c One header file for type definitions and function declarations 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
Bert Münnich ee908ca0a1 Simplify cursor reset in image mode
No need to give cursor name. reset_cursor() is now the only place to decide
what cursor to fall back to.
7 years ago
Bert Münnich e310136e02 Mouse drag translates pointer position to image area
This makes mouse panning more direct and faster.
7 years ago
Bert Münnich a20173a42d Detect all file overwrites in autoreload_inotify
mv(1) inside the same filesystem was not detected.

Supporting this case made it necessary to always watch the directory. Turns out
the logic and state keeping between arl_setup() and arl_handle() is easier,
when using different watch descriptors for the file and the directory and not
using a oneshot descriptor for the file.

Requiring an absolute canonical path for arl_setup() simplifies dir and base
name splitting. No need for dirname(3) and basename(3) anymore.
7 years ago
Bert Münnich 3724d3fc17 Revised autoreload interface
Make the header only contain the public interface and nothing from the
implementation. All functions get a handle to their self object, like the img_
and tns_ and win_ functions. All necessary data (file path) is also passed as
an argument, so that no extern redeclarations are needed.

Make arl_setup_dir() private, it's not called outside the module.

Make arl_handle() return true if the file has changed, so that the reloading of
the file can be done by the caller.
7 years ago
Max Voit edb117e3bd Add autoreload support by inotify (and dummy backend nop) 7 years ago
Bert Münnich 1fb3ec576c Properly quit when window gets closed; fixes issue #27 7 years ago
Jakub Wilk c313edc0ad Fix typo 7 years ago
Bert Münnich 5c607ad495 Pass given file names to key-handler instead of real paths
Misbehaving command lines in the key-handler that rewrite the given files and
thus replace symbolic links instead of their targets shall call realpath(1).

Fixes issue #205 and reverts commit 92e3b578.
8 years ago
Bert Münnich ff2ce99bf7 Merge djhejna/floatdelay 8 years ago
Bert Münnich 9a85dd41d8 Ignore button and key events while key-handler is running
Related to issue #253, which originally asked for a non-blocking key-handler.
8 years ago
Don Hejna 27bbaab976 Support for DELAY as a floating point number including less than 1
second while maintaining backward compatibiitiy with integer
arguments.
8 years ago
Paride Legovini 86dc6860f9 Allow opening directories non-recursively 8 years ago
Bert Münnich c280129cef Use Xft for font loading and text drawing 8 years ago
Bert Münnich aabc2bddbd Provide image width and height to image-info script; fixes issue #159 8 years ago
Bert Münnich d3a70a285d Revised error handling
- Functions warn() and die() replaced by GNU-like error(3) function
- Register cleanup() with atexit(3)
- Functions called by cleanup() are marked with CLEANUP and are not allowed to
  call exit(3)
9 years ago
Bert Münnich 851e4288c1 Prefix safe allocation functions with 'e' instead of 's_' 9 years ago
Bert Münnich b096cbd536 Removed unnecessary buffer size constants 9 years ago
Bert Münnich 9a7e97cd89 Use XSI realpath(3) 9 years ago
Bert Münnich 66c3c55759 Use POSIX.1-2008 getline(3) 9 years ago