nix/modules/wm/hyprland/scripts/cmus.sh

12 lines
338 B
Bash
Raw Normal View History

2024-08-31 16:04:57 +02:00
#!/bin/sh
2024-10-09 21:32:06 +02:00
# 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
2024-08-31 16:04:57 +02:00
else
2024-10-09 21:32:06 +02:00
# Create a new tmux session named 'cmus' and run cmus
tmux new-session -d -s cmus cmus
alacritty -e tmux attach-session -t cmus
2024-08-31 16:04:57 +02:00
fi