From 6efac1a12c8ab0b7d96a8d342fbd74fce35e8c42 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Tue, 18 Aug 2015 02:38:33 +0200 Subject: Organise everything systematically. --- config/ratpoison/sprunge | 62 ------------------------------------------------ 1 file changed, 62 deletions(-) delete mode 100755 config/ratpoison/sprunge (limited to 'config/ratpoison/sprunge') diff --git a/config/ratpoison/sprunge b/config/ratpoison/sprunge deleted file mode 100755 index a6e89a4..0000000 --- a/config/ratpoison/sprunge +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -usage() { -description | fmt -s >&2 -} - -description() { -cat << HERE - -DESCRIPTION - Upload data and fetch URL from the pastebin http://sprunge.us - -USAGE - $0 filename.txt - $0 text string - $0 < filename.txt - piped_data | $0 - -NOTES --------------------------------------------------------------------------- -* INPUT METHODS * -$0 can accept piped data, STDIN redirection [&2 - if [ "$*" ]; then - echo Arguments present... >&2 - if [ -f "$*" ]; then - echo Uploading the contents of "$*"... >&2 - cat "$*" - else - echo Uploading the text: \""$*"\"... >&2 - echo "$*" - fi | curl -F 'sprunge=<-' http://sprunge.us | xclip - else - echo No arguments found, will upload clipboard, also printing USAGE and exiting. >&2 - xclip -o | curl -F 'sprunge=<-' http://sprunge.us | xclip - notify-send Uploaded clipboard to sprunge - usage - fi -else - echo Using input from a pipe or STDIN redirection... >&2 - while read -r line ; do - echo $line - done | curl -F 'sprunge=<-' http://sprunge.us | xclip -fi -- cgit v1.2.3-54-g00ecf