13
295
Fork
You've already forked yambar
74

mpris module don't update when dbus client is already launched before launching yambar #447

Open
opened 2025年03月09日 23:54:21 +01:00 by apheleia · 7 comments

If mpv is launched and I launch yambar, pausing/unpausing don't update mpris module.

Launching mpv when yambar is already launched works fine (see video)

If mpv is launched and I launch yambar, pausing/unpausing don't update mpris module. Launching mpv when yambar is already launched works fine (see video)
7.3 MiB
Owner
Copy link
@haruInDisguise
Contributor
Copy link

This was actually an intentional decision. The mpris module only listens for events on the message bus (like new clients or property changes), and since clients are only advertised on startup, pre-existing clients are not recognized.
The rationale behind this was my assumption, that it is somewhat unlikely for users to start yambar after there mpris client (since yambar probably starts with there WM). But it looks like you have just proven me wrong.

I will see if I can get around to this (削除) today (削除ここまで) week, since this change isn't really straight forward, and will require quite a bit of additional logic.

This was actually an intentional decision. The mpris module only listens for events on the message bus (like new clients or property changes), and since clients are only advertised on startup, pre-existing clients are not recognized. The rationale behind this was my assumption, that it is somewhat unlikely for users to start yambar after there mpris client (since yambar probably starts with there WM). But it looks like you have just proven me wrong. I will see if I can get around to this ~~today~~ week, since this change isn't really straight forward, and will require quite a bit of additional logic.

I tought about that. The usecase is that I sometimes use a keybind to "toggle the bar" but there is no way to do this without killing it and relaunching it afterwards.

I know waybar can be toggled with a specific signal (something like kill -s USR1 waybar I forgot the exact cmd). Idk if it can be done with yambar.

I tought about that. The usecase is that I sometimes use a keybind to "toggle the bar" but there is no way to do this without killing it and relaunching it afterwards. I know waybar can be toggled with a specific signal (something like kill -s USR1 waybar I forgot the exact cmd). Idk if it can be done with yambar.
Contributor
Copy link

@apheleia, I've finally gotten around to implementing client discovery on startup: https://codeberg.org/haruInDisguise/yambar/src/branch/module_mpris_client_sync_on_startup

@dnkl, I'm a bit uncertain about how to commit this feature. Should be its own PR or just another commit in #446? The commit history on this PR is already a bit of a mess, since I just rebranded it into a bugfix "collection" of all the things I messed up.

Edit: typo

@apheleia, I've finally gotten around to implementing client discovery on startup: https://codeberg.org/haruInDisguise/yambar/src/branch/module_mpris_client_sync_on_startup @dnkl, I'm a bit uncertain about how to commit this feature. Should be its own PR or just another commit in #446? The commit history on this PR is already a bit of a mess, since I just rebranded it into a bugfix "collection" of all the things I messed up. Edit: typo

it works :D

it works :D
Contributor
Copy link

Just a heads-up: I've fixed a segfault if there are no clients on startup, and the metadata for existing clients is now processed correctly.

Just a heads-up: I've fixed a segfault if there are no clients on startup, and the metadata for existing clients is now processed correctly.
Owner
Copy link

Since #446 has been merged, please open a new PR :)

Since #446 has been merged, please open a new PR :)
Sign in to join this conversation.
No Branch/Tag specified
master
releases/1.11
releases/1.10
releases/1.9
releases/1.8
releases/1.7
releases/1.6
releases/1.5
releases/1.4
releases/1.3
releases/1.2
releases/1.1
releases/1.0
1.11.0
1.10.0
1.9.0
1.8.0
1.7.0
1.6.2
1.6.1
1.6.0
1.5.0
1.4.0
1.3.1
1.3.0
1.2.0
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
0.9.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/yambar#447
Reference in a new issue
dnkl/yambar
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?