Closed kazemaksOG closed 2 months ago
Thank you! This looks much better than the previous solution when browsing through music. If people want it as an optional thing, we could perhaps add that in later.
Will it be optional at build-time or at run-time? I don't have libnotify and don't intend on adding it to my system...
Build-time. Would it work for you if you'd have to type:
make USE_LIBNOTIFY=0
or is there a better solution? I'll document it so that package maintainers can add that option.
Can't the Makefile also use pkg-config/pkgconfig to check if the user has libnotify-dev installed?
I think it can be done like this:
PKG_CONFIG ?= pkg-config
ifeq ($(origin USE_LIBNOTIFY), undefined) ifneq ($(shell $(PKG_CONFIG) --exists libnotify && echo yes),yes) USE_LIBNOTIFY = 0 else USE_LIBNOTIFY = 1 endif endif
If you don't set it explicitly, it defaults to whether you have libnotify installed. Maybe not super useful but...
I have committed some changes regarding this to develop.
The makefile was missing, I've added it now.
See #142
Replaced
execv
with a more proper usage of the library. On the downside, this library now needs to be added to the project.Main reason for this is that notifications flood (my) notification bar, so this ensures that only one notification is used and updated.
The layout also slightly changed, since the library doesn't seem to allow
NULL
or "" to be set as the summary (from what i tested), so I split it into artist and track name.Previous:![image](https://github.com/ravachol/kew/assets/59805622/bbb867a0-0a2a-4d68-86b1-2aca4efed220)
Now:![image](https://github.com/ravachol/kew/assets/59805622/0d5ee9a6-8580-4aa1-b298-b8edbf530c24)
I am unaware of how this works on different setups (mine is arch + wayland), so perhaps this is not as visually appealing as it is for me.
There is a an alternative way of making this work by using
excev
, since thenotify-send
can return the replacment-id of the notification, which can then be used to update it. This would be a bit more of a barbaric solution.