aboutsummaryrefslogtreecommitdiffstats
path: root/.w3m/cgi-bin/goto_clipboard_primary.cgi
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-05-14 18:14:50 +0000
committerterminaldweller <thabogre@gmail.com>2021-05-14 18:14:50 +0000
commit6e528248414e330c9e25e81596ab47b8b8a5b701 (patch)
treee1aa41a7f3198eeac187e6177ec7d4a33db229d3 /.w3m/cgi-bin/goto_clipboard_primary.cgi
downloadscripts-master.tar.gz
scripts-master.zip
first commitmaster
Diffstat (limited to '.w3m/cgi-bin/goto_clipboard_primary.cgi')
-rwxr-xr-x.w3m/cgi-bin/goto_clipboard_primary.cgi28
1 files changed, 28 insertions, 0 deletions
diff --git a/.w3m/cgi-bin/goto_clipboard_primary.cgi b/.w3m/cgi-bin/goto_clipboard_primary.cgi
new file mode 100755
index 0000000..a9b208e
--- /dev/null
+++ b/.w3m/cgi-bin/goto_clipboard_primary.cgi
@@ -0,0 +1,28 @@
+#!/usr/bin/env sh
+### _ _ _ _
+### __ _ ___ | |_| |__ | | ___| |_ _ _
+### / _` |/ _ \| __| '_ \| |/ _ \ __| | | |
+###| (_| | (_) | |_| |_) | | __/ |_| |_| |
+### \__, |\___/ \__|_.__/|_|\___|\__|\__,_|
+### |___/
+### https://www.youtube.com/user/gotbletu
+### https://twitter.com/gotbletu
+### https://github.com/gotbletu
+### gotbletu@gmail.com
+###
+### Author : gotbletu
+### Name : goto_clipboard_primary.cgi
+### Version : 0.1
+### Date : 2020-04-26
+### Description : paste and go feature for w3m web browser using system clipboard (primary aka shift+insert)
+### Depends On : w3m xsel
+### Video Demo : https://youtu.be/p5NZb8f8AHA
+### References : https://github.com/felipesaa/A-vim-like-firefox-like-configuration-for-w3m
+### Install : put this script in /usr/lib/w3m/cgi-bin/
+
+#GOTO url in clipboard in current page. If the clipboard has a
+#"non url string/nothing" an blank page is shown.
+printf "%s\r\n" "W3m-control: GOTO $(xsel -op)";
+#delete the buffer (element in history) created between the current page and
+#the searched page by calling this script.
+printf "W3m-control: DELETE_PREVBUF\r\n"