diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/MIGRATION.md | 53 | ||||
-rw-r--r-- | etc/nsxiv.1 | 26 |
2 files changed, 79 insertions, 0 deletions
diff --git a/etc/MIGRATION.md b/etc/MIGRATION.md new file mode 100644 index 0000000..db776e0 --- /dev/null +++ b/etc/MIGRATION.md @@ -0,0 +1,53 @@ +# Migrating from `sxiv` + +`nsxiv` is *mostly* a drop-in replacement for `sxiv`, but not fully. +This document outlines some key differences to be aware of if you're migrating +from `sxiv`. + +### Configuration directory + +`sxiv` looks for config files under the directory +`${XDG_CONFIG_HOME:-${HOME}/.config}/sxiv`. E.g +`~/.config/sxiv/exec/key-handler`. + +`nsxiv` uses the same logic to find the config dir but uses the name "nsxiv". +E.g `~/.config/nsxiv/...`. + +The "exec" scripts such as `key-handler` and `image-info` in `nsxiv` has some +more features, but all previous argument order are preserved. And so if you have +any exec scripts, you can simply copy them over and they should just work. + +### Xresources + +The xresources config for `nsxiv` is under the "Nsxiv" namespace whereas `sxiv` +uses the "Sxiv" namespace. Some of the variables are also different between +`nsxiv` and `sxiv`, below is a table that shows the old and new names: + +| sxiv | nsxiv | +| :-- | :-- | +| Sxiv.background | Nsxiv.window.background | +| Sxiv.foreground | Nsxiv.window.foreground | +| Sxiv.barBackground | Nsxiv.bar.background | +| Sxiv.barForeground | Nsxiv.bar.foreground | +| Sxiv.font | Nsxiv.bar.font | + +### Default window class + +The window class of `nsxiv` is set to "Nsxiv" by default (can be overwritten via +`-N` flag). This usually shouldn't matter, unless you have scripts that search +for "Sxiv" window class. + +### Thumbnail cache directory + +Similar to config dir, the thumbnail cache dir of `nsxiv` is under the "nsxiv" +name instead of "sxiv". E.g `~/.cache/nsxiv`. + +The "caching structure" in `nsxiv` is the same as `sxiv`. Which means that you +can simply rename the directory to `nsxiv`: + +```console +$ mv ~/.cache/sxiv ~/.cache/nsxiv +``` + +If you want to have both `sxiv` and `nsxiv` installed at the same time, you can +even use symlink to avoid duplicate cache. diff --git a/etc/nsxiv.1 b/etc/nsxiv.1 index 5edfece..2e01302 100644 --- a/etc/nsxiv.1 +++ b/etc/nsxiv.1 @@ -124,6 +124,14 @@ as an argument, disables it instead. Enables checkerboard background for alpha layer, when given .I no as an argument, disables it instead. +.TP +.BI "\-\-cache\-allow, \-\-cache\-deny " "CACHE\-PATHS" +List of directories to whitelist or blacklist for thumbnail caching. +See +.I "THUMBNAIL CACHING" +section for more information on the argument format. +These options are mutually exclusive, if they are specified more than once then +only the final one takes effect. .SH KEYBOARD COMMANDS .SS General The following keyboard commands are available in both image and thumbnail modes: @@ -559,6 +567,24 @@ afterwards inside the cache directory to remove empty subdirectories: .RS find . \-depth \-type d \-empty ! \-name '.' \-exec rmdir {} \\; .RE +.P +The option +.BR "\-\-cache\-allow " or " \-\-cache\-deny" +may be used to whitelists or blacklist certain directories from being cached. +The argument is a +.B : +separated list of paths. A +.B * +at the beginning of the path indicates that path should be matched recursively. +.P +For example: +.B \-\-cache\-allow \(dq/user/pictures:*/media/pictures\(dq +whitelists \(dq/user/pictures\(dq directory non-recursively and \(dq/media/pictures\(dq +directory recursively. Nothing outside these two directories will be cached. +And +.B \-\-cache\-deny \(dq*/secret\(dq +will enable blacklist mode and will not cache anything inside \(dq/secret\(dq +or it's subdirectories. .SH ORIGINAL AUTHOR .EX Bert Muennich <ber.t at posteo.de> |