2026-02-19 22:27:28 +03:00

20 lines
538 B
Bash
Executable File

#!/bin/sh
set -eux
readonly SESSION=music
readonly MAINW=radio
readonly SECONDW=tunes
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 new-window -t "${SESSION}" -d -n "${SECONDW}" -c "${WORKING_PROJECT}"
tmux send-keys -t "${SESSION}:${MAINW}.1" "radio rock" Enter
tmux send-keys -t "${SESSION}:${SECONDW}.1" 'tunes'
fi
tmux switch-client -t "${SESSION}"