Update dmenu_qutebrowser
This commit is contained in:
parent
329030e913
commit
d496ea2d59
@ -28,21 +28,21 @@
|
||||
# Use the hotkey to open in new tab/window, press 'o' to open URL in current tab/window
|
||||
# You can simulate "go" by pressing "o<tab>", as the current URL is always first in the list
|
||||
#
|
||||
# I personally use "<Mod4>q" to launch this script. For me, my workflow is:
|
||||
# I personally use "<Mod4>o" to launchq this script. For me, my workflow is:
|
||||
# Default keys Keys with this script
|
||||
# O <Mod4>q
|
||||
# O <Mod4>o
|
||||
# o o
|
||||
# go o<Tab>
|
||||
# gO gC, then o<Tab>
|
||||
# (This is unnecessarily long. I use this rarely, feel free to make this script accept parameters.)
|
||||
#
|
||||
|
||||
url=$(echo "$QUTE_URL" | cat - ~/.local/share/qutebrowser/history ~/.config/qutebrowser/quickmarks | dmenu -l 15 -p qutebrowser)
|
||||
[ -z "$QUTE_URL" ] && QUTE_URL='http://google.com'
|
||||
|
||||
url=$(echo "$QUTE_URL" | cat - ~/.config/qutebrowser/quickmarks ~/.local/share/qutebrowser/history | dmenu -l 15 -p qutebrowser)
|
||||
url=$(echo $url | sed -E 's/[^ ]+ +//g' | egrep "https?:" || echo $url)
|
||||
|
||||
[ -z "${url// }" ] && exit
|
||||
|
||||
if [ -n "$QUTE_FIFO" ]; then
|
||||
echo "open $url" >> "$QUTE_FIFO"
|
||||
else
|
||||
qutebrowser "$url"
|
||||
fi
|
||||
echo "open $url" >> "$QUTE_FIFO" || qutebrowser "$url"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user