mirror of
https://github.com/dewomser/Toot_music_is_playing.git
synced 2026-03-13 16:37:17 +01:00
5 lines
460 B
Bash
Executable file
5 lines
460 B
Bash
Executable file
#!/bin/bash
|
|
readarray -t a <<< "$(qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep -E 'artUrl|genre|artist|album:|title:'| sed -e 's/xesam://g'| sed -e 's/mpris:artUrl:[[:space:]]file:\/\///g')"
|
|
a[5]="https://www.youtube.com/results?search_query=${a[2]} ${a[4]}"
|
|
lolo=${a[5]// /+}
|
|
echo -e "Ich höre gerade \n${a[1]}\n${a[2]}\n${a[3]}\n${a[4]}\nVideo (geraten): $lolo" | toot post --media "${a[0]}"
|