mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-19 13:46:17 +10:00
Adding qutebrowser userscripts.
This commit is contained in:
11
.local/share/qutebrowser/userscripts/dmenu-open
Executable file
11
.local/share/qutebrowser/userscripts/dmenu-open
Executable file
@@ -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
|
||||||
Reference in New Issue
Block a user