Created
September 14, 2025 22:11
-
-
Save haxwithaxe/bd7b15042e9ef0fb091cfa735ea6e311 to your computer and use it in GitHub Desktop.
Set the battery charge mode for Dell XPS 9380 and probaly others
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
| #!/bin/bash | |
| # Requires https://www.dell.com/support/kbdoc/en-us/000178000/dell-command-configure | |
| case $1 in | |
| safe) | |
| sudo cctk --PrimaryBattChargeCfg=Custom:50-80 | |
| exit 0 | |
| ;; | |
| max|full) | |
| sudo cctk --PrimaryBattChargeCfg=Standard | |
| exit 0 | |
| ;; | |
| *) | |
| cat - <<EOF | |
| Usage: $0 (safe|max|full) | |
| safe Limit charge to 80% and don't charge until 50% is reached. | |
| max|full Leasurely charge to 100% and stay topped off. | |
| EOF | |
| exit 1 | |
| ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment