Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #141: Waybar subscription missed opportunity #142

Merged
merged 4 commits into from
Jul 10, 2022

Conversation

carlosV2
Copy link
Contributor

@carlosV2 carlosV2 commented Jul 7, 2022

This PR includes the number of notifications in the text field when swaync-client is called with waybar subscription. (Issue #141)

With this PR, the output of the command becomes like this (please, note the text field being non-empty now):

{"text": "1", "alt": "notification", "tooltip": "1 Notification", "class": "notification"}
{"text": "2", "alt": "notification", "tooltip": "2 Notifications", "class": "notification"}
{"text": "2", "alt": "notification", "tooltip": "2 Notifications", "class": ["notification", "cc-open"]}
{"text": "2", "alt": "notification", "tooltip": "2 Notifications", "class": ["notification", "cc-open"]}
{"text": "1", "alt": "notification", "tooltip": "1 Notification", "class": ["notification", "cc-open"]}
{"text": "0", "alt": "none", "tooltip": "", "class": ["none", "cc-open"]}
{"text": "0", "alt": "none", "tooltip": "", "class": ["none", "cc-open"]}
{"text": "0", "alt": "none", "tooltip": "", "class": ["none", "cc-open"]}
{"text": "0", "alt": "none", "tooltip": "", "class": "none"}
...

P.S.: I couldn't find tests for this feature. Are there any?

Thank you!

@ErikReider ErikReider linked an issue Jul 8, 2022 that may be closed by this pull request
@ErikReider
Copy link
Owner

I sadly haven't had any time to write any tests at all :(

@ErikReider
Copy link
Owner

A update to the README would be good too :)

@carlosV2
Copy link
Contributor Author

carlosV2 commented Jul 8, 2022

Ok, I've added a little something to the README.

I've also tried to fix the linting issue but because I've never worked with vala before, I'm not sure I've fixed it or made it worse... let's see (to be honest, I wasn't sure what the error really was 😅). The code definitely works as I've manually tested it and, let's be honest, my contribution is not rocket science anyway 😂.

src/client.vala Outdated Show resolved Hide resolved
@carlosV2
Copy link
Contributor Author

Ok, done!

All you said makes sense. I didn't realise the parenthesis had an space leading them. Anyway, it should work now 😄

Copy link
Owner

@ErikReider ErikReider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@ErikReider ErikReider merged commit b455c63 into ErikReider:main Jul 10, 2022
@carlosV2
Copy link
Contributor Author

Out of curiosity, what is the process this needs to follow until it ends in a linux distro? Arch to be more precise

@ErikReider
Copy link
Owner

Atm it's only officially supported in the AUR. I'm actually not sure about that... I'll maybe check it out if I have some spare time. It would be nice to only need to maintain the swaync-git PKGBUILD instead of maintaining both (if that's even how it works...). I'll open an issue :)

@carlosV2
Copy link
Contributor Author

Ah ok, cool. Thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Waybar subscription missed opportunity
2 participants