12345678910111213141516171819202122232425262728 |
- # Here are some bash aliases from my .bashrc
- # Using these aliases - I can control cmus from the terminal with a single short command, instead of "cmus-remote {parameters}"
- # From some of the commands, I also get some feedback from my "nowplay" script.
- alias now='nowplay' # call nowplay script
- alias play='cmus-remote -p;nowplay' # play a song and call nowplay to display the name of the current song
- alias pause='cmus-remote -u' # pause/resume
- alias resume='cmus-remote -u;nowplay' # pause/resume and call nowplay to display the name of the current song
- alias stop='cmus-remote -s' # stop playback
- alias next='cmus-remote -n;nowplay' # next track and nowplay to display the current song
- alias prev='cmus-remote -r;nowplay' # prev track and nowplay to display the current song
- alias cmup='cmus-remote -v +10%' # volume up by 10%
- alias cmdown='cmus-remote -v -10%' # volume down by 10%
- alias cmaddl='cmus-remote -l' # add items to the library e.g. cmaddl ~/Music/Kinasis/Divine\ Self\ Invention/ # would add my old bands album to the library
- alias cmaddp='cmus-remote -P' # add items to the currently selected playlist
- #toggle shuffle/repeat and output whether shuffle is enabled or disabled
- alias shuffle="cmus-remote -S; echo \"Shuffle: \$(cmus-remote -Q | \\grep shuffle | awk '{ print \$3 }')\""
- alias repeat="cmus-remote -R; echo \"Repeat: \$(cmus-remote -Q | \\grep repeat | awk '{ print \$3 }')\"" # toggle repeat
- # Shuffle function for cmus - alternative to the shuffle alias in the above section
- # Toggle cmus's shuffle functionality and outputs the state
- shf()
- {
- cmus-remote -S;
- echo "Shuffle: $(cmus-remote -Q | \grep shuffle | awk '{ print $3 }')"
- }
|