From 23cc5cb0512c17c2b266c6ee6440c96e1e99bdbf Mon Sep 17 00:00:00 2001 From: samedamci Date: Fri, 13 Mar 2020 12:03:40 +0100 Subject: [PATCH] Add new script and binding to fast search via DDG in qutebrowser --- botfiles/.config/sxhkd/sxhkdrc.laptop | 8 +++----- botfiles/.config/sxhkd/sxhkdrc.pc | 8 +++----- botfiles/.scripts/websearch | 8 ++++++++ updot | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) create mode 100755 botfiles/.scripts/websearch diff --git a/botfiles/.config/sxhkd/sxhkdrc.laptop b/botfiles/.config/sxhkd/sxhkdrc.laptop index a78983d..802f66f 100644 --- a/botfiles/.config/sxhkd/sxhkdrc.laptop +++ b/botfiles/.config/sxhkd/sxhkdrc.laptop @@ -12,6 +12,9 @@ # Qutebrowser super + b qutebrowser +# Direct search +super + o + $HOME/.scripts/websearch # St super + Return st @@ -52,11 +55,6 @@ super + bracket{left,right} # Focus the last node/desktop super + {grave,Tab} bspc {node,desktop} -f last -# Focus the older or newer node in the focus history -super + {o,i} - bspc wm -h off; \ - bspc node {older,newer} -f; \ - bspc wm -h on # Focus or send to the given desktop super + {_,shift + }{1-9,0} bspc {desktop -f,node -d} '^{1-9,10}' diff --git a/botfiles/.config/sxhkd/sxhkdrc.pc b/botfiles/.config/sxhkd/sxhkdrc.pc index 55c4c9a..3a5b483 100644 --- a/botfiles/.config/sxhkd/sxhkdrc.pc +++ b/botfiles/.config/sxhkd/sxhkdrc.pc @@ -12,6 +12,9 @@ # qutebrowser super + b qutebrowser +# direct search +super + o + $HOME/.scripts/websearch # st super + Return st @@ -57,11 +60,6 @@ super + bracket{left,right} # Focus the last node/desktop super + {grave,Tab} bspc {node,desktop} -f last -# Focus the older or newer node in the focus history -super + {o,i} - bspc wm -h off; \ - bspc node {older,newer} -f; \ - bspc wm -h on # Focus or send to the given desktop super + {_,shift + }{1-9,0} bspc {desktop -f,node -d} '^{1-9,10}' diff --git a/botfiles/.scripts/websearch b/botfiles/.scripts/websearch new file mode 100755 index 0000000..f4a6d29 --- /dev/null +++ b/botfiles/.scripts/websearch @@ -0,0 +1,8 @@ +#!/usr/bin/env zsh + +PHRASE=$(printf | dmenu -p "Web search:") + +if [ -n "$PHRASE" ]; then + qutebrowser $PHRASE & + bspc desktop -f '^3' +fi diff --git a/updot b/updot index 5f7788b..bd909a3 100755 --- a/updot +++ b/updot @@ -4,7 +4,7 @@ echo "Adding configs to dotfiles repo..." cd ~ cp .zshrc .Xresources .aliases .bashrc .zprofile .bash_profile .local/share/TelegramDesktop/tdata/shortcuts-custom.json ~/Dotfiles/botfiles/ &>/dev/null cd ~/.scripts/ -cp lockscreen.sh powermenu.sh screenshot.sh update-check.sh updater.sh wificheck.sh ~/Dotfiles/botfiles/.scripts/ &>/dev/null +cp lockscreen.sh powermenu.sh screenshot.sh update-check.sh updater.sh wificheck.sh websearch ~/Dotfiles/botfiles/.scripts/ &>/dev/null cd ~/.config cp -r autostart bspwm dconf dunst GIMP gtk-3.0 gtk-2.0 homepage mpd ncmpcpp neofetch nvim picom polybar qutebrowser ranger rofi sxhkd vifm vis vlc wallpapers yay zsh ~/Dotfiles/botfiles/.config/ &>/dev/null cd ~/Dotfiles/botfiles/.config/