Skip to content

Instantly share code, notes, and snippets.

@dewomser
Last active May 3, 2022 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dewomser/5c340fe9cce98936817716749e84a071 to your computer and use it in GitHub Desktop.
Save dewomser/5c340fe9cce98936817716749e84a071 to your computer and use it in GitHub Desktop.
Mastodon "Ich höre gerade"
readarray 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: file:\/\///g')"; toot post "${a[1]} ${a[2]} ${a[3]} ${a[4]}" --media ${a[0]} --debug
@dewomser
Copy link
Author

Ein Einzeiler für die Bash. Benötigt wird der Audioabspieler Clementine für KDE/Linux und zum Tooten muss Toot installiert und koniguriert sein.

@dewomser
Copy link
Author

Direkt ins array schreiben ohne Zwischenschritt

@dewomser
Copy link
Author

dewomser commented May 3, 2022

Wird auf Github in einem eigenen repository weiterentwickelt:
https://github.com/dewomser/Tweet_and_toot_music_is_playing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment