Fix opening qutebrowser with search results in rofi

This commit is contained in:
Colin Powell
2019-12-06 14:36:50 -05:00
parent 6b40697d1d
commit 24472e64f9
3 changed files with 35 additions and 2 deletions

View File

@ -135,6 +135,11 @@ bindsym $mod+Ctrl+space floating toggle; resize set 700px 975px; $center
# CENTER FLOATING
bindsym $mod+c $center
# DISPLAYS
bindsym $mod+F1 exec ~/.screenlayout/titan-one.sh
bindsym $mod+F2 exec ~/.screenlayout/titan-two.sh
bindsym $mod+F3 exec ~/.screenlayout/titan-three.sh
##### WORKSPACES ##################################
# WORKSPACES
@ -254,8 +259,8 @@ exec feh --bg-scale ~/var/inbox/astrobin/`ls -Ar ~/var/inbox/astrobin | tail -n
##### APP BINDS ###################################
bindsym $mod+n exec $browser
bindsym $mod+Ctrl+n exec marcador rofi ~/.config/rofi/marcador.db
bindsym $mod+Shift+n exec ~/.config/rofi/web-search.sh
bindsym $mod+Shift+n exec ~/.config/rofi/searx-search.sh
bindsym $mod+Ctrl+n exec ~/.config/rofi/web-search.sh
bindsym $mod+Shift+b exec ~/.config/rofi/books-search.sh
bindsym $mod+Shift+c exec ~/.config/rofi/github-repos.sh

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Requirements:
# rofi
# Description:
# Use rofi to search the web.
# Usage:
# searx-search.sh
# -----------------------------------------------------------------------------
# Script:
URL="https://search.unbl.ink/?q="
main() {
# Open rofi for prompt
query=$( rofi -dmenu -matching fuzzy -location 0 -p "Query > " )
if [[ -n "$query" ]]; then
url=$URL$query
xdg-open "$url"
else
exit
fi
}
main
exit 0

View File

@ -1,3 +1,4 @@
[Default Applications]
application/epub+zip=com.github.johnfactotum.Foliate.desktop
x-scheme-handler/http=qutebrowser.desktop
x-www-browser=qutebrowser.desktop