aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-04-26 20:55:12 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2015-04-26 20:55:12 +0200
commit6e069a03f5cc995d85f2293495c208a0994b0275 (patch)
tree39484060b48d7ba1ff9843ed2e00f6851130489d
parent3966da435243ecf05fe054c44db8cc3cb43d704a (diff)
downloadbin-6e069a03f5cc995d85f2293495c208a0994b0275.tar.xz
Add (s)sl
sl and ssl are scrot wrappers that scp the screenshots to theos and returns an https URL
-rwxr-xr-xsl14
-rwxr-xr-xssl14
2 files changed, 28 insertions, 0 deletions
diff --git a/sl b/sl
new file mode 100755
index 0000000..4404797
--- /dev/null
+++ b/sl
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+set -o errexit
+
+id=$(mktemp /tmp/XXXXXXXXXX).png
+host='theos.kyriasis.com'
+url="https://$host/~kyrias/s/$(basename $id)"
+
+scrot "$id"
+scp -q "$id" "$host":public_html/s/
+rm "$id"
+
+printf "URL: %s\n" "$url"
+printf "%s\n" "$url" | xclip -selection clipboard
diff --git a/ssl b/ssl
new file mode 100755
index 0000000..543f7b3
--- /dev/null
+++ b/ssl
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+set -o errexit
+
+id=$(mktemp /tmp/XXXXXXXXXX).png
+host='theos.kyriasis.com'
+url="https://$host/~kyrias/s/$(basename $id)"
+
+scrot -s "$id"
+scp -q "$id" "$host":public_html/s/
+rm "$id"
+
+printf "URL: %s\n" "$url"
+printf "%s\n" "$url" | xclip -selection clipboard