From 7cce7ea857321c854fc9e061edee3a32f4831d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berke=20Kocao=C4=9Flu?= Date: Thu, 16 Sep 2021 12:32:59 +0300 Subject: [PATCH] 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 Co-authored-by: Arthur Williams Co-authored-by: eylles --- .gitignore | 2 +- CHANGELOG.md | 182 +++++++++++++++++++++++++ CONTRIBUTING.md | 23 ++++ Makefile | 40 +++--- README.md | 241 ++++++++-------------------------- TODO | 5 - TODO.md | 8 ++ autoreload_inotify.c | 10 +- autoreload_nop.c | 10 +- commands.c | 10 +- config.def.h | 2 +- exec/image-info | 6 +- exec/key-handler | 6 +- icon/128x128.png | Bin 542 -> 1066 bytes icon/16x16.png | Bin 178 -> 262 bytes icon/32x32.png | Bin 221 -> 421 bytes icon/48x48.png | Bin 282 -> 507 bytes icon/64x64.png | Bin 319 -> 620 bytes icon/Makefile | 4 +- image.c | 10 +- main.c | 17 +-- sxiv.1 => nsxiv.1 | 69 ++++++---- sxiv.desktop => nsxiv.desktop | 6 +- sxiv.h => nsxiv.h | 14 +- options.c | 14 +- thumbs.c | 17 +-- util.c | 10 +- window.c | 18 +-- 28 files changed, 411 insertions(+), 313 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md delete mode 100644 TODO create mode 100644 TODO.md rename sxiv.1 => nsxiv.1 (82%) rename sxiv.desktop => nsxiv.desktop (88%) rename sxiv.h => nsxiv.h (96%) diff --git a/.gitignore b/.gitignore index 17c4f3c..d2d77f1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ config.h version.h *.d *.o -sxiv +nsxiv config.mk diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a9c2498 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,182 @@ +nsxiv +----- + +**Stable releases** + +**[v27](https://github.com/nsxiv/nsxiv/archive/v27.tar.gz)** +*(September 14, 2021)* + +Changes: + * Re-release under the name nsxiv + * Sxiv.foreground and Sxiv.background changed to Nsxiv.window.foreground and Nsxiv.window.background + * Rework the build system (#19). Now by default we'll build with only optional dependencies that are already installed +Added: + * Fill scale mode (#2) + * Configurable X window title (via `config.h` and the `-T` flag) (#23) + * Support custom bar colors via Xresources (#19) + * Toggle animation playback with Ctrl-a (#33) + * Set `_NET_WM_PID` and `WM_CLIENT_MACHINE` X properties (#13) + * Set ICCCM WM manager hints (#12) +Fixes: + * Cli flag `-G` not initially setting gamma (#31) + * Wrong keybinding description in the manpage (#14) + * .desktop entry not advertising webp support (#15) + * Prevent crash when embedded into transparent window (#3) + * Rare crash when showing some GIFs (#41) + * Rare event when nsxiv wouldn't close after window being destroyed (#53) + + +sxiv +---- + +**Stable releases** + +**[v26](https://github.com/nsxiv/nsxiv/archive/v26.tar.gz)** +*(January 16, 2020)* + + * Maintenance release + +**[v25](https://github.com/nsxiv/nsxiv/archive/v25.tar.gz)** +*(January 26, 2019)* + + * Support font fallback for missing glyphs + * Fix busy loop when built without inotify + * Use background/foreground colors from X resource database + +**[v24](https://github.com/nsxiv/nsxiv/archive/v24.tar.gz)** +*(October 27, 2017)* + + * Automatically reload the current image whenever it changes + * Support embedding into other X windows with -e (e.g. tabbed) + * New option -p prevents sxiv from creating cache and temporary files + * Simpler mouse mappings, the most basic features are accessible with the + mouse only (navigate, zoom, pan) + +**[v1.3.2](https://github.com/nsxiv/nsxiv/archive/v1.3.2.tar.gz)** +*(December 20, 2015)* + + * external key handler gets file paths on stdin, not as arguments + * Cache out-of-view thumbnails in the background + * Apply gamma correction to thumbnails + +**[v1.3.1](https://github.com/nsxiv/nsxiv/archive/v1.3.1.tar.gz)** +*(November 16, 2014)* + + * Fixed build error, caused by delayed config.h creation + * Fixed segfault when run with -c + +**[v1.3](https://github.com/nsxiv/nsxiv/archive/v1.3.tar.gz)** +*(October 24, 2014)* + + * Extract thumbnails from EXIF tags (requires libexif) + * Zoomable thumbnails, supported sizes defined in config.h + * Fixed build error with giflib version >= 5.1.0 + +**[v1.2](https://github.com/nsxiv/nsxiv/archive/v1.2.tar.gz)** +*(April 24, 2014)* + + * Added external key handler, called on keys prefixed with `Ctrl-x` + * New keybinding `{`/`}` to change gamma (by András Mohari) + * Support for slideshows, enabled with `-S` option & toggled with `s` + * Added application icon (created by 0ion9) + * Checkerboard background for alpha layer + * Option `-o` only prints files marked with `m` key + * Fixed rotation/flipping of multi-frame images (gifs) + +**[v1.1.1](https://github.com/nsxiv/nsxiv/archive/v1.1.1.tar.gz)** +*(June 2, 2013)* + + * Various bug fixes + +**[v1.1](https://github.com/nsxiv/nsxiv/archive/v1.1.tar.gz)** +*(March 30, 2013)* + + * Added status bar on bottom of window with customizable content + * New keyboard shortcuts `\`/`|`: flip image vertically/horizontally + * New keyboard shortcut `Ctrl-6`: go to last/alternate image + * Added own EXIF orientation handling, removed dependency on libexif + * Fixed various bugs + +**[v1.0](https://github.com/nsxiv/nsxiv/archive/v1.0.tar.gz)** +*(October 31, 2011)* + + * Support for multi-frame images & GIF animations + * POSIX compliant (IEEE Std 1003.1-2001) + +**[v0.9](https://github.com/nsxiv/nsxiv/archive/v0.9.tar.gz)** +*(August 17, 2011)* + + * Made key and mouse mappings fully configurable in config.h + * Complete code refactoring + +**[v0.8.2](https://github.com/nsxiv/nsxiv/archive/v0.8.2.tar.gz)** +*(June 29, 2011)* + + * POSIX-compliant Makefile; compiles under NetBSD + +**[v0.8.1](https://github.com/nsxiv/nsxiv/archive/v0.8.1.tar.gz)** +*(May 8, 2011)* + + * Fixed fullscreen under window managers, which are not fully EWMH-compliant + +**[v0.8](https://github.com/nsxiv/nsxiv/archive/v0.8.tar.gz)** +*(April 18, 2011)* + + * Support for thumbnail caching + * Ability to run external commands (e.g. jpegtran, convert) on current image + +**[v0.7](https://github.com/nsxiv/nsxiv/archive/v0.7.tar.gz)** +*(February 26, 2011)* + + * Sort directory entries when using `-r` command line option + * Hide cursor in image mode + * Full functional thumbnail mode, use Return key to switch between image and + thumbnail mode + +**[v0.6](https://github.com/nsxiv/nsxiv/archive/v0.6.tar.gz)** +*(February 16, 2011)* + + * Bug fix: Correctly display filenames with umlauts in window title + * Basic support of thumbnails + +**[v0.5](https://github.com/nsxiv/nsxiv/archive/v0.5.tar.gz)** +*(February 6, 2011)* + + * New command line option: `-r`: open all images in given directories + * New key shortcuts: `w`: resize image to fit into window; `W`: resize window + to fit to image + +**[v0.4](https://github.com/nsxiv/nsxiv/archive/v0.4.tar.gz)** +*(February 1, 2011)* + + * New command line option: `-F`, `-g`: use fixed window dimensions and apply + a given window geometry + * New key shortcut: `r`: reload current image + +**[v0.3.1](https://github.com/nsxiv/nsxiv/archive/v0.3.1.tar.gz)** +*(January 30, 2011)* + + * Bug fix: Do not set setuid bit on executable when using `make install` + * Pan image with mouse while pressing middle mouse button + +**[v0.3](https://github.com/nsxiv/nsxiv/archive/v0.3.tar.gz)** +*(January 29, 2011)* + + * New command line options: `-d`, `-f`, `-p`, `-s`, `-v`, `-w`, `-Z`, `-z` + * More mouse mappings: Go to next/previous image with left/right click, + scroll image with mouse wheel (horizontally if Shift key is pressed), + zoom image with mouse wheel if Ctrl key is pressed + +**[v0.2](https://github.com/nsxiv/nsxiv/archive/v0.2.tar.gz)** +*(January 23, 2011)* + + * Bug fix: Handle window resizes correctly + * New keyboard shortcuts: `g`/`G`: go to first/last image; `[`/`]`: go 10 + images back/forward + * Support for mouse wheel zooming (by Dave Reisner) + * Added fullscreen mode + +**[v0.1](https://github.com/nsxiv/nsxiv/archive/v0.1.tar.gz)** +*(January 21, 2011)* + + * Initial release diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2f5c295 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,23 @@ +Contribution Guideline +---------------------- + +The scope and aim of nsxiv are: + + * Bug fixes and maintenance + * Prioritize extensibility and simplicity + * Do not make the codebase more complex, keep it simple to hack on + * Do not add extra dependency (if we do, add compile time switch to disable it) + * New features may be added if it cannot be achieved (easily) via a shell script, + doesn't break backwards compatibility and doesn't violate any of the above rules. + +When contributing, make sure: + + * Your contribution falls under nsxiv's scope and aim + * You follow the existing code style (see [.editorconfig](.editorconfig)) + * You open the pull request from a new branch, not from master + +If your contribution is not suitable for general use, it will not be included in nsxiv. +For changes that are very much up to preference, such as changing values in config.h, +please do not open a pull request unless you have an objective explanation. + +See [TODO.md](TODO.md) or the [open issues](https://github.com/nsxiv/nsxiv/issues) to find something to work on. diff --git a/Makefile b/Makefile index 23ed7b8..9b1927c 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ ifneq (clean,$(filter clean,$(MAKECMDGOALS))) -include config.mk endif -# sxiv version -VERSION = 26 +# nsxiv version +VERSION = 27 # PREFIX for install PREFIX ?= /usr/local @@ -40,9 +40,9 @@ OBJS = autoreload_$(AUTORELOAD).o commands.o image.o main.o options.o \ .SUFFIXES: .SUFFIXES: .c .o -all: sxiv +all: nsxiv -sxiv: $(OBJS) +nsxiv: $(OBJS) @echo "LINK $@" $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) @@ -50,7 +50,7 @@ sxiv: $(OBJS) @echo "CC $@" $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< -$(OBJS): Makefile sxiv.h commands.lst config.h config.mk +$(OBJS): Makefile nsxiv.h commands.lst config.h config.mk options.o: version.h window.o: icon/data.h @@ -73,24 +73,24 @@ version.h: Makefile .git/index echo "#define VERSION \"$${v:-$(VERSION)}\"" >$@ clean: - $(RM) *.o sxiv + $(RM) *.o nsxiv install: all - @echo "INSTALL bin/sxiv" - install -Dt $(DESTDIR)$(PREFIX)/bin sxiv - @echo "INSTALL sxiv.1" + @echo "INSTALL bin/nsxiv" + install -Dt $(DESTDIR)$(PREFIX)/bin nsxiv + @echo "INSTALL nsxiv.1" mkdir -p $(DESTDIR)$(MANPREFIX)/man1 - sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" sxiv.1 \ - >$(DESTDIR)$(MANPREFIX)/man1/sxiv.1 - chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1 - @echo "INSTALL share/sxiv/" - install -Dt $(DESTDIR)$(PREFIX)/share/sxiv/exec exec/* + sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" nsxiv.1 \ + >$(DESTDIR)$(MANPREFIX)/man1/nsxiv.1 + chmod 644 $(DESTDIR)$(MANPREFIX)/man1/nsxiv.1 + @echo "INSTALL share/nsxiv/" + install -Dt $(DESTDIR)$(PREFIX)/share/nsxiv/exec exec/* uninstall: - @echo "REMOVE bin/sxiv" - rm -f $(DESTDIR)$(PREFIX)/bin/sxiv - @echo "REMOVE sxiv.1" - rm -f $(DESTDIR)$(MANPREFIX)/man1/sxiv.1 - @echo "REMOVE share/sxiv/" - rm -rf $(DESTDIR)$(PREFIX)/share/sxiv + @echo "REMOVE bin/nsxiv" + rm -f $(DESTDIR)$(PREFIX)/bin/nsxiv + @echo "REMOVE nsxiv.1" + rm -f $(DESTDIR)$(MANPREFIX)/man1/nsxiv.1 + @echo "REMOVE share/nsxiv/" + rm -rf $(DESTDIR)$(PREFIX)/share/nsxiv diff --git a/README.md b/README.md index f2aba7a..2de6187 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,16 @@ -![sxiv](http://muennich.github.com/sxiv/img/logo.png "sxiv") +![nsxiv](https://raw.githubusercontent.com/nsxiv/nsxiv/gh-pages/img/logo.png "nsxiv") -**Simple X Image Viewer** +**Neo (or New or Not) Simple (or Small or Suckless) X Image Viewer** +-------------------------------------------------------------------- -The sole purpose of sxiv is to be the perfect image viewer for me. It is free -software so that you can use it and modify it for your needs. Please file a bug -report if something does not work as documented or expected. Contributions are -welcome but there is no guarantee that they will be incorporated. +nsxiv is a fork of now unmaintained [sxiv](https://github.com/muennich/sxiv) +with the purpose of maintaining it and adding simple, sensible features. +nsxiv is free software licensed under GPLv2 and aims to be easy to modify and customize. + +Please file a bug report if something does not work as documented or +expected in *this* repository, after making sure you are using the latest +release of nsxiv. Contributions are welcome, see [CONTRIBUTING.md](CONTRIBUTING.md) +for details. Features @@ -16,26 +21,27 @@ Features * Thumbnail mode: grid of selectable previews of all images * Ability to cache thumbnails for fast re-loading * Basic support for multi-frame images -* Load all frames from GIF files and play GIF animations +* Play GIF animations * Display image information in status bar +* Display image name/path in X title Screenshots ----------- -**Image mode:** +**Image mode: (Default colors)** -![Image](http://muennich.github.com/sxiv/img/image.png "Image mode") +![Image](https://raw.githubusercontent.com/nsxiv/nsxiv/gh-pages/img/image.png "Image mode") -**Thumbnail mode:** +**Thumbnail mode: (Custom colors)** -![Thumb](http://muennich.github.com/sxiv/img/thumb.png "Thumb mode") +![Thumb](https://raw.githubusercontent.com/nsxiv/nsxiv/gh-pages/img/thumb.png "Thumb mode") Dependencies ------------ -sxiv requires the following software to be installed: +nsxiv requires the following software to be installed: * Imlib2 * X11 @@ -46,37 +52,39 @@ sxiv requires the following software to be installed: * libexif (optional, automatically enabled if installed) Please make sure to install the corresponding development packages in case that -you want to build sxiv on a distribution with separate runtime and development -packages (e.g. *-dev on Debian). +you want to build nsxiv on a distribution with separate runtime and development +packages (e.g. \*-dev on Debian). Building -------- -sxiv is built using the commands: +nsxiv is built using the commands: $ make - # make install - -Please note, that the latter one requires root privileges. -By default, sxiv is installed using the prefix "/usr/local", so the full path -of the executable will be "/usr/local/bin/sxiv". Running make will automatically detect if libexif and libgif are available and enable them if so. CLI arguments will override any automatic detection. For example: - $ make HAVE_LIBGIF=0 + $ make HAVE_LIBGIF=0 will always disable libgif. Alternatively, they can be disabled via editing `config.mk`. -You can install sxiv into a directory of your choice by changing the second -command to: +Installing nsxiv: - # make PREFIX="/your/dir" install + # make install -The build-time specific settings of sxiv can be found in the file *config.h*. +Please note, that this requires root privileges. +By default, nsxiv is installed using the prefix "/usr/local", so the full path +of the executable will be "/usr/local/bin/nsxiv". + +You can install nsxiv into a directory of your choice by changing this command to: + + $ make PREFIX="/your/dir" install + +The build-time specific settings of nsxiv can be found in the file *config.h*. Please check and change them, so that they fit your needs. If the file *config.h* does not already exist, then you have to create it with the following command: @@ -87,167 +95,32 @@ the following command: Usage ----- -Please see the [man page](http://muennich.github.com/sxiv/sxiv.1.html) for -information on how to use sxiv. +Please see man page for information on how to use nsxiv. To do so, execute the +following after the installation: + + $ man nsxiv -Download & Changelog --------------------- +F.A.Q +----- -You can [browse](https://github.com/muennich/sxiv) the source code repository +* Can I open remote urls with nsxiv?
+Yes, see [nsxiv-url](https://github.com/nsxiv/nsxiv/wiki/nsxiv-url) + +* Can I open all the images in a directory?
+Yes, see [nsxiv-rifle](https://github.com/nsxiv/nsxiv/wiki/nsxiv-rifle) + +* Can I set default arguments for nsxiv?
+Yes, see [nsxiv-env](https://github.com/nsxiv/nsxiv/wiki/nsxiv-env) + +* Can I pipe images into nsxiv?
+No, not yet. See https://github.com/nsxiv/nsxiv/issues/32 + + +Download +-------- + +You can [browse](https://github.com/nsxiv/nsxiv) the source code repository on GitHub or get a copy using git with the following command: - git clone https://github.com/muennich/sxiv.git - -**Stable releases** - -**[v26](https://github.com/muennich/sxiv/archive/v26.tar.gz)** -*(January 16, 2020)* - - * Maintenance release - -**[v25](https://github.com/muennich/sxiv/archive/v25.tar.gz)** -*(January 26, 2019)* - - * Support font fallback for missing glyphs - * Fix busy loop when built without inotify - * Use background/foreground colors from X resource database - -**[v24](https://github.com/muennich/sxiv/archive/v24.tar.gz)** -*(October 27, 2017)* - - * Automatically reload the current image whenever it changes - * Support embedding into other X windows with -e (e.g. tabbed) - * New option -p prevents sxiv from creating cache and temporary files - * Simpler mouse mappings, the most basic features are accessible with the - mouse only (navigate, zoom, pan) - -**[v1.3.2](https://github.com/muennich/sxiv/archive/v1.3.2.tar.gz)** -*(December 20, 2015)* - - * external key handler gets file paths on stdin, not as arguments - * Cache out-of-view thumbnails in the background - * Apply gamma correction to thumbnails - -**[v1.3.1](https://github.com/muennich/sxiv/archive/v1.3.1.tar.gz)** -*(November 16, 2014)* - - * Fixed build error, caused by delayed config.h creation - * Fixed segfault when run with -c - -**[v1.3](https://github.com/muennich/sxiv/archive/v1.3.tar.gz)** -*(October 24, 2014)* - - * Extract thumbnails from EXIF tags (requires libexif) - * Zoomable thumbnails, supported sizes defined in config.h - * Fixed build error with giflib version >= 5.1.0 - -**[v1.2](https://github.com/muennich/sxiv/archive/v1.2.tar.gz)** -*(April 24, 2014)* - - * Added external key handler, called on keys prefixed with `Ctrl-x` - * New keybinding `{`/`}` to change gamma (by András Mohari) - * Support for slideshows, enabled with `-S` option & toggled with `s` - * Added application icon (created by 0ion9) - * Checkerboard background for alpha layer - * Option `-o` only prints files marked with `m` key - * Fixed rotation/flipping of multi-frame images (gifs) - -**[v1.1.1](https://github.com/muennich/sxiv/archive/v1.1.1.tar.gz)** -*(June 2, 2013)* - - * Various bug fixes - -**[v1.1](https://github.com/muennich/sxiv/archive/v1.1.tar.gz)** -*(March 30, 2013)* - - * Added status bar on bottom of window with customizable content - * New keyboard shortcuts `\`/`|`: flip image vertically/horizontally - * New keyboard shortcut `Ctrl-6`: go to last/alternate image - * Added own EXIF orientation handling, removed dependency on libexif - * Fixed various bugs - -**[v1.0](https://github.com/muennich/sxiv/archive/v1.0.tar.gz)** -*(October 31, 2011)* - - * Support for multi-frame images & GIF animations - * POSIX compliant (IEEE Std 1003.1-2001) - -**[v0.9](https://github.com/muennich/sxiv/archive/v0.9.tar.gz)** -*(August 17, 2011)* - - * Made key and mouse mappings fully configurable in config.h - * Complete code refactoring - -**[v0.8.2](https://github.com/muennich/sxiv/archive/v0.8.2.tar.gz)** -*(June 29, 2011)* - - * POSIX-compliant Makefile; compiles under NetBSD - -**[v0.8.1](https://github.com/muennich/sxiv/archive/v0.8.1.tar.gz)** -*(May 8, 2011)* - - * Fixed fullscreen under window managers, which are not fully EWMH-compliant - -**[v0.8](https://github.com/muennich/sxiv/archive/v0.8.tar.gz)** -*(April 18, 2011)* - - * Support for thumbnail caching - * Ability to run external commands (e.g. jpegtran, convert) on current image - -**[v0.7](https://github.com/muennich/sxiv/archive/v0.7.tar.gz)** -*(February 26, 2011)* - - * Sort directory entries when using `-r` command line option - * Hide cursor in image mode - * Full functional thumbnail mode, use Return key to switch between image and - thumbnail mode - -**[v0.6](https://github.com/muennich/sxiv/archive/v0.6.tar.gz)** -*(February 16, 2011)* - - * Bug fix: Correctly display filenames with umlauts in window title - * Basic support of thumbnails - -**[v0.5](https://github.com/muennich/sxiv/archive/v0.5.tar.gz)** -*(February 6, 2011)* - - * New command line option: `-r`: open all images in given directories - * New key shortcuts: `w`: resize image to fit into window; `W`: resize window - to fit to image - -**[v0.4](https://github.com/muennich/sxiv/archive/v0.4.tar.gz)** -*(February 1, 2011)* - - * New command line option: `-F`, `-g`: use fixed window dimensions and apply - a given window geometry - * New key shortcut: `r`: reload current image - -**[v0.3.1](https://github.com/muennich/sxiv/archive/v0.3.1.tar.gz)** -*(January 30, 2011)* - - * Bug fix: Do not set setuid bit on executable when using `make install` - * Pan image with mouse while pressing middle mouse button - -**[v0.3](https://github.com/muennich/sxiv/archive/v0.3.tar.gz)** -*(January 29, 2011)* - - * New command line options: `-d`, `-f`, `-p`, `-s`, `-v`, `-w`, `-Z`, `-z` - * More mouse mappings: Go to next/previous image with left/right click, - scroll image with mouse wheel (horizontally if Shift key is pressed), - zoom image with mouse wheel if Ctrl key is pressed - -**[v0.2](https://github.com/muennich/sxiv/archive/v0.2.tar.gz)** -*(January 23, 2011)* - - * Bug fix: Handle window resizes correctly - * New keyboard shortcuts: `g`/`G`: go to first/last image; `[`/`]`: go 10 - images back/forward - * Support for mouse wheel zooming (by Dave Reisner) - * Added fullscreen mode - -**[v0.1](https://github.com/muennich/sxiv/archive/v0.1.tar.gz)** -*(January 21, 2011)* - - * Initial release - + $ git clone https://github.com/nsxiv/nsxiv.git diff --git a/TODO b/TODO deleted file mode 100644 index 36a038c..0000000 --- a/TODO +++ /dev/null @@ -1,5 +0,0 @@ -- Load all frames from TIFF files. We have to write our own loader for this to - happen--just like we did for GIF images--because Imlib2 does not support - multiple frames. Issue #241. -- Add support for more embedded thumbnail formats. Right now, sxiv seems to use - the smallest one. Issue #238. diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..a5d54ac --- /dev/null +++ b/TODO.md @@ -0,0 +1,8 @@ +To Do +----- + + * Add support for more embedded thumbnail formats. Right now, nsxiv seems to use + the smallest one. [Issue #238](https://github.com/muennich/sxiv/issues/238). + * Load all frames from TIFF files. We have to write our own loader for this to + happen--just like we did for GIF images--because Imlib2 does not support + multiple frames. [Issue #241](https://github.com/muennich/sxiv/issues/241). diff --git a/autoreload_inotify.c b/autoreload_inotify.c index 7c5b09a..7982e0d 100644 --- a/autoreload_inotify.c +++ b/autoreload_inotify.c @@ -1,22 +1,22 @@ /* Copyright 2017 Max Voit, Bert Muennich * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#include "sxiv.h" +#include "nsxiv.h" #include #include diff --git a/autoreload_nop.c b/autoreload_nop.c index a0427af..4f5702f 100644 --- a/autoreload_nop.c +++ b/autoreload_nop.c @@ -1,22 +1,22 @@ /* Copyright 2017 Max Voit * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#include "sxiv.h" +#include "nsxiv.h" void arl_init(arl_t *arl) { diff --git a/commands.c b/commands.c index f685bc0..aad2c3c 100644 --- a/commands.c +++ b/commands.c @@ -1,22 +1,22 @@ /* Copyright 2011, 2012, 2014 Bert Muennich * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#include "sxiv.h" +#include "nsxiv.h" #define _IMAGE_CONFIG #include "config.h" diff --git a/config.def.h b/config.def.h index 449f43b..0d0b6a9 100644 --- a/config.def.h +++ b/config.def.h @@ -16,7 +16,7 @@ enum { #ifdef _TITLE_CONFIG /* default title prefix */ -static const char *TITLE_PREFIX = "sxiv - "; +static const char *TITLE_PREFIX = "nsxiv - "; /* default title suffixmode, available options are: * SUFFIX_EMPTY diff --git a/exec/image-info b/exec/image-info index da610cf..f608527 100755 --- a/exec/image-info +++ b/exec/image-info @@ -1,8 +1,8 @@ #!/bin/sh -# Example for $XDG_CONFIG_HOME/sxiv/exec/image-info -# Called by sxiv(1) whenever an image gets loaded. -# The output is displayed in sxiv's status bar. +# Example for $XDG_CONFIG_HOME/nsxiv/exec/image-info +# Called by nsxiv(1) whenever an image gets loaded. +# The output is displayed in nsxiv's status bar. # Arguments: # $1: path to image file # $2: image width diff --git a/exec/key-handler b/exec/key-handler index 3b50e4c..614e1ec 100755 --- a/exec/key-handler +++ b/exec/key-handler @@ -1,11 +1,11 @@ #!/bin/sh -# Example for $XDG_CONFIG_HOME/sxiv/exec/key-handler -# Called by sxiv(1) after the external prefix key (C-x by default) is pressed. +# Example for $XDG_CONFIG_HOME/nsxiv/exec/key-handler +# Called by nsxiv(1) after the external prefix key (C-x by default) is pressed. # The next key combo is passed as its first argument. Passed via stdin are the # images to act upon, one path per line: all marked images, if in thumbnail # mode and at least one image has been marked, otherwise the current image. -# sxiv(1) blocks until this script terminates. It then checks which images +# nsxiv(1) blocks until this script terminates. It then checks which images # have been modified and reloads them. # The key combo argument has the following form: "[C-][M-][S-]KEY", diff --git a/icon/128x128.png b/icon/128x128.png index 3076cd73cc5e6ec7dcb139826ac5629d0c3ec5c0..d45250b80769ef098cf165978d2cea7df50c38d0 100644 GIT binary patch delta 1056 zcmV+*1mF9f1gZ#-8Gix*002x}_M89!010qNS#tmY3labT3lag+-G2N400Z1fL_t(| z+U?xWi%nr1$MHMIuPBnRuwaa&l+iFF%|f!4kl0PJv$4`_EU~e)v75!LkSO^BBuR}Q zq0}Tl*OFMs&Z$$kTzh&VT7#V-w@ky{_it=cSR~ z-?ekb+s}~nh-d%+0006200aO42mk;O0J@d2F5e5H0|)>B06+i$fB*mh0RR93K*zE& z|3%SrGEGzTT#eM9ulfCS03!$h0ssI6004;ebpY|1u~n;AtltQLKsFpb!3bgmMO@QO zTh~nz-$aHKMI{wf{72qFLgKmY)M000010007jrbPb#1^K+OOb3Kl z{g?rQsD88np;SLkfPktWAwXEwj}0KW>i432EM@8Dqkr-@%v?Iob%6aWzcuM*af}!M z%u26BB5VLFrI(cm7{EpKvn>4HmL6|iIp70e{@9KD*Y`f%?Q-b{46-Qz<_}Z2C2HYEPYD`bAUA0CQtr){IKN@z2)+3 z)8F!R?zyVE=ksRy%d^GPP5_Dw(xVxJLFsGe!l`e9rwpkP)r4V4@!S?Ls=dYWcyYC9%-G|rZ27QM9OQD2_ft?Z5pF&xRW>IA{ z3@ht%DL;jVXOWYO&yqeUkA@cU&<*)Mum;edLbeh&L*KyF?HA)Fh>v0ap79ccFrJJP zXMY%;nv?6e6qFuZ(!#F0UG&xXnxSZ7EaEq_N%Aa0PIRyJiQ+6H>zJ{>J< zV8+l2z+m}1Z2}Dj^%+Xu6ZYo=G#Iq(hQ#UecijYf3`!WvZDRO@j2?qwhRV*U`(RdO z@;Bo~#`q3h%}CwIJGl3W!%ev5@FA@L?0;6@=}w?+5Lp0V?Mrq*)9P1l03Fh{Z zk{w`B{rbz_^)?V<6C|vCEgfK1eI?UB+$Km^`|=%NTz!ShKe#4HSo?afgacjvT>(&@ zP^M7A@(-^AsJ$+}M_dmk@xpM;=(0~Rs;D1U0dKUts?}q^xF9Z;k z0*FchM702FKm!_ZdBE_`=TI1KKm!`kfCgL`kdMwZbG{Zp#Q-V>P%(gt0aOoopaQ_d zv>IUN&l{%9XABGW(Y6f$zTQoqhu~EV_-Xn+1X~2yo4XIdy8y7aW`EBCAm;46-A5h( z0?w}6edGZk;D78o=4~DT0?w{u-Zlha`hETRS-fr&4*&uA^R{g`kpX}bk(m!WBLKh( z2{0v`auc|-sZ55NE{ zAjn<>P+CKPAO_?K;sL}w#Q;E%BuEyJ7sxPxk{?afV00^007ql;(etB0sy!c z;Orw>C%Ewi0eWRXUJwJc7@)-f)ztzYpv3^aEMSSi0`$KF)B(&CG@t<@=o|k8pfg3V SIgtPW00{s|MNUMnLSTY#M%c~( diff --git a/icon/16x16.png b/icon/16x16.png index c5cff994990d2b4c2a221846aba72d32fa9bb643..a19074a025468d8b1ad47329561607ef0fe4e4a3 100644 GIT binary patch delta 245 zcmV{Zw?jbT*@x=qCB|s7Y*%X8ir1NY|00000NkvXXu0mjfiIHLR delta 161 zcmV;S0ABxw0gs;YQ8X; zqs}X`gdxC;)S?8E80J$*L5rGV5Xnmv)EdAWq#@-75>f)B^QmLC P00000NkvXXu0mjf{+vST diff --git a/icon/32x32.png b/icon/32x32.png index 01a62f4aaa785e657c48775817dd6616490a5a36..e18ccf8f2d085ddfd2acd32f635f5649207734c5 100644 GIT binary patch delta 406 zcmV;H0crl-0i^?w8Gix*008_L?V|ty010qNS#tmY3labT3lag+-G2N400CD?L_t(Y z$757dFkzqo+`WGqNGdCu;!?oGKx0623m7R3qJj4T%`ISorvzjGNfr3TiDVD)AmVfI zV<9qFh|E?HL+KvLR0#@v84WY`iAg#5fnj3v2rrB91UeObK!3dH^T|Kj_W*U=mA7 zTpz(NB_`6o$-sUO0K5VW19#sAOad`9_4WuB=D@m!ooy93Vnr*fAoJ3GrrT8o8Q^v| zYM_AKiK>BuNGOCmK@jS}vrvNE0o)A)A$bIp4k!kq=z{~;AqoE+|#7OHzJsM@h-a#yA#TO=k7ic7@AzNfL z%7&JM_#FIL1~>@|iE-&!U`f>EC1J9wba;3Se3W5z#DF=7pnq%V>L6lVgQ#5b6jtOF zgCqgN#OBd*Xw*T2xW!0hZlY5NQRo`#htSPS2p^i}`3$6kkez}Fh<6-gnNt^pwdUR` zS~vv`=6#j|lGCe=h)qKwN@28f4IE^)o&zGHLI?uPKCCEv$3$IsK*9zSU=1yF2SMBf zBwO?XJ{{PECVwSbVnxvUq`*hSyY=GD2geo#5tZ#%et(FThlz0wC_L870TGc7(pOio zid#oi2myhvs$n>%JcP||@`mgTNHENR;RGZhK}8@b0K*Bw_<2SI4Uv$Bhzm1FP?29! zli@5p5eIh@VF$qjiE?KV6I4vN5)i4OMN&`!6AdKYkY!o9;twRU0o+ZH3JnqL!{S1Ven8GYfOVD ivS=7(lmybCOG5z4BE^#GprGLZ0000TnAnDFA2>YxR065yb#~5x9{qHh-7Ac??hxP!LcMJdR4y zpqg_SfLd2`00}^9&G`BVU>CT}w#Qsv8vp|H1yVo+VT-PS73g$i5LQ6M!T|7jX#s}d z6R-wr!Eb;g_yQV$AtVhv0nkDKdjLzM);5~ii?vj4q6p)QmM2K9YmZ()Wxl!AHYevIO^mVaO>ctA_{&22NA)F zs2~*abrumF#Ld9L^~havd3kb|yXK)B^|1Q?q7h1az)NTX& zZYvmm3=-*#qj#qf*7yExU*El}i%{%HymDlHu1~8(7NSxZ-j{EHB`7o*IUe$m4@pX4|N(KPS zkVx+V+~Q=A09?~w`?XJ$Y;Y^b!vhK>cI@KZIUVsU8ae?jLW02BOp@q72snf0$EexRZod zlVb(HK@7ld0>O|rTtCdP4bjJG{|Z)Vg`$CnAv}fno1kuR_Z&6@X&Qb&1Hm9Xh$lV% zJ0RTzC|3im8%W>S$NjmG*7Q(KpaK}_iTNWpi}ZFNo|&Vm35cCObodQj11W6+O7-xw s0I5h%1?Wo;K8v#W5011hX4Qo delta 303 zcmV+~0nq;J1iu218Gi!+005o0f$RVP03J|GR7D~nH2?qqFkpiF@-}utikan5tTHk; zly2EqV`{!ImSu6&0002oNkl~$P&+pf4OEgavJ6%L zgeilW6;KJ81WO92G)F+tfJra_DPb?br0^hyfGscp>;-TLLhuN%1x5*b0ek|05(KaZ zU<&|B5WpUQLnuh)G@u573cw)%sGkO^0&L-1fEzO5C>v3pyej|z002ovPDHLkV1jYx Bci{j4 diff --git a/icon/Makefile b/icon/Makefile index bbb4786..f660cc5 100644 --- a/icon/Makefile +++ b/icon/Makefile @@ -7,6 +7,6 @@ install: for f in $(ICONS); do \ dir="$(DESTDIR)$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \ mkdir -p "$$dir"; \ - cp "$$f" "$$dir/sxiv.png"; \ - chmod 644 "$$dir/sxiv.png"; \ + cp "$$f" "$$dir/nsxiv.png"; \ + chmod 644 "$$dir/nsxiv.png"; \ done diff --git a/image.c b/image.c index 1c1e4d2..7689c75 100644 --- a/image.c +++ b/image.c @@ -1,22 +1,22 @@ /* Copyright 2011, 2012 Bert Muennich * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#include "sxiv.h" +#include "nsxiv.h" #define _IMAGE_CONFIG #include "config.h" diff --git a/main.c b/main.c index 61f728f..52062ca 100644 --- a/main.c +++ b/main.c @@ -1,22 +1,22 @@ /* Copyright 2011-2013 Bert Muennich * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#include "sxiv.h" +#include "nsxiv.h" #define _MAPPINGS_CONFIG #include "config.h" @@ -136,7 +136,7 @@ void remove_file(int n, bool manual) if (filecnt == 1) { if (!manual) - fprintf(stderr, "sxiv: no more files to display, aborting\n"); + fprintf(stderr, "nsxiv: no more files to display, aborting\n"); exit(manual ? EXIT_SUCCESS : EXIT_FAILURE); } if (files[n].flags & FF_MARK) @@ -919,11 +919,12 @@ int main(int argc, char **argv) if (homedir != NULL) { extcmd_t *cmd[] = { &info.f, &keyhandler.f }; const char *name[] = { "image-info", "key-handler" }; + const char *s = "/nsxiv/exec/"; for (i = 0; i < ARRLEN(cmd); i++) { - n = strlen(homedir) + strlen(dsuffix) + strlen(name[i]) + 12; + n = strlen(homedir) + strlen(dsuffix) + strlen(name[i]) + strlen(s) + 1; cmd[i]->cmd = (char*) emalloc(n); - snprintf(cmd[i]->cmd, n, "%s%s/sxiv/exec/%s", homedir, dsuffix, name[i]); + snprintf(cmd[i]->cmd, n, "%s%s%s%s", homedir, dsuffix, s, name[i]); if (access(cmd[i]->cmd, X_OK) != 0) cmd[i]->err = errno; } diff --git a/sxiv.1 b/nsxiv.1 similarity index 82% rename from sxiv.1 rename to nsxiv.1 index ed32bf2..5d25099 100644 --- a/sxiv.1 +++ b/nsxiv.1 @@ -1,8 +1,8 @@ -.TH SXIV 1 sxiv\-VERSION +.TH NSXIV 1 nsxiv\-VERSION .SH NAME -sxiv \- Simple X Image Viewer +nsxiv \- Simple X Image Viewer .SH SYNOPSIS -.B sxiv +.B nsxiv .RB [ \-abcfhiopqrtvZ ] .RB [ \-A .IR FRAMERATE ] @@ -26,7 +26,7 @@ sxiv \- Simple X Image Viewer .IR ZOOM ] .IR FILE ... .SH DESCRIPTION -sxiv is a simple image viewer for X. +nsxiv is a simple image viewer for X. .P It has two modes of operation: image and thumbnail mode. The default is image mode, in which only the current image is shown. In thumbnail mode a grid of @@ -50,7 +50,7 @@ Do not show info bar on bottom of window. Remove all orphaned cache files from the thumbnail cache directory and exit. .TP .BI "\-e " WID -Embed sxiv's window into window whose ID is +Embed nsxiv's window into window whose ID is .IR WID . .TP .B \-f @@ -64,7 +64,7 @@ Set window position and size. See section GEOMETRY SPECIFICATIONS of X(7) for more information on GEOMETRY argument. .TP .BI "\-N " NAME -Set the resource name of sxiv's X window to NAME. +Set the resource name of nsxiv's X window to NAME. .TP .BI "\-T " TITLE Set the window title to TITLE. Use the format `prefix:suffixmode'. Any string @@ -77,7 +77,7 @@ literal is accepted for prefix, and the format of suffixmode is: 2 Full path to file .EE -By defualt, prefix is set to "sxiv - " and suffixmode is set to 1 (basename). +By defualt, prefix is set to "nsxiv - " and suffixmode is set to 1 (basename). .TP .BI "\-n " NUM Start at picture number NUM. @@ -92,10 +92,10 @@ Read names of files to open from standard input. Also done if FILE is `-'. Write list of all marked files to standard output when quitting. In combination with .B \-i -sxiv can be used as a visual filter/pipe. +nsxiv can be used as a visual filter/pipe. .TP .B \-p -Enable private mode, in which sxiv does not write any cache or temporary files. +Enable private mode, in which nsxiv does not write any cache or temporary files. .TP .B \-q Be quiet, disable warnings to standard error stream. @@ -134,7 +134,7 @@ Prefix the next command with a number (denoted via .IR count ). .TP .B q -Quit sxiv. +Quit nsxiv. .TP .B Return Switch to thumbnail mode / open selected image in image mode. @@ -414,35 +414,35 @@ Name of Xft bar font Please see xrdb(1) on how to change them. .SH STATUS BAR The information displayed on the left side of the status bar can be replaced -with the output of a user-provided script, which is called by sxiv whenever an +with the output of a user-provided script, which is called by nsxiv whenever an image gets loaded. The path of this script is -.I $XDG_CONFIG_HOME/sxiv/exec/image-info +.I $XDG_CONFIG_HOME/nsxiv/exec/image-info and the arguments given to it are: 1) path to image file, 2) image width, 3) image height. .P -There is also an example script installed together with sxiv as -.IR PREFIX/share/sxiv/exec/image-info . +There is also an example script installed together with nsxiv as +.IR PREFIX/share/nsxiv/exec/image-info . .SH EXTERNAL KEY HANDLER Additional external keyboard commands can be defined using a handler program located in -.IR $XDG_CONFIG_HOME/sxiv/exec/key-handler . +.IR $XDG_CONFIG_HOME/nsxiv/exec/key-handler . The handler is invoked by pressing .BR Ctrl-x . The next key combo is passed as its first argument. Passed via stdin are the images to act upon, one path per line: all marked images, if in thumbnail mode and at least one image has been marked, otherwise the current image. -sxiv(1) will block until the handler terminates. It then checks which images +nsxiv(1) will block until the handler terminates. It then checks which images have been modified and reloads them. The key combo argument has the following form: "[C-][M-][S-]KEY", where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix. -There is also an example script installed together with sxiv as -.IR PREFIX/share/sxiv/exec/key-handler . +There is also an example script installed together with nsxiv as +.IR PREFIX/share/nsxiv/exec/key-handler . .SH THUMBNAIL CACHING -sxiv stores all thumbnails under -.IR $XDG_CACHE_HOME/sxiv/ . +nsxiv stores all thumbnails under +.IR $XDG_CACHE_HOME/nsxiv/ . .P Use the command line option .I \-c @@ -452,20 +452,35 @@ afterwards inside the cache directory to remove empty subdirectories: .RS find . \-depth \-type d \-empty ! \-name '.' \-exec rmdir {} \\; .RE -.SH AUTHOR +.SH ORIGINAL AUTHOR .EX -Bert Muennich +Bert Muennich +.EE +.SH CURRENT MAINTAINERS +.EX +Anupam Ashish Minz +Berke Kocaoğlu +Guilherme Freire +Kian Kasad +N-R-K +Stein Gunnar Bakkeby +TAAPArthur +explosion-mental +eylles +qsmodo .EE .SH CONTRIBUTORS .EX -Bastien Dejean -Dave Reisner -Fung SzeTat -Max Voit +Bastien Dejean +Dave Reisner +Fung SzeTat +Max Voit + +For additional contributors, run `git shortlog -s` in the nsxiv repository. .EE .SH HOMEPAGE .EX -https://github.com/muennich/sxiv +https://github.com/nsxiv/nsxiv .EE .SH SEE ALSO .BR X (7), diff --git a/sxiv.desktop b/nsxiv.desktop similarity index 88% rename from sxiv.desktop rename to nsxiv.desktop index 46826be..1e1e611 100644 --- a/sxiv.desktop +++ b/nsxiv.desktop @@ -1,8 +1,8 @@ [Desktop Entry] Type=Application -Name=sxiv +Name=nsxiv GenericName=Image Viewer -Exec=sxiv %F +Exec=nsxiv %F MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/png;image/tiff;image/x-bmp;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-tga;image/x-xpixmap;image/webp; NoDisplay=true -Icon=sxiv +Icon=nsxiv diff --git a/sxiv.h b/nsxiv.h similarity index 96% rename from sxiv.h rename to nsxiv.h index 902446d..2c41bf7 100644 --- a/sxiv.h +++ b/nsxiv.h @@ -1,23 +1,23 @@ /* Copyright 2011 Bert Muennich * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#ifndef SXIV_H -#define SXIV_H +#ifndef NSXIV_H +#define NSXIV_H #include #include @@ -456,5 +456,5 @@ void win_set_title(win_t*, const char*); void win_set_cursor(win_t*, cursor_t); void win_cursor_pos(win_t*, int*, int*); -#endif /* SXIV_H */ +#endif /* NSXIV_H */ diff --git a/options.c b/options.c index e89b6f1..31cfa39 100644 --- a/options.c +++ b/options.c @@ -1,22 +1,22 @@ /* Copyright 2011 Bert Muennich * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#include "sxiv.h" +#include "nsxiv.h" #define _IMAGE_CONFIG #define _TITLE_CONFIG #include "config.h" @@ -31,14 +31,14 @@ const opt_t *options = (const opt_t*) &_options; void print_usage(void) { - printf("usage: sxiv [-abcfhiopqrtvZ] [-A FRAMERATE] [-e WID] [-G GAMMA] " + printf("usage: nsxiv [-abcfhiopqrtvZ] [-A FRAMERATE] [-e WID] [-G GAMMA] " "[-g GEOMETRY] [-N NAME] [-T TITLE] [-n NUM] [-S DELAY] [-s MODE] " "[-z ZOOM] FILES...\n"); } void print_version(void) { - puts("sxiv " VERSION); + puts("nsxiv " VERSION); } void parse_options(int argc, char **argv) diff --git a/thumbs.c b/thumbs.c index 3aa03fb..1850f52 100644 --- a/thumbs.c +++ b/thumbs.c @@ -1,22 +1,22 @@ /* Copyright 2011 Bert Muennich * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#include "sxiv.h" +#include "nsxiv.h" #define _THUMBS_CONFIG #include "config.h" @@ -172,10 +172,11 @@ void tns_init(tns_t *tns, fileinfo_t *files, const int *cnt, int *sel, dsuffix = "/.cache"; } if (homedir != NULL) { + const char *s = "/nsxiv"; free(cache_dir); - len = strlen(homedir) + strlen(dsuffix) + 6; + len = strlen(homedir) + strlen(dsuffix) + strlen(s) + 1; cache_dir = (char*) emalloc(len); - snprintf(cache_dir, len, "%s%s/sxiv", homedir, dsuffix); + snprintf(cache_dir, len, "%s%s%s", homedir, dsuffix, s); } else { error(0, 0, "Cache directory not found"); } @@ -272,7 +273,7 @@ bool tns_load(tns_t *tns, int n, bool force, bool cache_only) ExifContent *ifd; ExifByteOrder byte_order; int tmpfd; - char tmppath[] = "/tmp/sxiv-XXXXXX"; + char tmppath[] = "/tmp/nsxiv-XXXXXX"; Imlib_Image tmpim; if ((ed = exif_data_new_from_file(file->path)) != NULL) { diff --git a/util.c b/util.c index b956fd7..fa0f0e3 100644 --- a/util.c +++ b/util.c @@ -1,22 +1,22 @@ /* Copyright 2011 Bert Muennich * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#include "sxiv.h" +#include "nsxiv.h" #include #include diff --git a/window.c b/window.c index dd17134..3cd6c4a 100644 --- a/window.c +++ b/window.c @@ -1,22 +1,22 @@ /* Copyright 2011-2013 Bert Muennich * - * This file is part of sxiv. + * This file is a part of nsxiv. * - * sxiv is free software; you can redistribute it and/or modify + * nsxiv is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * - * sxiv is distributed in the hope that it will be useful, + * nsxiv is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with sxiv. If not, see . + * along with nsxiv. If not, see . */ -#include "sxiv.h" +#include "nsxiv.h" #define _WINDOW_CONFIG #include "config.h" #include "icon/data.h" @@ -30,7 +30,7 @@ #include #include -#define RES_CLASS "Sxiv" +#define RES_CLASS "Nsxiv" enum { H_TEXT_PAD = 5, @@ -277,11 +277,11 @@ void win_open(win_t *win) free(icon_data); /* These two atoms won't change and thus only need to be set once. */ - XStoreName(win->env.dpy, win->xwin, "sxiv"); - XSetIconName(win->env.dpy, win->xwin, "sxiv"); + XStoreName(win->env.dpy, win->xwin, "nsxiv"); + XSetIconName(win->env.dpy, win->xwin, "nsxiv"); classhint.res_class = RES_CLASS; - classhint.res_name = options->res_name != NULL ? options->res_name : "sxiv"; + classhint.res_name = options->res_name != NULL ? options->res_name : "nsxiv"; XSetClassHint(e->dpy, win->xwin, &classhint); XSetWMProtocols(e->dpy, win->xwin, &atoms[ATOM_WM_DELETE_WINDOW], 1);