Skip to content

Commit

Permalink
chore(setup): Set BCLM automatically
Browse files Browse the repository at this point in the history
If it's MacBook, set maximum percentage to 80.
  • Loading branch information
5ouma committed Mar 28, 2024
1 parent 3940d1a commit 25511e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ restoreLoginItems() {
gum run 'Running `mli load`...' -- mli load --file="$data/login_items.json"
} && run 'restoreLoginItems' '## 📑 Restore Login Items' true

limitBatteryCharge() {
[[ "$(bclm read)" == 80 || $(bclm read) =~ 'driverNotFound' ]] && skip
sudo bclm write 80
sudo bclm persist
} && run 'limitBatteryCharge' '## 🔋 Limit battery carge' true

generateGitHooks() {
[[ -f "$XDG_CONFIG_HOME/git/hooks/pre-commit" && -f "$XDG_CONFIG_HOME/git/hooks/commit-msg" ]] && skip
pre-commit init-templatedir "$XDG_CONFIG_HOME/git" -c="$data/pre-commit.yml" | sed -n 1p
Expand Down

0 comments on commit 25511e7

Please sign in to comment.