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

Add config option to select UPower device based on device model. #3267

Merged
merged 3 commits into from
Jul 1, 2024

Conversation

luttermann
Copy link
Contributor

This is useful for wireless HID devices, as they often do not have the same native-path when re-connected.

src/modules/upower.cpp Outdated Show resolved Hide resolved
@luttermann
Copy link
Contributor Author

This is stil not using a filer function, but does away with the code duplication, if you want to have a filter function instead, I will look into that.
But I don't have a lot of time currently, so it may take a while. Anybody who have any pointers/ideas are welcome to comment or PR my code.

@Alexays Alexays merged commit 9997155 into Alexays:master Jul 1, 2024
8 checks passed
3u13r added a commit to 3u13r/Waybar that referenced this pull request Aug 31, 2024
While looping over all the upower devices, the currently set device that will be rendered in the waybar, is overridden. Since the loop doesn't end when the device is found, the upDevice_ is overridden with NULL in the iteration for the next device.

Now we only override upDevice_ if the current device matches the constraints.

Fixes d2a719d ("Redo to minimize code duplication.")
Fixes Alexays#3267
3u13r added a commit to 3u13r/Waybar that referenced this pull request Aug 31, 2024
While looping over all the upower devices, the currently set device that will be rendered in the waybar, is overridden. Since the loop doesn't end when the device is found, the upDevice_ is overridden with NULL in the iteration for the next device.

Now we only override upDevice_ if the current device matches the constraints.

Fixes d2a719d ("Redo to minimize code duplication.")
Fixes Alexays#3267
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.

3 participants