You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.4 KiB
33 lines
1.4 KiB
3 months ago
|
#!/bin/sh
|
||
|
|
||
|
case $( sysctl -n hw.acpi.acline ) in
|
||
|
|
||
|
(0) # BATTERY
|
||
|
doas sysctl dev.hwpstate_intel.0.epp=0 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.1.epp=50 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.2.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.3.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.4.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.5.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.6.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.7.epp=100 1> /dev/null 2> /dev/null
|
||
|
#backlight 20 1> /dev/null 2> /dev/null
|
||
|
backlight $(cat ${HOME}/.backlight-bat) 1> /dev/null 2> /dev/null
|
||
|
;;
|
||
|
|
||
|
(1) # AC
|
||
|
doas sysctl dev.hwpstate_intel.0.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.1.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.2.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.3.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.4.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.5.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.6.epp=100 1> /dev/null 2> /dev/null
|
||
|
doas sysctl dev.hwpstate_intel.7.epp=100 1> /dev/null 2> /dev/null
|
||
|
#backlight 100 1> /dev/null 2> /dev/null
|
||
|
backlight $(cat ${HOME}/.backlight-ac) 1> /dev/null 2> /dev/null
|
||
|
;;
|
||
|
|
||
|
esac
|
||
|
|