Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Parse arguments into variables
- while test $# -ge 2; do
- eval _$1='$2'
- shift
- shift
- done
- # Check that file actually exists
- if test -n "$_file"; then
- # Log status to file
- echo "[$(date '+%x %R:%S')][$_status] $_artist - $_album - $_title" >> ~/.config/cmus/status_log.txt
- if [ $_status == "playing" ]; then
- # Pull current song icon into ~/.config/cmus/np_icon.jpg
- rm ~/.config/cmus/np_icon.jpg
- ffmpeg -i "$_file" -an -vcodec copy ~/.config/cmus/np_icon.jpg
- # Show notification
- notify-send -i ~/.config/cmus/np_icon.jpg "Now Playing" "$_artist - $_album - $_title"
- fi
- fi
Add Comment
Please, Sign In to add comment