summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-02-09 18:12:16 -0500
committerJune McEnroe <june@causal.agency>2021-02-09 18:12:16 -0500
commit1b14f2ae98fe8c95d65ba2a5ef738bb85e39eca4 (patch)
tree992ffa1782b404e707d21feb908e023e445b9b1a
parentDisable mouse mode in xterm (diff)
downloadsrc-1b14f2ae98fe8c95d65ba2a5ef738bb85e39eca4.tar.gz
src-1b14f2ae98fe8c95d65ba2a5ef738bb85e39eca4.zip
Use w3m to open other URLs
-rwxr-xr-xhome/.local/bin/open5
-rw-r--r--install.sh2
2 files changed, 2 insertions, 5 deletions
diff --git a/home/.local/bin/open b/home/.local/bin/open
index 256a62e2..a1f57a1a 100755
--- a/home/.local/bin/open
+++ b/home/.local/bin/open
@@ -9,10 +9,7 @@ case "$1" in
 	(*.gif|*.jpeg|*.jpg|*.png)
 		curl -LSs "$1" | imv -
 		;;
-	(*.txt)
-		exec xterm -hold -e sh -c 'curl -LSs "$1" | $PAGER' - "$1"
-		;;
 	(*)
-		printf '%s' "$1" | pbcopy
+		exec xterm -e w3m "$1"
 		;;
 esac
diff --git a/install.sh b/install.sh
index cc80e226..ebce2b02 100644
--- a/install.sh
+++ b/install.sh
@@ -17,7 +17,7 @@ FreeBSD() {
 
 OpenBSD() {
 	doas pkg_add $packages
-	test $X && doas pkg_add imv scrot xcursor-dmz xsel
+	test $X && doas pkg_add imv scrot w3m-- xcursor-dmz xsel
 }
 
 Linux() {