Last active
November 15, 2022 10:31
-
-
Save aishenreemo/db1ee7154ed21ca85259662613549bbf to your computer and use it in GitHub Desktop.
my music player shell script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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