1
0
Fork 0
mirror of https://gitlab.com/dwt1/dotfiles.git synced 2023-02-13 20:55:19 -05:00
dwt1--dotfiles/.local/share/qutebrowser/userscripts/dmenu-open
2020-11-05 13:35:22 -06:00

11 lines
390 B
Bash
Executable file

#!/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