mirror of
https://github.com/jarun/nnn.git
synced 2024-11-27 21:31:30 +00:00
Uniform plugins
This commit is contained in:
parent
f438ddc28c
commit
cfbb8f2117
|
@ -135,8 +135,9 @@ Don't memorize! Arrows (or <kbd>h</kbd> <kbd>j</kbd> <kbd>k</kbd> <kbd>l</kbd>),
|
||||||
- [0xACE](https://github.com/0xACE)
|
- [0xACE](https://github.com/0xACE)
|
||||||
- [Anna Arad](https://github.com/annagrram)
|
- [Anna Arad](https://github.com/annagrram)
|
||||||
- [KlzXS](https://github.com/KlzXS)
|
- [KlzXS](https://github.com/KlzXS)
|
||||||
- [leovilok](https://github.com/leovilok)
|
- [Léo Villeveygoux](https://github.com/leovilok)
|
||||||
- [Maxim Baz](https://github.com/maximbaz)
|
- [Maxim Baz](https://github.com/maximbaz)
|
||||||
|
- [Todd Yamakawa](https://github.com/toddyamakawa)
|
||||||
- and other contributors
|
- and other contributors
|
||||||
|
|
||||||
Visit the [ToDo list](https://github.com/jarun/nnn/issues/506) to contribute or see the features in progress.
|
Visit the [ToDo list](https://github.com/jarun/nnn/issues/506) to contribute or see the features in progress.
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# the output checksum filename will be directory.checksum_type
|
# the output checksum filename will be directory.checksum_type
|
||||||
#
|
#
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: ath3, Arun Prakash Jana
|
# Authors: ath3, Arun Prakash Jana
|
||||||
|
|
||||||
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
|
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
|
||||||
resp=f
|
resp=f
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
# Description: Open a Drag and drop window, to drop files onto other programs.
|
# Description: Open a Drag and drop window, to drop files onto other programs.
|
||||||
# Also provides drag and drop window for files.
|
# Also provides drag and drop window for files.
|
||||||
#
|
#
|
||||||
# Files that are dropped will be added to nnn's selection
|
# Requires: https://github.com/mwh/dragon
|
||||||
# Some webbased files will be downloaded to current directory with curl
|
|
||||||
# and it may overwrite some existing files
|
|
||||||
#
|
#
|
||||||
# The user has to mm to clear nnn's selection first
|
# Notes:
|
||||||
|
# - Files that are dropped will be added to nnn's selection
|
||||||
|
# Some webbased files will be downloaded to current directory with curl
|
||||||
|
# and it may overwrite some existing files
|
||||||
|
# - The user has to mm to clear nnn's selection first
|
||||||
#
|
#
|
||||||
# Dependency: https://github.com/mwh/dragon
|
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: 0xACE
|
# Author: 0xACE
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# Requires: find md5sum sort uniq xargs
|
# Requires: find md5sum sort uniq xargs
|
||||||
#
|
#
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: syssyphus, KlzXS
|
# Authors: syssyphus, KlzXS
|
||||||
|
|
||||||
find . -size +0 -type f -printf "%s %p\n" | sort -rn | sed -n 'N; /^\([0-9]*\) .*\n\1.*$/p;$d;D' | awk '{printf("%s\0", substr($0, index($0, $2)))}' | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate
|
find . -size +0 -type f -printf "%s %p\n" | sort -rn | sed -n 'N; /^\([0-9]*\) .*\n\1.*$/p;$d;D' | awk '{printf("%s\0", substr($0, index($0, $2)))}' | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Description: Update nnn plugins to installed nnn version
|
# Description: Update nnn plugins to installed nnn version
|
||||||
#
|
#
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: Arun Prakash Jana, KlzXS
|
# Authors: Arun Prakash Jana, KlzXS
|
||||||
|
|
||||||
CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/
|
CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/
|
||||||
PLUGIN_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins
|
PLUGIN_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
# - to let mocp shuffle tracks, set SHUFFLE=1
|
# - to let mocp shuffle tracks, set SHUFFLE=1
|
||||||
#
|
#
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: Arun Prakash Jana, ath3
|
# Authors: Arun Prakash Jana, ath3
|
||||||
|
|
||||||
IFS="$(printf '\n\r')"
|
IFS="$(printf '\n\r')"
|
||||||
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
|
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
# Description: Backup of all nnn config
|
# Description: Backup nnn configuration
|
||||||
|
# - config dir content
|
||||||
|
# - environment config
|
||||||
|
# - shell functions and aliases
|
||||||
#
|
#
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: Léo Villeveygoux
|
# Author: Léo Villeveygoux
|
||||||
|
@ -70,4 +73,3 @@ printf "Saving as '%s' ... " "$workdir/$outfile"
|
||||||
tar caf "$workdir/$outfile" "$outdir" && echo "Done" || echo "Failed"
|
tar caf "$workdir/$outfile" "$outdir" && echo "Done" || echo "Failed"
|
||||||
|
|
||||||
cd "$workdir" && rm -rf "$tempdir"
|
cd "$workdir" && rm -rf "$tempdir"
|
||||||
|
|
||||||
|
|
|
@ -2,21 +2,21 @@
|
||||||
|
|
||||||
# Description: Pick files and pipe the newline-separated list to another utility
|
# Description: Pick files and pipe the newline-separated list to another utility
|
||||||
#
|
#
|
||||||
|
# Usage:
|
||||||
|
# Copy this file in your $PATH, make it executable and preferably name it to picker.
|
||||||
|
# Run commands like:
|
||||||
|
# ls -l `picker`
|
||||||
|
# cd `picker`
|
||||||
|
# vimdiff `picker`
|
||||||
|
# or, in fish shell:
|
||||||
|
# ls -l (picker)
|
||||||
|
# cd (picker)
|
||||||
|
# vimdiff (picker)
|
||||||
|
#
|
||||||
|
# Note: This use case is limited to picking files, other functionality may not work as expected.
|
||||||
|
#
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: Arun Prakash Jana
|
# Author: Arun Prakash Jana
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# Copy this file in your $PATH, make it executable and preferably name it to picker.
|
|
||||||
# Run commands like:
|
|
||||||
# ls -l `picker`
|
|
||||||
# cd `picker`
|
|
||||||
# vimdiff `picker`
|
|
||||||
# or, in fish shell:
|
|
||||||
# ls -l (picker)
|
|
||||||
# cd (picker)
|
|
||||||
# vimdiff (picker)
|
|
||||||
#
|
|
||||||
# NOTE: This use case is limited to picking files, other functionality may not work as expected.
|
|
||||||
|
|
||||||
nnn -p /tmp/picked
|
nnn -p /tmp/picked
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Description: tabbed/xembed based file previewer
|
# Description: tabbed/xembed based file previewer
|
||||||
#
|
#
|
||||||
# Note: This plugin needs a "NNN_FIFO" to work. See man.
|
# Note: This plugin needs a "NNN_FIFO" to work. See man.
|
||||||
#
|
#
|
||||||
# Shell: Bash (job control is weakly specified in POSIX)
|
|
||||||
#
|
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
# - tabbed (https://tools.suckless.org/tabbed): xembed host
|
# - tabbed (https://tools.suckless.org/tabbed): xembed host
|
||||||
# - xterm (or urxvt or st) : xembed client for text-based preview
|
# - xterm (or urxvt or st) : xembed client for text-based preview
|
||||||
|
@ -46,6 +44,7 @@
|
||||||
# [1]: http://tools.suckless.org/tabbed/
|
# [1]: http://tools.suckless.org/tabbed/
|
||||||
# [2]: https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html
|
# [2]: https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html
|
||||||
#
|
#
|
||||||
|
# Shell: bash (job control is weakly specified in POSIX)
|
||||||
# Author: leovilok
|
# Author: leovilok
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
# Dependencies: tmux (>=3.0) or xterm (or set $TERMINAL), file, tree
|
# Dependencies: tmux (>=3.0) or xterm (or set $TERMINAL), file, tree
|
||||||
#
|
#
|
||||||
# How to use:
|
# Usage:
|
||||||
# You need to set a NNN_FIFO path and set a key for the plugin,
|
# You need to set a NNN_FIFO path and set a key for the plugin,
|
||||||
# then start `nnn`:
|
# then start `nnn`:
|
||||||
#
|
#
|
||||||
|
@ -18,7 +18,8 @@
|
||||||
# single common preview window. I you provide different FIFO path, they
|
# single common preview window. I you provide different FIFO path, they
|
||||||
# will be independent.
|
# will be independent.
|
||||||
#
|
#
|
||||||
# Authors: Todd Yamakawa and Léo Villeveygoux
|
# Shell: POSIX compliant
|
||||||
|
# Authors: Todd Yamakawa, Léo Villeveygoux
|
||||||
|
|
||||||
TERMINAL="${TERMINAL:-xterm}"
|
TERMINAL="${TERMINAL:-xterm}"
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Description: list uid and gid of files
|
# Description: list uid and gid of files
|
||||||
#
|
#
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: Arun Prakash Jana, superDuperCyberTechno
|
# Authors: Arun Prakash Jana, superDuperCyberTechno
|
||||||
|
|
||||||
# shellcheck disable=SC2012
|
# shellcheck disable=SC2012
|
||||||
ls -lah --group-directories-first | less
|
ls -lah --group-directories-first | less
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
|
|
||||||
# Description: Check and update to latest version of nnn manually on Debian 9 Stretch
|
# Description: Check and update to latest version of nnn manually on Debian 9 Stretch
|
||||||
#
|
#
|
||||||
|
# Note: This script installs a package, should be issued with admin privilege
|
||||||
|
#
|
||||||
# Shell: POSIX-compliant
|
# Shell: POSIX-compliant
|
||||||
# Author: Arun Prakash Jana
|
# Author: Arun Prakash Jana
|
||||||
# NOTE: This script installs a package, should be issued with admin privilege
|
|
||||||
|
|
||||||
cur="$(nnn -v)"
|
cur="$(nnn -v)"
|
||||||
new="$(curl -s "https://github.com/jarun/nnn/releases/latest" | grep -Eo "[0-9]+\.[0-9]+")"
|
new="$(curl -s "https://github.com/jarun/nnn/releases/latest" | grep -Eo "[0-9]+\.[0-9]+")"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# cygwim's /dev/clipboard (Cygwin)
|
# cygwim's /dev/clipboard (Cygwin)
|
||||||
# wl-paste (Wayland)
|
# wl-paste (Wayland)
|
||||||
#
|
#
|
||||||
# LIMITATION: breaks if a filename has newline in it
|
# Limitation: breaks if a filename has newline in it
|
||||||
#
|
#
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: Léo Villeveygoux, after Arun Prakash Jana's .cbcp
|
# Author: Léo Villeveygoux, after Arun Prakash Jana's .cbcp
|
||||||
|
|
Loading…
Reference in a new issue