Skip to content

Instantly share code, notes, and snippets.

@johannesE
Last active June 6, 2019 07:48
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 johannesE/9a0331f56f60dfe2ec4b324a57d64455 to your computer and use it in GitHub Desktop.
Save johannesE/9a0331f56f60dfe2ec4b324a57d64455 to your computer and use it in GitHub Desktop.
pulseaudo-dlna with argos

Why?

I got annoyed by having to start pulseaudo-dlna always with the terminal.

Installation

Just use that file in ~/.config/argos/pulseaudo.5s.sh and run chmod +x ~/.config/argos/pulseaudo.5s.sh to make it executable. Install argos, the better bitbar alternative from here: https://github.com/p-e-w/argos You might need to install pulseaudio-dlna before that.

Result

You can stream your audio to many devices, even if they don't support chromecast. I have a delay, but that doesn't matter with music. The script offers a start, stop and settings option and shows whether it's running or not.

#!/usr/bin/env bash
if pgrep -x "pulseaudio-dlna" >/dev/null
then
echo ":musical_note: <span color='green'>running</span>"
else
echo ":musical_note: <span color='red'>stopped</span>"
fi
echo "---"
echo "Start | bash='pulseaudio-dlna --auto-reconnect' iconName=media-playback-start terminal=false color=green"
echo "Stop | bash='pkill pulseaudio-dlna' iconName=media-playback-stop terminal=false color=red"
echo "Sound | bash='gnome-control-center sound' iconName='emblem-system' terminal=false"
@johannesE
Copy link
Author

Screenshot:
image

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