summaryrefslogtreecommitdiff
path: root/browser-tofi
diff options
context:
space:
mode:
Diffstat (limited to 'browser-tofi')
-rwxr-xr-xbrowser-tofi18
1 files changed, 18 insertions, 0 deletions
diff --git a/browser-tofi b/browser-tofi
new file mode 100755
index 0000000..e2c5d32
--- /dev/null
+++ b/browser-tofi
@@ -0,0 +1,18 @@
+#!/sbin/sh
+[ -z "$BROWSER" ] && BROWSER="qbc"
+BROWSERS="qbc
+fdc
+bsc
+ffc
+lwc
+brave"
+if [ `echo "$@" | cut -d'/' -f3` == "yewtu.be" ]; then
+ BROWSERS=`printf "mpv\n%s" "$BROWSERS"`
+fi
+brow=`printf "xclip\n%s" "$BROWSERS" | tofi`
+[ -z "$brow" ] && exit
+if [ "$brow" = "xclip" ]; then
+ echo -n $@ | tr -d "\n" | xclip -selection clipboard
+else
+ $brow $@
+fi