Browse Source

Add a script to create a tmux session for music

Samuel W. Flint 2 years ago
parent
commit
4025e04af9
1 changed files with 11 additions and 0 deletions
  1. 11 0
      music-term

+ 11 - 0
music-term

@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+if ! tmux has-session -t "music" ; then
+    echo "Creating tmux session for music"
+    echo $MPD_HOST
+    cd ~/Music
+    tmux new-session -e MPD_HOST=$MPD_HOST -s "music" "$SHELL -c ncmpc" \; \
+         split-window "$SHELL"
+else
+    tmux attach-session -t "music"
+fi