diff options
Diffstat (limited to 'qbc-tofi')
-rwxr-xr-x | qbc-tofi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/qbc-tofi b/qbc-tofi new file mode 100755 index 0000000..b53255f --- /dev/null +++ b/qbc-tofi @@ -0,0 +1,18 @@ +#!/sbin/sh + +SESSIONS=`qbpm list` +[ -z "$SESSIONS" ] && qutebrowser $@ +CHOSEN=`printf "default\n$SESSIONS" | tofi` +[ -z "$CHOSEN" ] && exit 2 +if [ -n "$CHOSEN" ]; then + if [ "$CHOSEN" = "default" ]; then + qutebrowser $@ + else + if [ -z `echo "$SESSIONS" | grep "$CHOSEN"` ]; then + qbpm new "$CHOSEN" + fi + qbpm launch "$CHOSEN" $@ + #qutebrowser -B "$HOME/.local/share/$CHOSEN" + fi +fi + |