https://github.com/fasilofficial/power-mode
A simple script file for changing the power mode in Linux based on if the laptop is plugged or not
https://github.com/fasilofficial/power-mode
Last synced: about 1 month ago
JSON representation
A simple script file for changing the power mode in Linux based on if the laptop is plugged or not
- Host: GitHub
- URL: https://github.com/fasilofficial/power-mode
- Owner: fasilofficial
- Created: 2023-12-17T06:58:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-15T06:22:41.000Z (about 1 year ago)
- Last Synced: 2024-03-15T07:39:16.912Z (about 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Power Mode
This is a simple shell script which automatically change the power mode to performance and balanced when the laptop is plugged in and not plugged in respectively.
## How to use
1. Download the shell file and paste it in your user directory ( /home/your_username )
2. Run the following commands line by line
```
chmod +x /home/your_username/power_mode.sh #giving permission for execution
sudo crontab -u root -e #to add new task on crontab
```3. Choose your preferred text editor or press enter for the default editor
4. Add the follwing line at the end of the opened file
```
*/5 * * * * /home/your_username/power_mode.sh
```You can change the number if you want (Given line executes the script every 5 minutes)
5. Save the file and exit
6. Finally, to check if the cron job is added successfully, run the following command
```
sudo crontab -u root -l | tail -n 1
```If you see the cron job task you added on the terminal, you did it!
## Support
Give this repository a star