You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
465 B
16 lines
465 B
#!/bin/sh |
|
# Requires playerctl: http://dubstepdish.com/blog/2014/04/19/introducing-playerctl/ |
|
# Useful when bound to a global Hotkey |
|
|
|
SongsFile="${1-$HOME/Documents/Songs.text}" |
|
|
|
IGNORE=plasma-browser-integration |
|
|
|
Artist="$(playerctl metadata artist -i $IGNORE)" |
|
Title="$(playerctl metadata title -i $IGNORE)" |
|
|
|
|
|
echo "$Artist -- $Title" >>$SongsFile |
|
|
|
test -t 1 && Notify=echo || Notify=notify-send |
|
$Notify "Remembered ´$Title´ by ´$Artist´ in ${SongsFile##*/}"
|
|
|