diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2017-03-30 21:17:00 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2017-03-30 23:00:15 +0530 |
commit | c42790aa189339a9562128b486ebdd82fed79f8c (patch) | |
tree | 48fac59b39c19957b7afe643d4836c5d70144a80 /README.md | |
parent | 6b169bbd86de60eeb893051f60284fbfc0cfb226 (diff) | |
download | nnn-c42790aa189339a9562128b486ebdd82fed79f8c.tar.gz |
Support file name copier
Add keybind 'Ctrl-k' to copy the absolute path of the file under the cursor if environment variable NOICE_COPIER is set.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -13,6 +13,7 @@ A fork of the [noice](http://git.2f30.org/noice/) file browser to make it more f - [Keyboard shortcuts](#keyboard-shortcuts) - [File type abbreviations](#file-type-abbreviations) - [Help](#help) +- [Copy current file path to clipboard](#copy-current-file-path-to-clipboard) - [Change file associations](#change-file-associations) ### Introduction @@ -54,8 +55,9 @@ I chose to fork noice because: - Case-insensitive alphabetic content listing instead of upper case first - Roll over at the first and last entries of a directory (with Up/Down keys) - Sort entries by file size (largest to smallest) + - Shortcut to invoke file name copier (set using environment variable `NOICE_COPIER`) - File associations - - Environment variable `NOICE_OPENER` to override all associations and open all files with your desktop environments default file opener. Examples: + - Environment variable `NOICE_OPENER` to override all associations and open all files with your desktop environment's default file opener. Examples: export NOICE_OPENER=xdg-open export NOICE_OPENER=gnome-open @@ -113,6 +115,7 @@ Start noice (default: current directory): | `e` | edit entry in `vim` | | `p` | open entry with `less` pager | | `z` | run `top` | +| `Ctrl-k` | invoke file name copier | | `Ctrl-l` | redraw window | | `q` | quit noice | @@ -134,6 +137,22 @@ The following abbreviations are used in the detail view: $ man noice +### Copy current file path to clipboard + +noice can pipe the absolute path of the current file to a copier script. For example, you can use `xsel` on Linux or `pbcopy` on OS X. + +Sample Linux copier script: + + #!/bin/sh + + echo -n $1 | xsel --clipboard --input + +export `NOICE_OPENER`: + + export NOICE_COPIER="/home/vaio/copier.sh" + +Start noice and use `Ctrl-k` to copy the absolute path (from `/`) of the file under the cursor to clipboard. + ### Change file 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](https://github.com/jarun/noice/blob/master/config.def.h) (it's easy). Then re-compile and install. |