Skip to content

Instantly share code, notes, and snippets.

@aishenreemo
Last active November 15, 2022 10:31
Show Gist options
  • Select an option

  • Save aishenreemo/db1ee7154ed21ca85259662613549bbf to your computer and use it in GitHub Desktop.

Select an option

Save aishenreemo/db1ee7154ed21ca85259662613549bbf to your computer and use it in GitHub Desktop.
my music player shell script
#!/bin/bash
sh="zsh"
MUSIC_DIR="~/Music"
SESSION="cmus"
WINDOW="music"
if tmux ls | grep "$SESSION"
then
tmux attach -t cmus
else
tmux start
tmux new-session -d -s "$SESSION" -n "$WINDOW" "$sh -c cmus"
tmux split-window -h "$sh -c peaclock"
tmux split-window -v "$sh -c unimatrix"
tmux split-window -v "$sh -c cava"
tmux select-pane -t 0
tmux send-keys -t 0 ":colorscheme green" Enter
tmux send-keys -t 1 "s"
tmux send-keys -t 3 "fff" Right
tmux attach -t "$SESSION"
tmux switch -t "$SESSION"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment