Battery Conservation Mode

I created a script for Switching on and Switching off the battery conservation mode in bash, the link for the script is, (GitHub - seetharaman52/smart-energy-switch: A Bash script to toggle conservation mode on your system (Especially for Lenovo with Linux OS)). Do i need to modify something in this script?

Hi, and welcome.

I would very much rather write more explicit commands such as "on", "off", "disable" and "enable" instead of "1" and "0".

But then you would require language translation for non-English use.

1 Like

The pull request to add a translation to another language would have more written English in it than the translation itself... Not that I'm opposed to the idea, I just don't think it's a requirement. But in any case the more explicit wording would be much more desirable for clarity and extensibility, regardless of the language.

This is Lenovo IdeaPad specific. No other manufacturer will have the ideapad_acpi directory in the OS. I could be wrong, but this would be manufacturer specific.

You could add a test of whether that directory exists, and if not, research other acpi directories, though not all manufacturers provide this kind of configuration possibility.

You may want to add "for Lenovo IdeaPad" to the title of this thread.

1 Like

Give a like if you like this Tweet!

@Seetharaman , please read the summarized content in the arrow below.


You are within the guidelines with your two posts here; but you are getting very close to the edge of them.

It is fine to show your scripts as you challenge yourself and to seek feedback, criticism and some validation. However, spam and advertising are not (and cannot be) permitted.
I do not consider your posts spam at this time; but let's please limit this thread to discussions about your script and refrain from external linking as advertising from this point forward.
As members establish themselves and contribute to the community, they can have a much easier time linking and sharing their work. Currently, you have only ever made these two posts on the forum.

You specifically asked for feedback about your script which you have received some of. I see, too, that you listened to feedback and have made changes to improve accuracy.