Files
arch-dotfiles/scripts/batt-toggle
2026-06-18 10:10:37 +02:00

10 lines
329 B
Bash
Executable File

#!/bin/bash
current=$(cat /sys/class/power_supply/BAT0/charge_control_end_threshold)
if [ "$current" -eq 80 ]; then
sudo cctk --PrimaryBattChargeCfg=Custom:95-100
notify-send "Batterie" "Charge standard (100%)"
else
sudo cctk --PrimaryBattChargeCfg=Custom:50-80
notify-send "Batterie" "Charge limitée à 80%"
fi