diff options
Diffstat (limited to 'qutebrowser/.local')
-rwxr-xr-x | qutebrowser/.local/share/qutebrowser/userscripts/tab-switch | 6 | ||||
-rwxr-xr-x | qutebrowser/.local/share/qutebrowser/userscripts/zathura-open | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/tab-switch b/qutebrowser/.local/share/qutebrowser/userscripts/tab-switch new file mode 100755 index 0000000..b82ed36 --- /dev/null +++ b/qutebrowser/.local/share/qutebrowser/userscripts/tab-switch @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +tabs=$(i3-msg -t get_tree | grep -o '"window":[0-9]*[^{]*{[^}]*qutebrowser[^}]*}') +selected_title=$(echo "$tabs" | sed 's/^.*title":"\(.*\) - qutebrowser.*/\1/g' | dmenu) +selected_id=$(echo "$tabs" | grep "$selected_title" | sed 's/^.*window":\([0-9]*\).*$/\1/') +i3-msg "[id=$selected_id] focus" diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/zathura-open b/qutebrowser/.local/share/qutebrowser/userscripts/zathura-open index 69b9dd1..088eff2 100755 --- a/qutebrowser/.local/share/qutebrowser/userscripts/zathura-open +++ b/qutebrowser/.local/share/qutebrowser/userscripts/zathura-open @@ -2,6 +2,5 @@ fname=/tmp/${RANDOM}.pdf -echo ${QUTE_URL} > ~/testurl -curl ${QUTE_URL} > ~/test.pdf +curl ${QUTE_URL%.pdf}.pdf > ~/test.pdf nohup zathura ~/test.pdf |