summary refs log tree commit diff
path: root/bin/up.sh
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-02-07 18:04:58 -0500
committerJune McEnroe <june@causal.agency>2021-02-07 18:07:07 -0500
commitecd7fe2964a210885ba6beb96ba2e1ef5895c09c (patch)
tree572f3859c97314ca856e50406eb805787ef74d17 /bin/up.sh
parentEnable mouse acceleration in X (diff)
downloadsrc-ecd7fe2964a210885ba6beb96ba2e1ef5895c09c.tar.gz
src-ecd7fe2964a210885ba6beb96ba2e1ef5895c09c.zip
Use scrot for up -s if no screencapture
Still missing putting the URL in an X selection.
Diffstat (limited to 'bin/up.sh')
-rw-r--r--bin/up.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/up.sh b/bin/up.sh
index 562ab489..f55213d4 100644
--- a/bin/up.sh
+++ b/bin/up.sh
@@ -40,7 +40,11 @@ uploadHilex() {
 
 uploadScreen() {
 	temp
-	screencapture -i "$@" "${temp}/capture.png"
+	if type screencapture >/dev/null; then
+		screencapture -i "$@" "${temp}/capture.png"
+	else
+		scrot -s "$@" "${temp}/capture.png"
+	fi
 	pngo "${temp}/capture.png" || true
 	upload "${temp}/capture.png"
 }