diff options
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | plugins/README.md | 5 | ||||
-rwxr-xr-x | plugins/dups | 15 | ||||
-rwxr-xr-x | plugins/imgur | 2 |
4 files changed, 24 insertions, 3 deletions
@@ -15,7 +15,6 @@ <a href="https://travis-ci.org/jarun/nnn"><img src="https://img.shields.io/travis/jarun/nnn/master.svg?label=travis" alt="Travis Status" /></a> <a href="https://circleci.com/gh/jarun/workflows/nnn"><img src="https://img.shields.io/circleci/project/github/jarun/nnn.svg?label=circleci" alt="CircleCI Status" /></a> <a href="https://github.com/jarun/nnn/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-BSD%202--Clause-yellow.svg?maxAge=2592000" alt="License" /></a> -<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ76JSXJ4Q"><img src="https://img.shields.io/badge/PayPal-donate-1eb0fc.svg" alt="Donate via PayPal!" /></a> </p> <p align="center"> @@ -24,6 +23,10 @@ <p align="center"><i>Modes of nnn (light with filter, detail, du analyzer) with memory usage (click for a demo video)</i></a></p> +<p align="center"> +<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ76JSXJ4Q"><img src="https://img.shields.io/badge/PayPal-donate-1eb0fc.svg" alt="Donate via PayPal!" /></a> +</p> + ## Index - [Introduction](#introduction) diff --git a/plugins/README.md b/plugins/README.md index 47a7aab..a032883 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -5,6 +5,7 @@ The currently available plugins are listed below. | Plugin (a-z) | Lang | Deps | Description | | --- | --- | --- | --- | | boom | sh | SMPlayer | Play random music from dir (modify `PLAYER`) | +| dups | sh | find, md5sum,<br>sort uniq xargs | List non-empty duplicate files in current directory | | checksum | sh | md5sum,<br>sha256sum | Create and verify checksums | | fzy-open | sh | fzy, xdg-open | Fuzzy find a file in dir subtree and edit or xdg-open | | getplugs | sh | wget | Update plugins | @@ -17,12 +18,12 @@ The currently available plugins are listed below. | mocplay | sh | [moc](http://moc.daper.net/) | Appends (and plays, see script) selection/dir/file in moc| | ndiff | sh | vimdiff | Diff for selection (limited to 2 for directories) | | nmount | sh | pmount, udisks2 | Toggle mount status of a device as normal user | -| nwal | sh | nitrogen | Set the selected image as wallpaper using nitrogen | +| nwal | sh | nitrogen | Set image as wallpaper using nitrogen | | organize | sh | file | Auto-organize files in directories by file type | | pastebin | sh | [pastebinit](https://launchpad.net/pastebinit) | Paste contents of (text) file to paste.ubuntu.com | | pdfview | sh | pdftotext/<br>mupdf-tools | View PDF file in `$PAGER` | | picker | sh | nnn | Pick files and pipe the newline-separated list to another utility | -| pywal | sh | pywal | Set selected image as wallpaper, change terminal color scheme | +| pywal | sh | pywal | Set image as wallpaper, change terminal colorscheme | | readit | sh | pdftotext, mpv,<br>pico2wave | Read a PDF or text file aloud | | ringtone | sh | date, ffmpeg | Create a variable bitrate mp3 ringtone from file | | splitjoin | sh | split, cat | Split file or join selection | diff --git a/plugins/dups b/plugins/dups new file mode 100755 index 0000000..0643025 --- /dev/null +++ b/plugins/dups @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +# Description: List non-empty duplicate files in the current directory (based on size followed by MD5) +# +# Source: https://www.commandlinefu.com/commands/view/3555/find-duplicate-files-based-on-size-first-then-md5-hash +# +# Requires: find md5sum sort uniq xargs +# +# Shell: POSIX compliant +# Author: syssyphus + +find -size +0 -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate + +echo "Press any key to exit" +read dummy diff --git a/plugins/imgur b/plugins/imgur index 5b6d4eb..8b39b55 100755 --- a/plugins/imgur +++ b/plugins/imgur @@ -583,3 +583,5 @@ done if [ "${check_update}" = "true" ]; then check_for_update fi + +read dummy |