summary refs log tree commit diff
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
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.
-rw-r--r--bin/man1/up.18
-rw-r--r--bin/up.sh6
2 files changed, 11 insertions, 3 deletions
diff --git a/bin/man1/up.1 b/bin/man1/up.1
index 8b50c271..189020de 100644
--- a/bin/man1/up.1
+++ b/bin/man1/up.1
@@ -1,4 +1,4 @@
-.Dd January 12, 2021
+.Dd February  7, 2021
 .Dt UP 1
 .Os
 .
@@ -54,6 +54,8 @@ to produce an HTML file for upload.
 .It Fl s
 Use
 .Xr screencapture 1
+or
+.Xr scrot 1
 to produce a PNG file for upload.
 The file is optimized by
 .Xr pngo 1
@@ -72,5 +74,7 @@ Any arguments after
 are passed to
 .Xr hilex 1
 and
-.Xr screencapture 1 ,
+.Xr screencapture 1
+or
+.Xr scrot 1 ,
 respectively.
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"
 }
'>Move C code to bin, Makefile, AGPLJune McEnroe 2017-09-06Rename curtis -> homeJune McEnroe Why the heck did I do this? 2017-09-05Pass final NULL to execlpJune McEnroe 2017-09-05Add watch.cJune McEnroe 2017-09-02Remove Scala highlightingJune McEnroe 2017-08-31Fix Linux console Tarmak 3June McEnroe Wow oops. 2017-08-31Use Tarmak 3 on Linux consoleJune McEnroe 2017-08-25Install ddateJune McEnroe 2017-08-19Move nethack options to envJune McEnroe 2017-08-17Remove scala syntax fileJune McEnroe 2017-08-06Add wakeJune McEnroe That payload can appear anywhere within an ethernet frame. Wake-on-LAN is funny. 2017-08-04Use $() in install.shJune McEnroe Something gave me the impression that sh did not like this, but it's specified by POSIX. 2017-08-02Create Code Tarmak 3 layoutJune McEnroe 2017-07-31Add tupJune McEnroe 2017-07-31Use designated initializer for hnel tableJune McEnroe I did not know this syntax worked! 2017-07-30Add juneJune McEnroe 2017-07-30Play nethack as ValkyrieJune McEnroe 2017-07-28Add toggle to hnelJune McEnroe 2017-07-28Install slJune McEnroe 2017-07-25Add up, supJune McEnroe 2017-07-24Autopickup ringsJune McEnroe 2017-07-24Name dogJune McEnroe 2017-07-23Add nethackrcJune McEnroe 2017-07-23Remove useless setuid in briJune McEnroe Don't you think it would be better if the setuid bit only gave you permission to do it and didn't do it for you? 2017-07-23Clean up hnel a tiny bitJune McEnroe 2017-07-21Set window size in hnelJune McEnroe 2017-07-21Add hnelJune McEnroe 2017-07-19chmod 600 in dtchJune McEnroe