瀏覽代碼

Fix #288

master
Arun Prakash Jana 5 年之前
父節點
當前提交
2d1d176160
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: A75979F35C080412
共有 10 個文件被更改,包括 21 次插入22 次删除
  1. +3
    -3
      README.md
  2. +1
    -1
      misc/clipboard-copier/copier
  3. +3
    -7
      nnn.1
  4. +2
    -2
      plugins/README.md
  5. +1
    -1
      plugins/checksum
  6. +7
    -4
      plugins/getplugs
  7. +1
    -1
      plugins/kdeconnect
  8. +1
    -1
      plugins/mocplay
  9. +1
    -1
      plugins/ndiff
  10. +1
    -1
      plugins/splitjoin

+ 3
- 3
README.md 查看文件

@@ -319,7 +319,7 @@ The selection can now be listed, copied, moved, removed, archived or linked.


Navigate to a target directory then use <kbd>V</kbd> (move) or <kbd>P</kbd> (copy) to have the selected files moved or copied. Navigate to a target directory then use <kbd>V</kbd> (move) or <kbd>P</kbd> (copy) to have the selected files moved or copied.


Absolute paths of the selected files are copied to the temporary file `~/.config/nnn/.selection`. The path is shown in the help and configuration screen. If `$NNN_COPIER` is set the file paths are also copied to the system clipboard. Absolute paths of the selected files are copied to the temporary file `.selection` in the config directory. The path is shown in the help and configuration screen. If `$NNN_COPIER` is set the file paths are also copied to the system clipboard.


#### Filters #### Filters


@@ -362,7 +362,7 @@ The following indicators are used in the detail view:


#### Configuration #### Configuration


`nnn` supports the following environment variables for configuration. All of them are optional (set if you need). `nnn` supports the following environment variables for configuration. All of them are optional (set if you need). Any associated files are stored under `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/`.


| Example `export` | Description | | Example `export` | Description |
| --- | --- | | --- | --- |
@@ -397,7 +397,7 @@ Host phone
Port 8022 Port 8022
``` ```


The above host `phone` will be mounted at `~/.config/nnn/phone`. `nnn` creates the directory `phone` if it doesn't exist. The above host `phone` will be mounted at `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/phone`. `nnn` creates the directory `phone` if it doesn't exist.


Notes: Notes:




+ 1
- 1
misc/clipboard-copier/copier 查看文件

@@ -5,7 +5,7 @@
# Shell: POSIX compliant # Shell: POSIX compliant
# Author: Arun Prakash Jana # Author: Arun Prakash Jana


SELECTION=~/.config/nnn/.selection SELECTION=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection


# Linux # Linux
cat "$SELECTION" | xargs -0 | xsel -bi cat "$SELECTION" | xargs -0 | xsel -bi


+ 3
- 7
nnn.1 查看文件

@@ -72,7 +72,7 @@ supports the following options:
.Nm .Nm
uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on macOS) as the desktop opener. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on macOS) as the desktop opener.
.Pp .Pp
There is no configuration file. Settings work on environment variables. See ENVIRONMENT section below. There is no configuration file. Associated files are stored in \fB${XDG_CONFIG_HOME:-$HOME/.config}/nnn/\fR. Settings work on environment variables. See ENVIRONMENT section below.
.Pp .Pp
Configuring Configuring
.Nm .Nm
@@ -132,7 +132,7 @@ Selected files are visually indicated by a \fB+\fR before the entries.
.br .br
The files in the list can now be listed, copied, moved, removed, archived or linked. The files in the list can now be listed, copied, moved, removed, archived or linked.
.br .br
Absolute paths of the selected files are copied to the temporary file \fB~/.config/nnn/.selection\fR. The path is shown in the help and configuration screen. If \fB$NNN_COPIER\fR is set (see ENVIRONMENT section below) the file paths are also copied to the system clipboard. Absolute paths of the selected files are copied to the temporary file \fB.selection\fR in config directory. The path is shown in the help and configuration screen. If \fB$NNN_COPIER\fR is set (see ENVIRONMENT section below) the file paths are also copied to the system clipboard.
.Sh ENVIRONMENT .Sh ENVIRONMENT
The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER. when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.
@@ -159,11 +159,7 @@ when dealing with the !, e and p commands respectively. A single combination to
.Pp .Pp
\fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled). \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled).
.Pp .Pp
\fBNNN_COPIER:\fR system clipboard copier script. \fBNNN_COPIER:\fR system clipboard copier script. The project page has some sample copier scripts.
.Bd -literal
NOTE: File paths are copied to the tmp file \fB~/.config/nnn/.selection\fR.
The path is shown in the help and configuration screen.
.Ed
.Pp .Pp
\fBNNN_NOTE:\fR \fIabsolute\fR path to a note file. \fBNNN_NOTE:\fR \fIabsolute\fR path to a note file.
.Bd -literal .Bd -literal


+ 2
- 2
plugins/README.md 查看文件

@@ -26,7 +26,7 @@


#### Installing plugins #### Installing plugins


Download the `getplugs` plugin and execute it anywhere to get all the plugins installed to `~/.config/nnn/plugins`. You can run it again later to update the plugins. It backs up earlier plugins. Download the `getplugs` plugin and execute it anywhere to get all the plugins installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`. You can run it again later to update the plugins. It backs up earlier plugins.


**NOTE:** `getplugs` also downloads the launcher `nlaunch` and tries to place it at `/usr/local/bin/` using `sudo`. If it fails you have to place `nlauch` manually somewhere in your `$PATH`. **NOTE:** `getplugs` also downloads the launcher `nlaunch` and tries to place it at `/usr/local/bin/` using `sudo`. If it fails you have to place `nlauch` manually somewhere in your `$PATH`.


@@ -35,7 +35,7 @@ Download the `getplugs` plugin and execute it anywhere to get all the plugins in
Plugins can access: Plugins can access:
- all files in the directory (`nnn` switches to the dir where the plugin is to be run so the dir is `$PWD` for the plugin) - all files in the directory (`nnn` switches to the dir where the plugin is to be run so the dir is `$PWD` for the plugin)
- the current file under the cursor (the file name is passed as the argument to a plugin) - the current file under the cursor (the file name is passed as the argument to a plugin)
- the current selection (by reading the file `~/.config/nnn/.selection`, see the plugin `ndiff`) - the current selection (by reading the file `.selection` in config dir, see the plugin `ndiff`)


Each script has a _Description_ section which provides more details on what the script does, if applicable. Each script has a _Description_ section which provides more details on what the script does, if applicable.




+ 1
- 1
plugins/checksum 查看文件

@@ -12,7 +12,7 @@
# Shell: POSIX compliant # Shell: POSIX compliant
# Author: ath3 # Author: ath3


selection=~/.config/nnn/.selection selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
resp=f resp=f
chsum=md5 chsum=md5
ischksum=0 ischksum=0


+ 7
- 4
plugins/getplugs 查看文件

@@ -5,13 +5,16 @@
# Shell: POSIX compliant # Shell: POSIX compliant
# Author: Arun Prakash Jana # Author: Arun Prakash Jana


CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/
PLUGIN_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins

# backup any earlier plugins # backup any earlier plugins
if [ -d ~/.config/nnn/plugins ]; then if [ -d $PLUGIN_DIR ]; then
tar -C ~/.config/nnn/ -cf ~/.config/nnn/"plugins-$(date '+%Y%m%d%H%M').tar.bz2" plugins/ tar -C $CONFIG_DIR -cf $CONFIG_DIR"plugins-$(date '+%Y%m%d%H%M').tar.bz2" plugins/
fi fi


mkdir -p ~/.config/nnn/plugins mkdir -p $PLUGIN_DIR
cd ~/.config/nnn/plugins cd $PLUGIN_DIR
wget -nv --show-progress https://github.com/jarun/nnn/archive/master.tar.gz wget -nv --show-progress https://github.com/jarun/nnn/archive/master.tar.gz
tar -xf master.tar.gz tar -xf master.tar.gz
cp -vf nnn-master/plugins/* . cp -vf nnn-master/plugins/* .


+ 1
- 1
plugins/kdeconnect 查看文件

@@ -5,7 +5,7 @@
# Shell: POSIX compliant # Shell: POSIX compliant
# Author: juacq97 # Author: juacq97


SELECTION=~/.config/nnn/.selection SELECTION=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection


id=$(kdeconnect-cli -a --id-only | awk '{print $1}') id=$(kdeconnect-cli -a --id-only | awk '{print $1}')
if [ "$(find "$SELECTION")" ]; then if [ "$(find "$SELECTION")" ]; then


+ 1
- 1
plugins/mocplay 查看文件

@@ -9,7 +9,7 @@
# Shell: POSIX compliant # Shell: POSIX compliant
# Author: Arun Prakash Jana # Author: Arun Prakash Jana


selection=~/.config/nnn/.selection selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
cmd=$(pgrep -x mocp 2>/dev/null) cmd=$(pgrep -x mocp 2>/dev/null)
ret=$cmd ret=$cmd




+ 1
- 1
plugins/ndiff 查看文件

@@ -8,7 +8,7 @@
# Shell: POSIX compliant # Shell: POSIX compliant
# Author: Arun Prakash Jana # Author: Arun Prakash Jana


selection=~/.config/nnn/.selection selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection


if [ -s $selection ]; then if [ -s $selection ]; then
arr=$(tr '\0' '\n' < "$selection") arr=$(tr '\0' '\n' < "$selection")


+ 1
- 1
plugins/splitjoin 查看文件

@@ -8,7 +8,7 @@
# Shell: POSIX compliant # Shell: POSIX compliant
# Author: Arun Prakash Jana # Author: Arun Prakash Jana


selection=~/.config/nnn/.selection selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
resp=s resp=s


if [ -s "$selection" ]; then if [ -s "$selection" ]; then


||||||
x
 
000:0
Loading…
取消
儲存