]> Sergey Matveev's repositories - nnn.git/commitdiff
Plugin cleanup 1
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 6 Jun 2021 05:11:30 +0000 (10:41 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 6 Jun 2021 05:14:10 +0000 (10:44 +0530)
- rename `wall` to `wallpaper`
- remove `upgrade` - packaging is on OBS now
- remove `treeview` - needs minor preview-tui tweak
- remove `picker` - `nnn -p -` does the same

plugins/README.md
plugins/picker [deleted file]
plugins/renamer
plugins/treeview [deleted file]
plugins/upgrade [deleted file]
plugins/wallpaper [moved from plugins/wall with 100% similarity]

index 9e494ddc978d1acb729edb79f259a1cd9ffa2dc1..8dbbbe1ac701891c10d9da6d6d026d58c423a0cc 100644 (file)
@@ -53,7 +53,6 @@ Plugins extend the capabilities of `nnn`. They are _executable_ scripts (or bina
 | [organize](organize) | Auto-organize files in directories by file type [✓] | sh | file |
 | [pdfread](pdfread) | Read a PDF or text file aloud | sh | pdftotext, mpv,<br>pico2wave |
 | [pdfview](pdfview) | View PDF file in `$PAGER` | sh | pdftotext/<br>mupdf-tools |
-| [picker](picker) | Pick files and list one per line (to pipe) | sh | nnn |
 | [preview-tabbed](preview-tabbed) | Preview files with Tabbed/xembed | bash | _see in-file docs_ |
 | [preview-tui](preview-tui) | Preview with Tmux/kitty/[QuickLook](https://github.com/QL-Win/QuickLook)/xterm/`$TERMINAL` | sh | _see in-file docs_ |
 | [pskill](pskill) | Fuzzy list by name and kill process or zombie | sh | fzf, ps, sudo/doas |
@@ -63,12 +62,10 @@ Plugins extend the capabilities of `nnn`. They are _executable_ scripts (or bina
 | [splitjoin](splitjoin) | Split file or join selection [✓] | sh | split, cat |
 | [suedit](suedit) | Edit file using superuser permissions | sh | sudoedit/sudo/doas |
 | [togglex](togglex) | Toggle executable mode for selection [✓] | sh | chmod |
-| [treeview](treeview) | Informative tree output in `$EDITOR` | sh | tree |
 | [uidgid](uidgid) | List user and group of all files in dir | sh | ls, less |
 | [umounttree](umounttree) | Unmount a remote mountpoint from within | sh | fusermount |
-| [upgrade](upgrade) | Upgrade nnn manually on Debian 9 Stretch | sh | curl |
 | [upload](upload) | Upload to Firefox Send or ix.io (text) or file.io (bin) | sh | [ffsend](https://github.com/timvisee/ffsend), curl, jq, tr |
-| [wall](wall) | Set wallpaper or change colorscheme | sh | nitrogen/pywal |
+| [wallpaper](wall) | Set wallpaper or change colorscheme | sh | nitrogen/pywal |
 | [x2sel](x2sel) | Copy file list from system clipboard to selection | sh | _see in-file docs_ |
 | [xdgdefault](xdgdefault) | Set the default app for the hovered file type | sh | xdg-utils, fzf |
 
diff --git a/plugins/picker b/plugins/picker
deleted file mode 100755 (executable)
index 93acca5..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env sh
-
-# 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
-# Author: Arun Prakash Jana
-
-nnn -p /tmp/picked
-
-if [ -f /tmp/picked ]; then
-    tr '\0' '\n' < /tmp/picked
-    rm /tmp/picked
-fi
index d01cca66f412ef2c9b4bd01f4f853abbca078463..51c586ef469b0529ac12b53303271139ac19ca8f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env sh
 
-# Description: Batch rename selection or current directory with qmv
+# Description: Batch rename selection or current directory with qmv or vidir
 #
 # Notes:
 #   - Try to mimic current batch rename functionality but with correct
diff --git a/plugins/treeview b/plugins/treeview
deleted file mode 100755 (executable)
index c8f8784..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env sh
-
-# Description: Show tree output in $EDITOR
-#
-# Shell: POSIX compliant
-# Author: Arun Prakash Jana
-
-tree -ps | $EDITOR -
diff --git a/plugins/upgrade b/plugins/upgrade
deleted file mode 100755 (executable)
index 3be9a83..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env sh
-
-# 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
-# Author: Arun Prakash Jana
-
-cur="$(nnn -v)"
-new="$(curl -s "https://github.com/jarun/nnn/releases/latest" | grep -Eo "[0-9]+\.[0-9]+")"
-
-if [ "$cur" = "$new" ]; then
-    echo 'Already at latest version'
-    exit 0
-fi
-
-# get the package
-curl -Ls -O "https://github.com/jarun/nnn/releases/download/v$new/nnn_$new-1_debian9.amd64.deb"
-
-# install it
-sudo dpkg -i nnn_"$new"-1_debian9.amd64.deb
-
-# remove the file
-rm -rf nnn_"$new"-1_debian9.amd64.deb
similarity index 100%
rename from plugins/wall
rename to plugins/wallpaper