Use dbus to get name of mediaplayer currently playing
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
EDIT: I removed and rewrote most of the post to make the question more direct and to make the post a lot shorter. You can of course view the edit history to get the previous version.
Using bspwm on Arch Linux. playerctl
to control media, sxhkd
to bind media keys to playerctl commands.
I'm trying to find a way to get the latest active media player so when I use the media keys to play/pause a song/movie/.. , my pc automatically controls the latest active mediaplayer.
For instance, when Spotify happens to be open in the background and I'm watching something on VLC, it knows to control VLC and not Spotify when I press media keys. Right now, if both are open, VLC always gets priority from playerctl.
What I need is a way to ask dbus which mediaplayer is currently playing a song, so I can keep it in a file.
linux d-bus mediaplayer
add a comment |Â
up vote
1
down vote
favorite
EDIT: I removed and rewrote most of the post to make the question more direct and to make the post a lot shorter. You can of course view the edit history to get the previous version.
Using bspwm on Arch Linux. playerctl
to control media, sxhkd
to bind media keys to playerctl commands.
I'm trying to find a way to get the latest active media player so when I use the media keys to play/pause a song/movie/.. , my pc automatically controls the latest active mediaplayer.
For instance, when Spotify happens to be open in the background and I'm watching something on VLC, it knows to control VLC and not Spotify when I press media keys. Right now, if both are open, VLC always gets priority from playerctl.
What I need is a way to ask dbus which mediaplayer is currently playing a song, so I can keep it in a file.
linux d-bus mediaplayer
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
EDIT: I removed and rewrote most of the post to make the question more direct and to make the post a lot shorter. You can of course view the edit history to get the previous version.
Using bspwm on Arch Linux. playerctl
to control media, sxhkd
to bind media keys to playerctl commands.
I'm trying to find a way to get the latest active media player so when I use the media keys to play/pause a song/movie/.. , my pc automatically controls the latest active mediaplayer.
For instance, when Spotify happens to be open in the background and I'm watching something on VLC, it knows to control VLC and not Spotify when I press media keys. Right now, if both are open, VLC always gets priority from playerctl.
What I need is a way to ask dbus which mediaplayer is currently playing a song, so I can keep it in a file.
linux d-bus mediaplayer
EDIT: I removed and rewrote most of the post to make the question more direct and to make the post a lot shorter. You can of course view the edit history to get the previous version.
Using bspwm on Arch Linux. playerctl
to control media, sxhkd
to bind media keys to playerctl commands.
I'm trying to find a way to get the latest active media player so when I use the media keys to play/pause a song/movie/.. , my pc automatically controls the latest active mediaplayer.
For instance, when Spotify happens to be open in the background and I'm watching something on VLC, it knows to control VLC and not Spotify when I press media keys. Right now, if both are open, VLC always gets priority from playerctl.
What I need is a way to ask dbus which mediaplayer is currently playing a song, so I can keep it in a file.
linux d-bus mediaplayer
linux d-bus mediaplayer
edited 26 mins ago
asked Oct 25 at 19:33
zjeffer
387
387
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477823%2fuse-dbus-to-get-name-of-mediaplayer-currently-playing%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password