From bd28d033d4e3ec923fdb81aee214de5ff01a92dd Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 31 May 2017 17:26:15 +0100 Subject: [qutebrowser] Add script to change tabs --- qutebrowser/.local/share/qutebrowser/userscripts/tab-switch | 6 ++++++ qutebrowser/.local/share/qutebrowser/userscripts/zathura-open | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100755 qutebrowser/.local/share/qutebrowser/userscripts/tab-switch (limited to 'qutebrowser/.local/share') 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 -- cgit v1.2.3