mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-27 21:47:46 +01:00
changing searchscript to startpage for better results
This commit is contained in:
parent
767a9086bf
commit
66dd6591ec
@ -17,7 +17,7 @@ gaps inner 0
|
||||
gaps outer 0
|
||||
set $term --no-startup-id $TERMINAL
|
||||
set $mod Mod4
|
||||
font xft:mono 12
|
||||
font xft:mono 14
|
||||
|
||||
# #---Dropdown Windows---# #
|
||||
# General dropdown window traits. The order can matter.
|
||||
@ -32,7 +32,7 @@ for_window [instance="dropdown_dropdowncalc"] border pixel 2
|
||||
for_window [instance="dropdown_*"] move position center
|
||||
|
||||
bar {
|
||||
font pango:mono 12
|
||||
font pango:mono 13
|
||||
status_command i3blocks
|
||||
position top
|
||||
mode dock
|
||||
@ -49,8 +49,6 @@ bindsym $mod+Shift+b bar mode toggle
|
||||
|
||||
#bindsym $mod+c taken by sxhkd
|
||||
|
||||
#bindsym $mod+d taken by sxhkd
|
||||
|
||||
bindsym $mod+Shift+f fullscreen toggle
|
||||
|
||||
bindsym $mod+h focus left
|
||||
@ -80,6 +78,8 @@ bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] exec -
|
||||
#bindsym $mod+r taken by sxhkd
|
||||
#bindsym $mod+shift+r taken by sxhkd
|
||||
|
||||
#bindsym $mod+s taken by sxhkd
|
||||
|
||||
bindsym $mod+t split toggle
|
||||
|
||||
bindsym $mod+Shift+u exec --no-startup-id i3resize down
|
||||
|
@ -6,8 +6,6 @@ super + b
|
||||
$BROWSER
|
||||
super + c
|
||||
code
|
||||
super + d
|
||||
ducksearch
|
||||
super + f
|
||||
$TERMINAL -e $FILE
|
||||
#super + shift + f taken by i3
|
||||
@ -31,6 +29,8 @@ super + n
|
||||
#super + shift + q taken by i3
|
||||
super + r
|
||||
$TERMINAL -e rtv
|
||||
super + s
|
||||
startpagesearch
|
||||
super + shift + r
|
||||
dmenu_run
|
||||
#super + t taken by i3
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Gives a dmenu prompt to search DuckDuckGo.
|
||||
# Without input, will open DuckDuckGo.com.
|
||||
# URLs will be directly handed to the browser.
|
||||
# Anything else, it search it.
|
||||
browser=${BROWSER:-firefox}
|
||||
|
||||
pgrep -x dmenu && exit
|
||||
|
||||
choice=$(echo "🦆" | dmenu -i -p "Search DuckDuckGo:") || exit 1
|
||||
|
||||
if [ "$choice" = "🦆" ]; then
|
||||
$RTV_BROWSER "https://duckduckgo.com"
|
||||
else
|
||||
if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then
|
||||
$RTV_BROWSER "$choice"
|
||||
else
|
||||
$RTV_BROWSER "https://duckduckgo.com/?q=$choice&t=ffab&atb=v1-1"
|
||||
fi
|
||||
fi
|
20
.local/bin/sxhkd/startpagesearch
Executable file
20
.local/bin/sxhkd/startpagesearch
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# Gives a dmenu prompt to search Startpage.
|
||||
# Without input, will open Startpage.com.
|
||||
# URLs will be directly handed to the browser.
|
||||
# Anything else, it search it.
|
||||
browser=${RTVBROWSER:-firefox}
|
||||
|
||||
pgrep -x dmenu && exit
|
||||
|
||||
choice=$(echo "Startpage" | dmenu -i -p "Search Startpage:") || exit 1
|
||||
|
||||
if [ "$choice" = "Startpage" ]; then
|
||||
$RTV_BROWSER "https://startpage.com"
|
||||
else
|
||||
if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then
|
||||
$RTV_BROWSER "$choice"
|
||||
else
|
||||
$RTV_BROWSER "https://startpage.com/do/search/?q=$choice"
|
||||
fi
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user