From d9b33f1b34085c26662ccb61f38b6ea8d7fa2cb6 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Thu, 5 Nov 2020 13:35:22 -0600 Subject: [PATCH] Adding qutebrowser userscripts. --- .local/share/qutebrowser/userscripts/dmenu-open | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .local/share/qutebrowser/userscripts/dmenu-open diff --git a/.local/share/qutebrowser/userscripts/dmenu-open b/.local/share/qutebrowser/userscripts/dmenu-open new file mode 100755 index 0000000..5712814 --- /dev/null +++ b/.local/share/qutebrowser/userscripts/dmenu-open @@ -0,0 +1,11 @@ +#!/bin/bash + +url=$({ + cat "$QUTE_CONFIG_DIR"/bookmarks/urls + awk '{ tmp = $1; $1 = $2; $2 = tmp; print $0 }' "$QUTE_CONFIG_DIR"/quickmarks + sqlite3 -separator ' ' "$QUTE_DATA_DIR"/history.sqlite 'SELECT url, title FROM CompletionHistory' +} | dmenu -l 10 -p "open $* " | cut -d ' ' -f 1) + +if [ $? = 0 ] && [ -n "$url" ]; then + printf 'open %s %s\n' "$*" "$url" >>"$QUTE_FIFO" +fi