CLI GUI compatibility#166
Merged
actuallymentor merged 2 commits intoactuallymentor:mainfrom Aug 20, 2023
Merged
Conversation
… reboot. - Problem: On launch of GUI, the maintain.percentage file is deleted, causing the GUI to recreate the file with default value of 80. - Solution: In battery.sh, if "$setting" == "stop", file maintain.percentage should not be deleted to keep persistence of any previous setting.
Owner
|
Thanks for the addition @olivierbnt! |
panoskava
pushed a commit
to panoskava/battery
that referenced
this pull request
Mar 17, 2026
…bility CLI GUI compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for issue #149 and #128: The percentage set in the CLI is not persistent upon GUI reboot, and reset to 80%.
Problem: On launch of the GUI, the maintain.percentage file is deleted, causing the GUI to recreate the file with default value of 80.
this is caused by the call "battery maintain stop" which deletes the maintain.percentage file.
This issue is easily reproduced by changing the
battery maintain 70via CLI, and then launching the GUI.Solution: Remove the deletion of file maintain.percentage in "battery maintain stop" to keep persistence of any previous setting.
-> I have added the deletion of all config files upon uninstall so default settings are back if the user reinstalls battery.
Test: The solution was tested by changing the value through the CLI, and rebooting the GUI multiple times. + Uninstalling the CLI removes the
.batteryfile.Closes #149, Closes #128