mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Document NOICE_FALLBAK_OPENER.
This commit is contained in:
parent
95ca9c3a95
commit
4eaf071fc2
10
README.md
10
README.md
|
@ -18,7 +18,7 @@ Additional customization to make it more friendly towards major distros (which `
|
|||
- 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 @@ Additional customization to make it more friendly towards major distros (which `
|
|||
## 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
|
||||
|
|
4
noice.1
4
noice.1
|
@ -109,6 +109,10 @@ when dealing with the !, e and p commands respectively.
|
|||
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
|
||||
|
|
4
noice.c
4
noice.c
|
@ -670,8 +670,8 @@ nochange:
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue