Closed thyeun closed 2 years ago
Tauon supports MPRIS (https://wiki.archlinux.org/title/MPRIS).
You can use a tool like playerctl
to get easily get information about tauon, the easiest thing to do (imo) is to replace the mpd calls with playerctl
equivalents.
@zkldi ok, thanks!!! will try it out
Yep. playerctl
will be the way.
You'll just have to edit that script to use that instead. For the cover art is a bit easier than what's there, just use playerctl metadata mpris:artUrl
, you'll just need to convert the URI to a path if that app doesn't support URI's.
Done successfully, but can i ask, possible run Tauon at the background, as like i play the first song than only Tauon appear on screen?
Done successfully, but can i ask, possible run Tauon at the background, as like i play the first song than only Tauon appear on screen?
Can you rephrase that?
As you can see my eww-bar, the music icon are inactive, and no song are playing
As what i want is, let Tauon always running at the background on the system, but when i press play something
(mean i start playing a song), it will open up Tauon Music Box
A bit hard to said in words here :(
Okay I think I see what you mean, you want it to show the window on demand? I don't think playerctl
supports this, but you can use dbus directly using:
dbus-send --session --type=method_call --dest=org.mpris.MediaPlayer2.tauon /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Raise
Though, there is a bug in Tauon currently causing this to not work properly. I've committed a fix but its not in a release version yet.
Note that some desktop environments like GNOME don't allow apps to self raise themselves regardless. You could work around that by enabling "show in system tray" and "close to tray" in Tauon (Menu > Settings > Function > Page 3)
@Taiko2k the dbus way is same like polybar using the MPRIS python file?
if yes, i think i can try it out, been try it on polybar before i change to eww-bar.
the dbus way is same like polybar using the MPRIS python file?
dbus-send
is just a program you can use in place of playerctl
.
Cant make it work, not well understand how dbus-send
done things
Basically you would run that command first to raise the window, then the playerctl
command. If you have dbus-send
then it should work, try it in a terminal:
dbus-send --session --print-reply --type=method_call --dest=org.mpris.MediaPlayer2.tauon /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Raise
Yes, i trying using the command from yours, but getting below error
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.tauon was not provided by any .service files
Will try it later on
Tauon will need to be running for that to work
i understand what you want to guide me on, but that not the way i prefer, hahahaha
Very hard to explain how i prefer.
Do you using Microsoft Teams (linux), when you close the team, the process of Teams still running at the background, once there are someone contact/chat with you, you will get an alert notice, and once you click on that notice, Teams will appear again.
So, when i close Tauon, Tauon still will running at the background (mean you wont see Taoun in my workspace), but it will appear back when i click play on the eww-bar and play the song immediately.
So, when i close Tauon, Tauon still will running at the background
You can enable the "tray" option with min to tray enabled as mentioned before for that kind of behavior.
appear back when i click play on the eww-bar and play the song immediately.
You'd have to do it the way I mentioned, use that dbus command to reveal the window (working in tauon master, not release version yet), then use playerctl to play.
@Taiko2k i know why i fail, the close to tray
once i login and logout, it will back to original, and because of that, once i raise back using the dbus-send, Tauon wont appear because no service
, if the Tauon service detected, i will get the below message from terminal
method return time=1644922170.413366 sender=:1.30 -> destination=:1.316 serial=279 reply_serial=2
You can try reproduce the system tray with login and logout error, see you face the same error or not. Tauon version : 7.1.0 Original:
Well its not an error, tauon wont start on login by itself. But you could add it to your startup applications manually yourself. You can have it start in the background by running tauon --tray
.
Ok, than everything perfect now, thank you so much.
And waiting your latest release also :)
Sorry for asking a question here, it is doable Tauon Music Box on eww-bar?
Based on the suggestion code by adi1090x, that done for
mpc
as below