#!/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