summaryrefslogtreecommitdiff
path: root/qbc
blob: 2bd3b6d31f84fdaabebd8ecd9c2460ee6f1e2092 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

SESSIONS=`qbpm list`
[ -z "$SESSIONS" ] && qutebrowser $@
CHOSEN=`printf "default\n$SESSIONS"  | barmenu -l 15`
[ -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