nix/modules/wm/hyprland/scripts/cmus.sh
2024-10-09 21:32:06 +02:00

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