plugins/README.md | 3 +++ plugins/ipinfo | 13 +++++++++++++ diff --git a/plugins/README.md b/plugins/README.md index f9a8fa2bd5db1705a23fa16547f55ede2756d359..0fa28ddbfbebf2c0a883939ac7ab304f03e35576 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -6,6 +6,7 @@ | getplugs | sh | wget | Update plugins | | hexview | sh | xxd, `$PAGER` | View a file in hex | | imgresize | sh | [imgp](https://github.com/jarun/imgp) | Resize images in directory to screen resolution | | imgur | bash | - | Upload an image to imgur (from [imgur-screenshot](https://github.com/jomo/imgur-screenshot)) | +| ipinfo | sh | curl, whois | Fetch IP address and whois information | | kdeconnect | sh | kdeconnect-cli | Send selected files to an Android device | | ndiff | sh | vimdiff | File and directory diff for selection | | nmount | sh | pmount | Toggle mount status of a device as normal user | @@ -23,6 +24,8 @@ 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) - the currently highlighted file (the file name is passed as the argument to a plugin) - the current selection (by reading the file .nnncp, see the plugin `ndiff`) + +Each script has a _Description_ section which provides more details on what the script does, if applicable. #### Contributing plugins diff --git a/plugins/ipinfo b/plugins/ipinfo new file mode 100755 index 0000000000000000000000000000000000000000..9ee1ca9062730fd4215e50ff81771222549645b5 --- /dev/null +++ b/plugins/ipinfo @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +# Description: Shows the IP address and whois information. +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +IP=`curl -s ifconfig.me` + +whois "$IP" +echo your IP address is "$IP" + +read dummy