README.md | 10 +++++++++- noice.1 | 4 ++++ noice.c | 4 ++-- diff --git a/README.md b/README.md index 4500b0d105b35c4daf137115b473b04b970af5be..de056b5ec8e98c48570e07a37ab11549e358e329 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ - Remove video file associations (to each his own favourite video player) - Associate common audio file types with lightweight fmedia (http://fmedia.firmdev.com/) - Associate PDF files with zathura - Removed less - - Use `xdg-open` to open other unrecognised files + - Use environment variable `NOICE_FALLBACK_OPENER` to open other non-associated files - Compilation - Use `-O3` for compilation, fixed warnings - Added compilation flag `-march=native` (compile only, no plans to package). @@ -32,3 +32,11 @@ ## Help $ man noice + +## Change associations + +If you want to set custom applications for certain mime types, or change the ones set already (e.g. vim, fmedia, zathura), modify the `assocs` structure in **config.def.h** (it's easy). Then run the following commands to re-compile and install: + + $ make clean + $ make + $ sudo make install diff --git a/noice.1 b/noice.1 index 603af0511b81016f0cff8542392e3491daf70137..d39be8fbaaea6b436757f50cb3f256ff610e5c22 100644 --- a/noice.1 +++ b/noice.1 @@ -109,6 +109,10 @@ \fBNOICE_OPENER:\fR set to your desktop environment's default mime opener to override all custom mime associations. .br Examples: xdg-open, gnome-open, gvfs-open. +.Pp +\fBNOICE_FALLBACK_OPENER:\fR set to your desktop environment's default +mime opener to use as a fallback when no association is set for a file +type. Custom associations are listed in the EXAMPLES section below. .Sh EXAMPLES The following example shows one possible configuration for file associations which is also the default if environment diff --git a/noice.c b/noice.c index 7ba37963146cebef31d39dd135498876f6de16ec..03b159c7a2c0f258cf812ab76d390e452a12b963 100644 --- a/noice.c +++ b/noice.c @@ -670,8 +670,8 @@ bin = openwith(newpath); char *execvim = "vim"; if (bin == NULL) { - /* If a custom hander application is not set, open - plain text files with vim, then try xdg-open */ + /* If a custom handler application is not set, open + plain text files with vim, then try fallback_opener */ FILE *fp; char cmd[MAX_LEN]; int status;