summaryrefslogtreecommitdiffstats
path: root/clerk_fzf/clerk_starter
blob: 811262ffc27a8880cfb9844287f39f6a5a2be0e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

export TMUX_TMPDIR="/tmp/clerk/tmux"

if [[ ! -d "${TMUX_TMPDIR}" ]]; then
  mkdir -p "${TMUX_TMPDIR}"
fi

tmux has-session -t music
if [ $? != 0 ]; then
  tmux -f $HOME/.config/clerk/tmux.conf new-session -s music -n albums -d
  tmux send-keys -t music 'clerk_fzf --albums' C-m
  tmux new-window -t music -n tracks
  tmux send-keys -t music 'clerk_fzf --tracks' C-m
  tmux new-window -t music -n latest
  tmux send-keys -t music 'clerk_fzf --latest' C-m
  tmux new-window -t music -n queue
  tmux send-keys -t music 'ncmpcpp' C-m
fi

tmux attach -t music