#!/bin/sh set -eux readonly SESSION=music readonly MAINW=music readonly WORKING_PROJECT="${HOME}" if ! tmux has-session -t="${SESSION}"; then tmux new-session -s "${SESSION}" -d -n "${MAINW}" -c "${WORKING_PROJECT}" tmux rename-window -t "${SESSION}:1" "${MAINW}" tmux send-keys -t "${SESSION}:${MAINW}.1" "player run music" Enter fi tmux switch-client -t "${SESSION}"