Skip to content

feat(battery-threshold): ability to select which battery to configure#246

Open
itscrystalline wants to merge 14 commits intonoctalia-dev:mainfrom
itscrystalline:battery-threshold-selection
Open

feat(battery-threshold): ability to select which battery to configure#246
itscrystalline wants to merge 14 commits intonoctalia-dev:mainfrom
itscrystalline:battery-threshold-selection

Conversation

@itscrystalline
Copy link
Contributor

moved from #172 due to messy history

  • Adds a settings panel to configure the battery used for the charging threshold
  • No longer assumes /bin/bash exists in it's shell commands, quickshell can just use the sh in PATH

@ItsLemmy
Copy link
Contributor

@twilfredo

@twilfredo
Copy link

hey @itscrystalline, thanks for adding this. Out of curiosity, what is your use-case for this? Do you have multiple laptop batteries? Or is sysfs showing some other battery as BAT0 for you?

@itscrystalline
Copy link
Contributor Author

hey @itscrystalline, thanks for adding this. Out of curiosity, what is your use-case for this? Do you have multiple laptop batteries? Or is sysfs showing some other battery as BAT0 for you?

my laptop shows it’s main battery as BAT1, yeah. so i decided to just make it be able to detect the main battery and others and allow selection between them.

@itscrystalline
Copy link
Contributor Author

itscrystalline commented Feb 16, 2026

isAvailable should not be set to true when no batteries are detected now. i also added a check to the right click event opening the settings menu, so now the settings menu should be inaccessible if there are no batteries.

@twilfredo
Copy link

isAvailable should not be set to true when no batteries are detected now. i also added a check to the right click event opening the settings menu, so now the settings menu should be inaccessible if there are no batteries.

image Testing on commit <85e0c326b381> on a system without any BATx, I see this in the plugins menu. When no battery devices are available this should say something like "Not available on this system" similar to the widget.

@itscrystalline
Copy link
Contributor Author

I forgot you can do that..

Copy link

@twilfredo twilfredo left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for adding this.

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