Open audio files with mpv

This commit is contained in:
Arun Prakash Jana 2017-04-01 03:53:49 +05:30
parent 584a5f90f3
commit 8bbb752a79
No known key found for this signature in database
GPG key ID: A75979F35C080412
3 changed files with 4 additions and 4 deletions

View file

@ -68,7 +68,7 @@ I chose to fork because:
- Selective file associations (ignored if `NNN_OPENER` is set): - Selective file associations (ignored if `NNN_OPENER` is set):
- Associate plain text files with vi (using `file` command) - Associate plain text files with vi (using `file` command)
- Remove video file associations (to each his own favourite video player) - Remove video file associations (to each his own favourite video player)
- Associate common audio mimes with lightweight [fmedia](http://fmedia.firmdev.com/) - Associate common audio mimes with mpv
- Associate PDF files with [zathura](https://pwmt.org/projects/zathura/) - Associate PDF files with [zathura](https://pwmt.org/projects/zathura/)
- Use environment variable `NNN_FALLBACK_OPENER` to open other non-associated files - Use environment variable `NNN_FALLBACK_OPENER` to open other non-associated files
- Removed `less` as default file opener (there is no universal standalone opener utility) - Removed `less` as default file opener (there is no universal standalone opener utility)
@ -166,4 +166,4 @@ Start nnn and use `Ctrl-k` to copy the absolute path (from `/`) of the file unde
### Change file associations ### Change file associations
If you want to set custom applications for certain mime types, or change the ones set already (e.g. vi, fmedia, zathura), modify the `assocs` structure in [config.def.h](https://github.com/jarun/nnn/blob/master/config.def.h) (it's easy). Then re-compile and install. If you want to set custom applications for certain mime types, or change the ones set already (e.g. vi, mpv, zathura), modify the `assocs` structure in [config.def.h](https://github.com/jarun/nnn/blob/master/config.def.h) (it's easy). Then re-compile and install.

View file

@ -13,7 +13,7 @@ char *idlecmd = "rain"; /* The screensaver program */
struct assoc assocs[] = { struct assoc assocs[] = {
//{ "\\.(avi|mp4|mkv|mp3|ogg|flac|mov)$", "mpv" }, //{ "\\.(avi|mp4|mkv|mp3|ogg|flac|mov)$", "mpv" },
{ "\\.(c|cpp|h|txt|log|sh)$", "vi" }, { "\\.(c|cpp|h|txt|log|sh)$", "vi" },
{ "\\.(wma|mp3|ogg|flac)$", "fmedia" }, { "\\.(wma|mp3|ogg|flac)$", "mpv" },
//{ "\\.(png|jpg|gif)$", "feh" }, //{ "\\.(png|jpg|gif)$", "feh" },
//{ "\\.(html|svg)$", "firefox" }, //{ "\\.(html|svg)$", "firefox" },
{ "\\.pdf$", "zathura" }, { "\\.pdf$", "zathura" },

2
nnn.1
View file

@ -128,7 +128,7 @@ variable NNN_OPENER is not set:
----------------------------------------------- -----------------------------------------------
struct assoc assocs[] = { struct assoc assocs[] = {
{ "\\.(c|cpp|h|txt|log|sh)$", "vi" }, { "\\.(c|cpp|h|txt|log|sh)$", "vi" },
{ "\\.(wma|mp3|ogg|flac)$", "fmedia" }, { "\\.(wma|mp3|ogg|flac)$", "mpv" },
{ "\\.pdf$", "zathura" }, { "\\.pdf$", "zathura" },
}; };
----------------------------------------------- -----------------------------------------------