Krolyxon
Commit 7cce7ea

Branches

Refs →

nsxiv7cce7ea

Rename, Update Docs and Prepare for Release (#9)

Author
Berke Kocaoğlu
Date
2021-09-16 12:32 +0300
Committer
Berke Kocaoğlu · 2021-09-16 22:55 +0300
Parent
9c73646
Commit
7cce7ea857321c854fc9e061edee3a32f4831d18

+405 −307

28 files changed

  1. M .gitignore +1 −1
  2. A CHANGELOG.md +182 −0
  3. A CONTRIBUTING.md +23 −0
  4. M Makefile +20 −20
  5. M README.md +51 −178
  6. D TODO +0 −5
  7. A TODO.md +8 −0
  8. M autoreload_inotify.c +5 −5
  9. M autoreload_nop.c +5 −5
  10. M commands.c +5 −5
  11. M config.def.h +1 −1
  12. M exec/image-info +3 −3
  13. M exec/key-handler +3 −3
  14. M icon/128x128.png
  15. M icon/16x16.png
  16. M icon/32x32.png
  17. M icon/48x48.png
  18. M icon/64x64.png
  19. M icon/Makefile +2 −2
  20. M image.c +5 −5
  21. M main.c +9 −8
  22. R sxiv.1 → nsxiv.1 +42 −27
  23. R sxiv.desktop → nsxiv.desktop +3 −3
  24. R sxiv.h → nsxiv.h +7 −7
  25. M options.c +7 −7
  26. M thumbs.c +9 −8
  27. M util.c +5 −5
  28. M window.c +9 −9
M .gitignore View
@@ -2,5 +2,5 @@ config.h
22 version.h
33 *.d
44 *.o
5−sxiv
5+nsxiv
66 config.mk
A CHANGELOG.md View
@@ -0,0 +1,182 @@
1+nsxiv
2+-----
3+
4+**Stable releases**
5+
6+**[v27](https://github.com/nsxiv/nsxiv/archive/v27.tar.gz)**
7+*(September 14, 2021)*
8+
9+Changes:
10+ * Re-release under the name nsxiv
11+ * Sxiv.foreground and Sxiv.background changed to Nsxiv.window.foreground and Nsxiv.window.background
12+ * Rework the build system (#19). Now by default we'll build with only optional dependencies that are already installed
13+Added:
14+ * Fill scale mode (#2)
15+ * Configurable X window title (via `config.h` and the `-T` flag) (#23)
16+ * Support custom bar colors via Xresources (#19)
17+ * Toggle animation playback with Ctrl-a (#33)
18+ * Set `_NET_WM_PID` and `WM_CLIENT_MACHINE` X properties (#13)
19+ * Set ICCCM WM manager hints (#12)
20+Fixes:
21+ * Cli flag `-G` not initially setting gamma (#31)
22+ * Wrong keybinding description in the manpage (#14)
23+ * .desktop entry not advertising webp support (#15)
24+ * Prevent crash when embedded into transparent window (#3)
25+ * Rare crash when showing some GIFs (#41)
26+ * Rare event when nsxiv wouldn't close after window being destroyed (#53)
27+
28+
29+sxiv
30+----
31+
32+**Stable releases**
33+
34+**[v26](https://github.com/nsxiv/nsxiv/archive/v26.tar.gz)**
35+*(January 16, 2020)*
36+
37+ * Maintenance release
38+
39+**[v25](https://github.com/nsxiv/nsxiv/archive/v25.tar.gz)**
40+*(January 26, 2019)*
41+
42+ * Support font fallback for missing glyphs
43+ * Fix busy loop when built without inotify
44+ * Use background/foreground colors from X resource database
45+
46+**[v24](https://github.com/nsxiv/nsxiv/archive/v24.tar.gz)**
47+*(October 27, 2017)*
48+
49+ * Automatically reload the current image whenever it changes
50+ * Support embedding into other X windows with -e (e.g. tabbed)
51+ * New option -p prevents sxiv from creating cache and temporary files
52+ * Simpler mouse mappings, the most basic features are accessible with the
53+ mouse only (navigate, zoom, pan)
54+
55+**[v1.3.2](https://github.com/nsxiv/nsxiv/archive/v1.3.2.tar.gz)**
56+*(December 20, 2015)*
57+
58+ * external key handler gets file paths on stdin, not as arguments
59+ * Cache out-of-view thumbnails in the background
60+ * Apply gamma correction to thumbnails
61+
62+**[v1.3.1](https://github.com/nsxiv/nsxiv/archive/v1.3.1.tar.gz)**
63+*(November 16, 2014)*
64+
65+ * Fixed build error, caused by delayed config.h creation
66+ * Fixed segfault when run with -c
67+
68+**[v1.3](https://github.com/nsxiv/nsxiv/archive/v1.3.tar.gz)**
69+*(October 24, 2014)*
70+
71+ * Extract thumbnails from EXIF tags (requires libexif)
72+ * Zoomable thumbnails, supported sizes defined in config.h
73+ * Fixed build error with giflib version >= 5.1.0
74+
75+**[v1.2](https://github.com/nsxiv/nsxiv/archive/v1.2.tar.gz)**
76+*(April 24, 2014)*
77+
78+ * Added external key handler, called on keys prefixed with `Ctrl-x`
79+ * New keybinding `{`/`}` to change gamma (by András Mohari)
80+ * Support for slideshows, enabled with `-S` option & toggled with `s`
81+ * Added application icon (created by 0ion9)
82+ * Checkerboard background for alpha layer
83+ * Option `-o` only prints files marked with `m` key
84+ * Fixed rotation/flipping of multi-frame images (gifs)
85+
86+**[v1.1.1](https://github.com/nsxiv/nsxiv/archive/v1.1.1.tar.gz)**
87+*(June 2, 2013)*
88+
89+ * Various bug fixes
90+
91+**[v1.1](https://github.com/nsxiv/nsxiv/archive/v1.1.tar.gz)**
92+*(March 30, 2013)*
93+
94+ * Added status bar on bottom of window with customizable content
95+ * New keyboard shortcuts `\`/`|`: flip image vertically/horizontally
96+ * New keyboard shortcut `Ctrl-6`: go to last/alternate image
97+ * Added own EXIF orientation handling, removed dependency on libexif
98+ * Fixed various bugs
99+
100+**[v1.0](https://github.com/nsxiv/nsxiv/archive/v1.0.tar.gz)**
101+*(October 31, 2011)*
102+
103+ * Support for multi-frame images & GIF animations
104+ * POSIX compliant (IEEE Std 1003.1-2001)
105+
106+**[v0.9](https://github.com/nsxiv/nsxiv/archive/v0.9.tar.gz)**
107+*(August 17, 2011)*
108+
109+ * Made key and mouse mappings fully configurable in config.h
110+ * Complete code refactoring
111+
112+**[v0.8.2](https://github.com/nsxiv/nsxiv/archive/v0.8.2.tar.gz)**
113+*(June 29, 2011)*
114+
115+ * POSIX-compliant Makefile; compiles under NetBSD
116+
117+**[v0.8.1](https://github.com/nsxiv/nsxiv/archive/v0.8.1.tar.gz)**
118+*(May 8, 2011)*
119+
120+ * Fixed fullscreen under window managers, which are not fully EWMH-compliant
121+
122+**[v0.8](https://github.com/nsxiv/nsxiv/archive/v0.8.tar.gz)**
123+*(April 18, 2011)*
124+
125+ * Support for thumbnail caching
126+ * Ability to run external commands (e.g. jpegtran, convert) on current image
127+
128+**[v0.7](https://github.com/nsxiv/nsxiv/archive/v0.7.tar.gz)**
129+*(February 26, 2011)*
130+
131+ * Sort directory entries when using `-r` command line option
132+ * Hide cursor in image mode
133+ * Full functional thumbnail mode, use Return key to switch between image and
134+ thumbnail mode
135+
136+**[v0.6](https://github.com/nsxiv/nsxiv/archive/v0.6.tar.gz)**
137+*(February 16, 2011)*
138+
139+ * Bug fix: Correctly display filenames with umlauts in window title
140+ * Basic support of thumbnails
141+
142+**[v0.5](https://github.com/nsxiv/nsxiv/archive/v0.5.tar.gz)**
143+*(February 6, 2011)*
144+
145+ * New command line option: `-r`: open all images in given directories
146+ * New key shortcuts: `w`: resize image to fit into window; `W`: resize window
147+ to fit to image
148+
149+**[v0.4](https://github.com/nsxiv/nsxiv/archive/v0.4.tar.gz)**
150+*(February 1, 2011)*
151+
152+ * New command line option: `-F`, `-g`: use fixed window dimensions and apply
153+ a given window geometry
154+ * New key shortcut: `r`: reload current image
155+
156+**[v0.3.1](https://github.com/nsxiv/nsxiv/archive/v0.3.1.tar.gz)**
157+*(January 30, 2011)*
158+
159+ * Bug fix: Do not set setuid bit on executable when using `make install`
160+ * Pan image with mouse while pressing middle mouse button
161+
162+**[v0.3](https://github.com/nsxiv/nsxiv/archive/v0.3.tar.gz)**
163+*(January 29, 2011)*
164+
165+ * New command line options: `-d`, `-f`, `-p`, `-s`, `-v`, `-w`, `-Z`, `-z`
166+ * More mouse mappings: Go to next/previous image with left/right click,
167+ scroll image with mouse wheel (horizontally if Shift key is pressed),
168+ zoom image with mouse wheel if Ctrl key is pressed
169+
170+**[v0.2](https://github.com/nsxiv/nsxiv/archive/v0.2.tar.gz)**
171+*(January 23, 2011)*
172+
173+ * Bug fix: Handle window resizes correctly
174+ * New keyboard shortcuts: `g`/`G`: go to first/last image; `[`/`]`: go 10
175+ images back/forward
176+ * Support for mouse wheel zooming (by Dave Reisner)
177+ * Added fullscreen mode
178+
179+**[v0.1](https://github.com/nsxiv/nsxiv/archive/v0.1.tar.gz)**
180+*(January 21, 2011)*
181+
182+ * Initial release
A CONTRIBUTING.md View
@@ -0,0 +1,23 @@
1+Contribution Guideline
2+----------------------
3+
4+The scope and aim of nsxiv are:
5+
6+ * Bug fixes and maintenance
7+ * Prioritize extensibility and simplicity
8+ * Do not make the codebase more complex, keep it simple to hack on
9+ * Do not add extra dependency (if we do, add compile time switch to disable it)
10+ * New features may be added if it cannot be achieved (easily) via a shell script,
11+ doesn't break backwards compatibility and doesn't violate any of the above rules.
12+
13+When contributing, make sure:
14+
15+ * Your contribution falls under nsxiv's scope and aim
16+ * You follow the existing code style (see [.editorconfig](.editorconfig))
17+ * You open the pull request from a new branch, not from master
18+
19+If your contribution is not suitable for general use, it will not be included in nsxiv.
20+For changes that are very much up to preference, such as changing values in config.h,
21+please do not open a pull request unless you have an objective explanation.
22+
23+See [TODO.md](TODO.md) or the [open issues](https://github.com/nsxiv/nsxiv/issues) to find something to work on.
M Makefile View
@@ -3,8 +3,8 @@ ifneq (clean,$(filter clean,$(MAKECMDGOALS)))
33 -include config.mk
44 endif
55
6−# sxiv version
7−VERSION = 26
6+# nsxiv version
7+VERSION = 27
88
99 # PREFIX for install
1010 PREFIX ?= /usr/local
@@ -40,9 +40,9 @@ OBJS = autoreload_$(AUTORELOAD).o commands.o image.o main.o options.o \
4040 .SUFFIXES:
4141 .SUFFIXES: .c .o
4242
43−all: sxiv
43+all: nsxiv
4444
45−sxiv: $(OBJS)
45+nsxiv: $(OBJS)
4646 @echo "LINK $@"
4747 $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
4848
@@ -50,7 +50,7 @@ sxiv: $(OBJS)
5050 @echo "CC $@"
5151 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
5252
53−$(OBJS): Makefile sxiv.h commands.lst config.h config.mk
53+$(OBJS): Makefile nsxiv.h commands.lst config.h config.mk
5454 options.o: version.h
5555 window.o: icon/data.h
5656
@@ -73,24 +73,24 @@ version.h: Makefile .git/index
7373 echo "#define VERSION \"$${v:-$(VERSION)}\"" >$@
7474
7575 clean:
76− $(RM) *.o sxiv
76+ $(RM) *.o nsxiv
7777
7878 install: all
79− @echo "INSTALL bin/sxiv"
80− install -Dt $(DESTDIR)$(PREFIX)/bin sxiv
81− @echo "INSTALL sxiv.1"
79+ @echo "INSTALL bin/nsxiv"
80+ install -Dt $(DESTDIR)$(PREFIX)/bin nsxiv
81+ @echo "INSTALL nsxiv.1"
8282 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
83− sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" sxiv.1 \
84− >$(DESTDIR)$(MANPREFIX)/man1/sxiv.1
85− chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
86− @echo "INSTALL share/sxiv/"
87− install -Dt $(DESTDIR)$(PREFIX)/share/sxiv/exec exec/*
83+ sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" nsxiv.1 \
84+ >$(DESTDIR)$(MANPREFIX)/man1/nsxiv.1
85+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/nsxiv.1
86+ @echo "INSTALL share/nsxiv/"
87+ install -Dt $(DESTDIR)$(PREFIX)/share/nsxiv/exec exec/*
8888
8989 uninstall:
90− @echo "REMOVE bin/sxiv"
91− rm -f $(DESTDIR)$(PREFIX)/bin/sxiv
92− @echo "REMOVE sxiv.1"
93− rm -f $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
94− @echo "REMOVE share/sxiv/"
95− rm -rf $(DESTDIR)$(PREFIX)/share/sxiv
90+ @echo "REMOVE bin/nsxiv"
91+ rm -f $(DESTDIR)$(PREFIX)/bin/nsxiv
92+ @echo "REMOVE nsxiv.1"
93+ rm -f $(DESTDIR)$(MANPREFIX)/man1/nsxiv.1
94+ @echo "REMOVE share/nsxiv/"
95+ rm -rf $(DESTDIR)$(PREFIX)/share/nsxiv
9696
M README.md View
@@ -1,11 +1,16 @@
1−![sxiv](http://muennich.github.com/sxiv/img/logo.png "sxiv")
1+![nsxiv](https://raw.githubusercontent.com/nsxiv/nsxiv/gh-pages/img/logo.png "nsxiv")
22
3−**Simple X Image Viewer**
3+**Neo (or New or Not) Simple (or Small or Suckless) X Image Viewer**
4+--------------------------------------------------------------------
45
5−The sole purpose of sxiv is to be the perfect image viewer for me. It is free
6−software so that you can use it and modify it for your needs. Please file a bug
7−report if something does not work as documented or expected. Contributions are
8−welcome but there is no guarantee that they will be incorporated.
6+nsxiv is a fork of now unmaintained [sxiv](https://github.com/muennich/sxiv)
7+with the purpose of maintaining it and adding simple, sensible features.
8+nsxiv is free software licensed under GPLv2 and aims to be easy to modify and customize.
9+
10+Please file a bug report if something does not work as documented or
11+expected in *this* repository, after making sure you are using the latest
12+release of nsxiv. Contributions are welcome, see [CONTRIBUTING.md](CONTRIBUTING.md)
13+for details.
914
1015
1116 Features
@@ -16,26 +21,27 @@ Features
1621 * Thumbnail mode: grid of selectable previews of all images
1722 * Ability to cache thumbnails for fast re-loading
1823 * Basic support for multi-frame images
19−* Load all frames from GIF files and play GIF animations
24+* Play GIF animations
2025 * Display image information in status bar
26+* Display image name/path in X title
2127
2228
2329 Screenshots
2430 -----------
2531
26−**Image mode:**
32+**Image mode: (Default colors)**
2733
28−![Image](http://muennich.github.com/sxiv/img/image.png "Image mode")
34+![Image](https://raw.githubusercontent.com/nsxiv/nsxiv/gh-pages/img/image.png "Image mode")
2935
30−**Thumbnail mode:**
36+**Thumbnail mode: (Custom colors)**
3137
32−![Thumb](http://muennich.github.com/sxiv/img/thumb.png "Thumb mode")
38+![Thumb](https://raw.githubusercontent.com/nsxiv/nsxiv/gh-pages/img/thumb.png "Thumb mode")
3339
3440
3541 Dependencies
3642 ------------
3743
38−sxiv requires the following software to be installed:
44+nsxiv requires the following software to be installed:
3945
4046 * Imlib2
4147 * X11
@@ -46,37 +52,39 @@ sxiv requires the following software to be installed:
4652 * libexif (optional, automatically enabled if installed)
4753
4854 Please make sure to install the corresponding development packages in case that
49−you want to build sxiv on a distribution with separate runtime and development
50−packages (e.g. *-dev on Debian).
55+you want to build nsxiv on a distribution with separate runtime and development
56+packages (e.g. \*-dev on Debian).
5157
5258
5359 Building
5460 --------
5561
56−sxiv is built using the commands:
62+nsxiv is built using the commands:
5763
5864 $ make
59− # make install
60−
61−Please note, that the latter one requires root privileges.
62−By default, sxiv is installed using the prefix "/usr/local", so the full path
63−of the executable will be "/usr/local/bin/sxiv".
6465
6566 Running make will automatically detect if libexif and libgif are available and
6667 enable them if so. CLI arguments will override any automatic detection.
6768 For example:
6869
69− $ make HAVE_LIBGIF=0
70+ $ make HAVE_LIBGIF=0
7071
7172 will always disable libgif.
7273 Alternatively, they can be disabled via editing `config.mk`.
7374
74−You can install sxiv into a directory of your choice by changing the second
75−command to:
75+Installing nsxiv:
76+
77+ # make install
78+
79+Please note, that this requires root privileges.
80+By default, nsxiv is installed using the prefix "/usr/local", so the full path
81+of the executable will be "/usr/local/bin/nsxiv".
82+
83+You can install nsxiv into a directory of your choice by changing this command to:
7684
77− # make PREFIX="/your/dir" install
85+ $ make PREFIX="/your/dir" install
7886
79−The build-time specific settings of sxiv can be found in the file *config.h*.
87+The build-time specific settings of nsxiv can be found in the file *config.h*.
8088 Please check and change them, so that they fit your needs.
8189 If the file *config.h* does not already exist, then you have to create it with
8290 the following command:
@@ -87,167 +95,32 @@ the following command:
8795 Usage
8896 -----
8997
90−Please see the [man page](http://muennich.github.com/sxiv/sxiv.1.html) for
91−information on how to use sxiv.
92−
93−
94−Download & Changelog
95−--------------------
96−
97−You can [browse](https://github.com/muennich/sxiv) the source code repository
98−on GitHub or get a copy using git with the following command:
99−
100− git clone https://github.com/muennich/sxiv.git
101−
102−**Stable releases**
103−
104−**[v26](https://github.com/muennich/sxiv/archive/v26.tar.gz)**
105−*(January 16, 2020)*
106−
107− * Maintenance release
108−
109−**[v25](https://github.com/muennich/sxiv/archive/v25.tar.gz)**
110−*(January 26, 2019)*
111−
112− * Support font fallback for missing glyphs
113− * Fix busy loop when built without inotify
114− * Use background/foreground colors from X resource database
115−
116−**[v24](https://github.com/muennich/sxiv/archive/v24.tar.gz)**
117−*(October 27, 2017)*
118−
119− * Automatically reload the current image whenever it changes
120− * Support embedding into other X windows with -e (e.g. tabbed)
121− * New option -p prevents sxiv from creating cache and temporary files
122− * Simpler mouse mappings, the most basic features are accessible with the
123− mouse only (navigate, zoom, pan)
124−
125−**[v1.3.2](https://github.com/muennich/sxiv/archive/v1.3.2.tar.gz)**
126−*(December 20, 2015)*
127−
128− * external key handler gets file paths on stdin, not as arguments
129− * Cache out-of-view thumbnails in the background
130− * Apply gamma correction to thumbnails
131−
132−**[v1.3.1](https://github.com/muennich/sxiv/archive/v1.3.1.tar.gz)**
133−*(November 16, 2014)*
134−
135− * Fixed build error, caused by delayed config.h creation
136− * Fixed segfault when run with -c
137−
138−**[v1.3](https://github.com/muennich/sxiv/archive/v1.3.tar.gz)**
139−*(October 24, 2014)*
140−
141− * Extract thumbnails from EXIF tags (requires libexif)
142− * Zoomable thumbnails, supported sizes defined in config.h
143− * Fixed build error with giflib version >= 5.1.0
98+Please see man page for information on how to use nsxiv. To do so, execute the
99+following after the installation:
144100
145−**[v1.2](https://github.com/muennich/sxiv/archive/v1.2.tar.gz)**
146−*(April 24, 2014)*
101+ $ man nsxiv
147102
148− * Added external key handler, called on keys prefixed with `Ctrl-x`
149− * New keybinding `{`/`}` to change gamma (by András Mohari)
150− * Support for slideshows, enabled with `-S` option & toggled with `s`
151− * Added application icon (created by 0ion9)
152− * Checkerboard background for alpha layer
153− * Option `-o` only prints files marked with `m` key
154− * Fixed rotation/flipping of multi-frame images (gifs)
155103
156−**[v1.1.1](https://github.com/muennich/sxiv/archive/v1.1.1.tar.gz)**
157−*(June 2, 2013)*
158−
159− * Various bug fixes
160−
161−**[v1.1](https://github.com/muennich/sxiv/archive/v1.1.tar.gz)**
162−*(March 30, 2013)*
163−
164− * Added status bar on bottom of window with customizable content
165− * New keyboard shortcuts `\`/`|`: flip image vertically/horizontally
166− * New keyboard shortcut `Ctrl-6`: go to last/alternate image
167− * Added own EXIF orientation handling, removed dependency on libexif
168− * Fixed various bugs
169−
170−**[v1.0](https://github.com/muennich/sxiv/archive/v1.0.tar.gz)**
171−*(October 31, 2011)*
172−
173− * Support for multi-frame images & GIF animations
174− * POSIX compliant (IEEE Std 1003.1-2001)
175−
176−**[v0.9](https://github.com/muennich/sxiv/archive/v0.9.tar.gz)**
177−*(August 17, 2011)*
178−
179− * Made key and mouse mappings fully configurable in config.h
180− * Complete code refactoring
181−
182−**[v0.8.2](https://github.com/muennich/sxiv/archive/v0.8.2.tar.gz)**
183−*(June 29, 2011)*
184−
185− * POSIX-compliant Makefile; compiles under NetBSD
186−
187−**[v0.8.1](https://github.com/muennich/sxiv/archive/v0.8.1.tar.gz)**
188−*(May 8, 2011)*
189−
190− * Fixed fullscreen under window managers, which are not fully EWMH-compliant
191−
192−**[v0.8](https://github.com/muennich/sxiv/archive/v0.8.tar.gz)**
193−*(April 18, 2011)*
194−
195− * Support for thumbnail caching
196− * Ability to run external commands (e.g. jpegtran, convert) on current image
197−
198−**[v0.7](https://github.com/muennich/sxiv/archive/v0.7.tar.gz)**
199−*(February 26, 2011)*
200−
201− * Sort directory entries when using `-r` command line option
202− * Hide cursor in image mode
203− * Full functional thumbnail mode, use Return key to switch between image and
204− thumbnail mode
205−
206−**[v0.6](https://github.com/muennich/sxiv/archive/v0.6.tar.gz)**
207−*(February 16, 2011)*
208−
209− * Bug fix: Correctly display filenames with umlauts in window title
210− * Basic support of thumbnails
211−
212−**[v0.5](https://github.com/muennich/sxiv/archive/v0.5.tar.gz)**
213−*(February 6, 2011)*
214−
215− * New command line option: `-r`: open all images in given directories
216− * New key shortcuts: `w`: resize image to fit into window; `W`: resize window
217− to fit to image
218−
219−**[v0.4](https://github.com/muennich/sxiv/archive/v0.4.tar.gz)**
220−*(February 1, 2011)*
221−
222− * New command line option: `-F`, `-g`: use fixed window dimensions and apply
223− a given window geometry
224− * New key shortcut: `r`: reload current image
225−
226−**[v0.3.1](https://github.com/muennich/sxiv/archive/v0.3.1.tar.gz)**
227−*(January 30, 2011)*
104+F.A.Q
105+-----
228106
229− * Bug fix: Do not set setuid bit on executable when using `make install`
230− * Pan image with mouse while pressing middle mouse button
107+* Can I open remote urls with nsxiv? <br>
108+Yes, see [nsxiv-url](https://github.com/nsxiv/nsxiv/wiki/nsxiv-url)
231109
232−**[v0.3](https://github.com/muennich/sxiv/archive/v0.3.tar.gz)**
233−*(January 29, 2011)*
110+* Can I open all the images in a directory? <br>
111+Yes, see [nsxiv-rifle](https://github.com/nsxiv/nsxiv/wiki/nsxiv-rifle)
234112
235− * New command line options: `-d`, `-f`, `-p`, `-s`, `-v`, `-w`, `-Z`, `-z`
236− * More mouse mappings: Go to next/previous image with left/right click,
237− scroll image with mouse wheel (horizontally if Shift key is pressed),
238− zoom image with mouse wheel if Ctrl key is pressed
113+* Can I set default arguments for nsxiv? <br>
114+Yes, see [nsxiv-env](https://github.com/nsxiv/nsxiv/wiki/nsxiv-env)
239115
240−**[v0.2](https://github.com/muennich/sxiv/archive/v0.2.tar.gz)**
241−*(January 23, 2011)*
116+* Can I pipe images into nsxiv? <br>
117+No, not yet. See https://github.com/nsxiv/nsxiv/issues/32
242118
243− * Bug fix: Handle window resizes correctly
244− * New keyboard shortcuts: `g`/`G`: go to first/last image; `[`/`]`: go 10
245− images back/forward
246− * Support for mouse wheel zooming (by Dave Reisner)
247− * Added fullscreen mode
248119
249−**[v0.1](https://github.com/muennich/sxiv/archive/v0.1.tar.gz)**
250−*(January 21, 2011)*
120+Download
121+--------
251122
252− * Initial release
123+You can [browse](https://github.com/nsxiv/nsxiv) the source code repository
124+on GitHub or get a copy using git with the following command:
253125
126+ $ git clone https://github.com/nsxiv/nsxiv.git
D TODO View
@@ -1,5 +0,0 @@
1−- Load all frames from TIFF files. We have to write our own loader for this to
2− happen--just like we did for GIF images--because Imlib2 does not support
3− multiple frames. Issue #241.
4−- Add support for more embedded thumbnail formats. Right now, sxiv seems to use
5− the smallest one. Issue #238.
A TODO.md View
@@ -0,0 +1,8 @@
1+To Do
2+-----
3+
4+ * Add support for more embedded thumbnail formats. Right now, nsxiv seems to use
5+ the smallest one. [Issue #238](https://github.com/muennich/sxiv/issues/238).
6+ * Load all frames from TIFF files. We have to write our own loader for this to
7+ happen--just like we did for GIF images--because Imlib2 does not support
8+ multiple frames. [Issue #241](https://github.com/muennich/sxiv/issues/241).
M autoreload_inotify.c View
@@ -1,22 +1,22 @@
11 /* Copyright 2017 Max Voit, Bert Muennich
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#include "sxiv.h"
19+#include "nsxiv.h"
2020
2121 #include <errno.h>
2222 #include <stdlib.h>
M autoreload_nop.c View
@@ -1,22 +1,22 @@
11 /* Copyright 2017 Max Voit
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#include "sxiv.h"
19+#include "nsxiv.h"
2020
2121 void arl_init(arl_t *arl)
2222 {
M commands.c View
@@ -1,22 +1,22 @@
11 /* Copyright 2011, 2012, 2014 Bert Muennich
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#include "sxiv.h"
19+#include "nsxiv.h"
2020 #define _IMAGE_CONFIG
2121 #include "config.h"
2222
M config.def.h View
@@ -16,7 +16,7 @@ enum {
1616 #ifdef _TITLE_CONFIG
1717
1818 /* default title prefix */
19−static const char *TITLE_PREFIX = "sxiv - ";
19+static const char *TITLE_PREFIX = "nsxiv - ";
2020
2121 /* default title suffixmode, available options are:
2222 * SUFFIX_EMPTY
M exec/image-info View
@@ -1,8 +1,8 @@
11 #!/bin/sh
22
3−# Example for $XDG_CONFIG_HOME/sxiv/exec/image-info
4−# Called by sxiv(1) whenever an image gets loaded.
5−# The output is displayed in sxiv's status bar.
3+# Example for $XDG_CONFIG_HOME/nsxiv/exec/image-info
4+# Called by nsxiv(1) whenever an image gets loaded.
5+# The output is displayed in nsxiv's status bar.
66 # Arguments:
77 # $1: path to image file
88 # $2: image width
M exec/key-handler View
@@ -1,11 +1,11 @@
11 #!/bin/sh
22
3−# Example for $XDG_CONFIG_HOME/sxiv/exec/key-handler
4−# Called by sxiv(1) after the external prefix key (C-x by default) is pressed.
3+# Example for $XDG_CONFIG_HOME/nsxiv/exec/key-handler
4+# Called by nsxiv(1) after the external prefix key (C-x by default) is pressed.
55 # The next key combo is passed as its first argument. Passed via stdin are the
66 # images to act upon, one path per line: all marked images, if in thumbnail
77 # mode and at least one image has been marked, otherwise the current image.
8−# sxiv(1) blocks until this script terminates. It then checks which images
8+# nsxiv(1) blocks until this script terminates. It then checks which images
99 # have been modified and reloads them.
1010
1111 # The key combo argument has the following form: "[C-][M-][S-]KEY",
M icon/128x128.png View

[Binary file]

M icon/16x16.png View

[Binary file]

M icon/32x32.png View

[Binary file]

M icon/48x48.png View

[Binary file]

M icon/64x64.png View

[Binary file]

M icon/Makefile View
@@ -7,6 +7,6 @@ install:
77 for f in $(ICONS); do \
88 dir="$(DESTDIR)$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \
99 mkdir -p "$$dir"; \
10− cp "$$f" "$$dir/sxiv.png"; \
11− chmod 644 "$$dir/sxiv.png"; \
10+ cp "$$f" "$$dir/nsxiv.png"; \
11+ chmod 644 "$$dir/nsxiv.png"; \
1212 done
M image.c View
@@ -1,22 +1,22 @@
11 /* Copyright 2011, 2012 Bert Muennich
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#include "sxiv.h"
19+#include "nsxiv.h"
2020 #define _IMAGE_CONFIG
2121 #include "config.h"
2222
M main.c View
@@ -1,22 +1,22 @@
11 /* Copyright 2011-2013 Bert Muennich
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#include "sxiv.h"
19+#include "nsxiv.h"
2020 #define _MAPPINGS_CONFIG
2121 #include "config.h"
2222
@@ -136,7 +136,7 @@ void remove_file(int n, bool manual)
136136
137137 if (filecnt == 1) {
138138 if (!manual)
139− fprintf(stderr, "sxiv: no more files to display, aborting\n");
139+ fprintf(stderr, "nsxiv: no more files to display, aborting\n");
140140 exit(manual ? EXIT_SUCCESS : EXIT_FAILURE);
141141 }
142142 if (files[n].flags & FF_MARK)
@@ -919,11 +919,12 @@ int main(int argc, char **argv)
919919 if (homedir != NULL) {
920920 extcmd_t *cmd[] = { &info.f, &keyhandler.f };
921921 const char *name[] = { "image-info", "key-handler" };
922+ const char *s = "/nsxiv/exec/";
922923
923924 for (i = 0; i < ARRLEN(cmd); i++) {
924− n = strlen(homedir) + strlen(dsuffix) + strlen(name[i]) + 12;
925+ n = strlen(homedir) + strlen(dsuffix) + strlen(name[i]) + strlen(s) + 1;
925926 cmd[i]->cmd = (char*) emalloc(n);
926− snprintf(cmd[i]->cmd, n, "%s%s/sxiv/exec/%s", homedir, dsuffix, name[i]);
927+ snprintf(cmd[i]->cmd, n, "%s%s%s%s", homedir, dsuffix, s, name[i]);
927928 if (access(cmd[i]->cmd, X_OK) != 0)
928929 cmd[i]->err = errno;
929930 }
R sxiv.1 → nsxiv.1 View
@@ -1,8 +1,8 @@
1−.TH SXIV 1 sxiv\-VERSION
1+.TH NSXIV 1 nsxiv\-VERSION
22 .SH NAME
3−sxiv \- Simple X Image Viewer
3+nsxiv \- Simple X Image Viewer
44 .SH SYNOPSIS
5−.B sxiv
5+.B nsxiv
66 .RB [ \-abcfhiopqrtvZ ]
77 .RB [ \-A
88 .IR FRAMERATE ]
@@ -26,7 +26,7 @@ sxiv \- Simple X Image Viewer
2626 .IR ZOOM ]
2727 .IR FILE ...
2828 .SH DESCRIPTION
29−sxiv is a simple image viewer for X.
29+nsxiv is a simple image viewer for X.
3030 .P
3131 It has two modes of operation: image and thumbnail mode. The default is image
3232 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.
5050 Remove all orphaned cache files from the thumbnail cache directory and exit.
5151 .TP
5252 .BI "\-e " WID
53−Embed sxiv's window into window whose ID is
53+Embed nsxiv's window into window whose ID is
5454 .IR WID .
5555 .TP
5656 .B \-f
@@ -64,7 +64,7 @@ Set window position and size. See section GEOMETRY SPECIFICATIONS of X(7) for
6464 more information on GEOMETRY argument.
6565 .TP
6666 .BI "\-N " NAME
67−Set the resource name of sxiv's X window to NAME.
67+Set the resource name of nsxiv's X window to NAME.
6868 .TP
6969 .BI "\-T " TITLE
7070 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:
7777 2 Full path to file
7878 .EE
7979
80−By defualt, prefix is set to "sxiv - " and suffixmode is set to 1 (basename).
80+By defualt, prefix is set to "nsxiv - " and suffixmode is set to 1 (basename).
8181 .TP
8282 .BI "\-n " NUM
8383 Start at picture number NUM.
@@ -92,10 +92,10 @@ Read names of files to open from standard input. Also done if FILE is `-'.
9292 Write list of all marked files to standard output when quitting. In combination
9393 with
9494 .B \-i
95−sxiv can be used as a visual filter/pipe.
95+nsxiv can be used as a visual filter/pipe.
9696 .TP
9797 .B \-p
98−Enable private mode, in which sxiv does not write any cache or temporary files.
98+Enable private mode, in which nsxiv does not write any cache or temporary files.
9999 .TP
100100 .B \-q
101101 Be quiet, disable warnings to standard error stream.
@@ -134,7 +134,7 @@ Prefix the next command with a number (denoted via
134134 .IR count ).
135135 .TP
136136 .B q
137−Quit sxiv.
137+Quit nsxiv.
138138 .TP
139139 .B Return
140140 Switch to thumbnail mode / open selected image in image mode.
@@ -414,35 +414,35 @@ Name of Xft bar font
414414 Please see xrdb(1) on how to change them.
415415 .SH STATUS BAR
416416 The information displayed on the left side of the status bar can be replaced
417−with the output of a user-provided script, which is called by sxiv whenever an
417+with the output of a user-provided script, which is called by nsxiv whenever an
418418 image gets loaded. The path of this script is
419−.I $XDG_CONFIG_HOME/sxiv/exec/image-info
419+.I $XDG_CONFIG_HOME/nsxiv/exec/image-info
420420 and the arguments given to it are: 1) path to image file, 2) image width,
421421 3) image height.
422422 .P
423−There is also an example script installed together with sxiv as
424−.IR PREFIX/share/sxiv/exec/image-info .
423+There is also an example script installed together with nsxiv as
424+.IR PREFIX/share/nsxiv/exec/image-info .
425425 .SH EXTERNAL KEY HANDLER
426426 Additional external keyboard commands can be defined using a handler program
427427 located in
428−.IR $XDG_CONFIG_HOME/sxiv/exec/key-handler .
428+.IR $XDG_CONFIG_HOME/nsxiv/exec/key-handler .
429429 The handler is invoked by pressing
430430 .BR Ctrl-x .
431431 The next key combo is passed as its first argument. Passed via stdin are the
432432 images to act upon, one path per line: all marked images, if in thumbnail mode
433433 and at least one image has been marked, otherwise the current image.
434−sxiv(1) will block until the handler terminates. It then checks which images
434+nsxiv(1) will block until the handler terminates. It then checks which images
435435 have been modified and reloads them.
436436
437437 The key combo argument has the following form: "[C-][M-][S-]KEY",
438438 where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X
439439 keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix.
440440
441−There is also an example script installed together with sxiv as
442−.IR PREFIX/share/sxiv/exec/key-handler .
441+There is also an example script installed together with nsxiv as
442+.IR PREFIX/share/nsxiv/exec/key-handler .
443443 .SH THUMBNAIL CACHING
444−sxiv stores all thumbnails under
445−.IR $XDG_CACHE_HOME/sxiv/ .
444+nsxiv stores all thumbnails under
445+.IR $XDG_CACHE_HOME/nsxiv/ .
446446 .P
447447 Use the command line option
448448 .I \-c
@@ -452,20 +452,35 @@ afterwards inside the cache directory to remove empty subdirectories:
452452 .RS
453453 find . \-depth \-type d \-empty ! \-name '.' \-exec rmdir {} \\;
454454 .RE
455−.SH AUTHOR
455+.SH ORIGINAL AUTHOR
456456 .EX
457−Bert Muennich <ber.t at posteo.de>
457+Bert Muennich <ber.t at posteo.de>
458+.EE
459+.SH CURRENT MAINTAINERS
460+.EX
461+Anupam Ashish Minz
462+Berke Kocaoğlu <berke.kocaoglu at metu.edu.tr>
463+Guilherme Freire
464+Kian Kasad <kian at kasad.com>
465+N-R-K <nrk at disroot.org>
466+Stein Gunnar Bakkeby <bakkeby at gmail.com>
467+TAAPArthur <taaparthur at gmail.com>
468+explosion-mental <explosion0mental at gmail.com>
469+eylles <ed.ylles1997 at gmail.com>
470+qsmodo
458471 .EE
459472 .SH CONTRIBUTORS
460473 .EX
461−Bastien Dejean <nihilhill at gmail.com>
462−Dave Reisner <d at falconindy.com>
463−Fung SzeTat <sthorde at gmail.com>
464−Max Voit <mvdev at with-eyes.net>
474+Bastien Dejean <nihilhill at gmail.com>
475+Dave Reisner <d at falconindy.com>
476+Fung SzeTat <sthorde at gmail.com>
477+Max Voit <mvdev at with-eyes.net>
478+
479+For additional contributors, run `git shortlog -s` in the nsxiv repository.
465480 .EE
466481 .SH HOMEPAGE
467482 .EX
468−https://github.com/muennich/sxiv
483+https://github.com/nsxiv/nsxiv
469484 .EE
470485 .SH SEE ALSO
471486 .BR X (7),
R sxiv.desktop → nsxiv.desktop View
@@ -1,8 +1,8 @@
11 [Desktop Entry]
22 Type=Application
3−Name=sxiv
3+Name=nsxiv
44 GenericName=Image Viewer
5−Exec=sxiv %F
5+Exec=nsxiv %F
66 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;
77 NoDisplay=true
8−Icon=sxiv
8+Icon=nsxiv
R sxiv.h → nsxiv.h View
@@ -1,23 +1,23 @@
11 /* Copyright 2011 Bert Muennich
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#ifndef SXIV_H
20−#define SXIV_H
19+#ifndef NSXIV_H
20+#define NSXIV_H
2121
2222 #include <stdarg.h>
2323 #include <stdbool.h>
@@ -456,5 +456,5 @@ void win_set_title(win_t*, const char*);
456456 void win_set_cursor(win_t*, cursor_t);
457457 void win_cursor_pos(win_t*, int*, int*);
458458
459−#endif /* SXIV_H */
459+#endif /* NSXIV_H */
460460
M options.c View
@@ -1,22 +1,22 @@
11 /* Copyright 2011 Bert Muennich
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#include "sxiv.h"
19+#include "nsxiv.h"
2020 #define _IMAGE_CONFIG
2121 #define _TITLE_CONFIG
2222 #include "config.h"
@@ -31,14 +31,14 @@ const opt_t *options = (const opt_t*) &_options;
3131
3232 void print_usage(void)
3333 {
34− printf("usage: sxiv [-abcfhiopqrtvZ] [-A FRAMERATE] [-e WID] [-G GAMMA] "
34+ printf("usage: nsxiv [-abcfhiopqrtvZ] [-A FRAMERATE] [-e WID] [-G GAMMA] "
3535 "[-g GEOMETRY] [-N NAME] [-T TITLE] [-n NUM] [-S DELAY] [-s MODE] "
3636 "[-z ZOOM] FILES...\n");
3737 }
3838
3939 void print_version(void)
4040 {
41− puts("sxiv " VERSION);
41+ puts("nsxiv " VERSION);
4242 }
4343
4444 void parse_options(int argc, char **argv)
M thumbs.c View
@@ -1,22 +1,22 @@
11 /* Copyright 2011 Bert Muennich
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#include "sxiv.h"
19+#include "nsxiv.h"
2020 #define _THUMBS_CONFIG
2121 #include "config.h"
2222
@@ -172,10 +172,11 @@ void tns_init(tns_t *tns, fileinfo_t *files, const int *cnt, int *sel,
172172 dsuffix = "/.cache";
173173 }
174174 if (homedir != NULL) {
175+ const char *s = "/nsxiv";
175176 free(cache_dir);
176− len = strlen(homedir) + strlen(dsuffix) + 6;
177+ len = strlen(homedir) + strlen(dsuffix) + strlen(s) + 1;
177178 cache_dir = (char*) emalloc(len);
178− snprintf(cache_dir, len, "%s%s/sxiv", homedir, dsuffix);
179+ snprintf(cache_dir, len, "%s%s%s", homedir, dsuffix, s);
179180 } else {
180181 error(0, 0, "Cache directory not found");
181182 }
@@ -272,7 +273,7 @@ bool tns_load(tns_t *tns, int n, bool force, bool cache_only)
272273 ExifContent *ifd;
273274 ExifByteOrder byte_order;
274275 int tmpfd;
275− char tmppath[] = "/tmp/sxiv-XXXXXX";
276+ char tmppath[] = "/tmp/nsxiv-XXXXXX";
276277 Imlib_Image tmpim;
277278
278279 if ((ed = exif_data_new_from_file(file->path)) != NULL) {
M util.c View
@@ -1,22 +1,22 @@
11 /* Copyright 2011 Bert Muennich
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#include "sxiv.h"
19+#include "nsxiv.h"
2020
2121 #include <stdlib.h>
2222 #include <string.h>
M window.c View
@@ -1,22 +1,22 @@
11 /* Copyright 2011-2013 Bert Muennich
22 *
3− * This file is part of sxiv.
3+ * This file is a part of nsxiv.
44 *
5− * sxiv is free software; you can redistribute it and/or modify
5+ * nsxiv is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published
77 * by the Free Software Foundation; either version 2 of the License,
88 * or (at your option) any later version.
99 *
10− * sxiv is distributed in the hope that it will be useful,
10+ * nsxiv is distributed in the hope that it will be useful,
1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 * GNU General Public License for more details.
1414 *
1515 * You should have received a copy of the GNU General Public License
16− * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
16+ * along with nsxiv. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19−#include "sxiv.h"
19+#include "nsxiv.h"
2020 #define _WINDOW_CONFIG
2121 #include "config.h"
2222 #include "icon/data.h"
@@ -30,7 +30,7 @@
3030 #include <X11/Xatom.h>
3131 #include <X11/Xresource.h>
3232
33−#define RES_CLASS "Sxiv"
33+#define RES_CLASS "Nsxiv"
3434
3535 enum {
3636 H_TEXT_PAD = 5,
@@ -277,11 +277,11 @@ void win_open(win_t *win)
277277 free(icon_data);
278278
279279 /* These two atoms won't change and thus only need to be set once. */
280− XStoreName(win->env.dpy, win->xwin, "sxiv");
281− XSetIconName(win->env.dpy, win->xwin, "sxiv");
280+ XStoreName(win->env.dpy, win->xwin, "nsxiv");
281+ XSetIconName(win->env.dpy, win->xwin, "nsxiv");
282282
283283 classhint.res_class = RES_CLASS;
284− classhint.res_name = options->res_name != NULL ? options->res_name : "sxiv";
284+ classhint.res_name = options->res_name != NULL ? options->res_name : "nsxiv";
285285 XSetClassHint(e->dpy, win->xwin, &classhint);
286286
287287 XSetWMProtocols(e->dpy, win->xwin, &atoms[ATOM_WM_DELETE_WINDOW], 1);