-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: add UPower Service #10
Conversation
I will help out with testing when I can! |
this terrible code can help you with testing: from ignis.services.battery import BatteryService
battery = BatteryService.get_default()
for prop_name in [
"available",
"percent",
"charging",
"charged",
"icon_name",
"time_remaining",
"energy",
"energy_full",
"energy_rate",
]:
battery.connect(
f"notify::{prop_name.replace('_', '-')}",
lambda x, y: print(f"{prop_name}: ", getattr(battery, prop_name)),
) |
Issue: I am encountering an error when running the
|
This is not an issue, this exception means that you have another notification daemon running. In your case it is swaync, kill or remove it Please read the error text carefully |
it is returning False |
try now (after 87ea7d9) |
sudo udevadm trigger --subsystem-match=power_supply --action=add |
nothing changed |
it is still returning False and it has a new error
|
You can "simulate" a battery by using symlink mkdir BAT0
sudo ln -s BAT0/ /sys/class/power_supply/BAT0/
echo 100 | sudo tee BAT0/capacity
echo "Charging" | sudo tee BAT0/status
echo 4200000 | sudo tee BAT0/voltage_now
echo 5000000 | sudo tee BAT0/current_now Although, this method is ancient. I don't know if it will work on modern linux |
Have you installed |
Being able to set a charge limit from the quick settings would be nice too, somewhat like this gnome extension |
It seems that /sys cannot be modified. But I found some kernel module and it's working |
Finally got the pull request working. Here's the output (Battery is at 98 and AC is plugged in)
|
If I was smarter, I would test before It get push... But here I am, too stupid to uninstall and rebuild the package, hoping it come soon. . |
Looks to be working now. Can you provide instructions for fast rebuilding and installing? I am not very familiar with meson or python |
You can Set up a development environment and when: |
Added instruction in the first message |
I know how to use git. Just can't get meson to see the changes meson compile -C build
|
You don't need to rebuild Ignis every time. You need to do this in the first time to build submodules and install bin file. Since we are making a symbolic link in the above tutorial, we don't need to reinstall Ignis every time to update it in venv. |
added to tasks |
Only the energy_rate values differ? From upower docs:
Maybe the power consumption is just not constant, so it drops to zero and rises back to 10.204 |
The battery percentage displays correctly, and I have implemented the battery in the bar, but |
9caa6b4: Moved to UPowerGlib, also added support for managing multiple batteries, need testing. There are two properties for devices ( I will not describe all the properties for |
Hi, sorry I'm new to Linux and git in general so please pardon my clumsiness First of all, love the work, I have been testing this and it seems to work fine for me. My laptop only have a single battery so cannot test for the multiple one, but everything else seems to be good The only problem i found is the time_remaining prop which failed cause there is no Didn't know how to make a pull request so that's about it. I would report if I found another issues, love my experience with this software so far, thank you for creating it. |
fixed in faf4e41 |
…rvice to upower service
56ac88d Now this service has support for non battery devices. In particular, batteries have been moved to the new property: |
The only thing left is to test charge threshold To check if your battery supports the charge threshold, use the If |
no activity :( charge threshold support will be removed |
Add
batteryUPower Service.Completely stolen from AGS(Now it's 100% Ignis implementation)I don't have a device with a battery, so this pull request requires testing by other people.
How to install:
git checkout feat/battery
.On each new commit use
git pull
to receive new changes