12 lines
338 B
Bash
Executable file
12 lines
338 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Check if a tmux session named 'cmus' exists
|
|
if tmux has-session -t cmus 2>/dev/null; then
|
|
# Attach to the existing tmux session
|
|
alacritty -e tmux attach-session -t cmus
|
|
else
|
|
# Create a new tmux session named 'cmus' and run cmus
|
|
tmux new-session -d -s cmus cmus
|
|
alacritty -e tmux attach-session -t cmus
|
|
fi
|