-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
bluetooth_battery: init at 1.2.0 #103023
bluetooth_battery: init at 1.2.0 #103023
Conversation
cc @ajs124 |
@@ -0,0 +1,30 @@ | |||
{ lib, fetchFromGitHub, buildPythonPackage, pybluez }: | |||
|
|||
buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not look like a library to me, but rather a case for buildPythonApplication
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, must have missed that when copying the expression from another package
3b95502
to
7e7d94a
Compare
Result of 1 package marked as broken and skipped:
|
7e7d94a
to
52d6ab3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The software seems a bit rough around the edges, but generally seems to work.
$ ./results/bluetooth_battery/bin/bluetooth_battery
Usage: bl_battery.py <BT_MAC_ADDRESS_1>[.PORT] ...
Port number is optional
Easy enough. But what do they mean by a port? And where to I find the MAC of my bluetooth devices?
$ ./results/bluetooth_battery/bin/bluetooth_battery --help
<blocks>
Fine, bluetoothctl
has those. My headphones are connected and I'm listening to music. Let's see how this goes:
$ ./results/bluetooth_battery/bin/bluetooth_battery CC:98:8B:XX:XX:XX
CC:98:8B:XX:XX:XX is offline (111, 'Connection refused')
$ ./results/bluetooth_battery/bin/bluetooth_battery CC:98:8B:XX:XX:XX
Battery level for CC:98:8B:XX:XX:XX is 50%
So yeah, seems to work generally. I'd love me some upower integration here. Until then, let's use this. Thanks for packaging it up, @cheriimoya.
mmh yea, so the maintainer of the original code responded to a recent issue of mine, i think you have the same issue right there... this fork has a nice readme update on how to find the bluetooth MACs i didn't quite get the "port" part of the project either, i think it's more like a bluetooth channel (i guess?) and for the upower part there is also an issue |
also the same headphones 😄 Thanks! |
Motivation for this change
I have a bluetooth headset that's capable of reporting the battery state. This tool allows for reading the battery percentage from my bluetooth headphones. I'd like to have this upstream, because i use it in my statusbar and it may be useful to many people.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)