Auto-probe battery on Linux

This commit is contained in:
2026-06-18 09:01:46 -04:00
parent 94ac6c00d3
commit 8c50198467
+7
View File
@@ -2,6 +2,13 @@ if( $?CSHENV_DEBUG ) then
echo "Sourcing tcshrc.system.Linux..."
endif
unsetenv CSHENV_BATTERY_DEVICE
unsetenv CSHENV_SHOW_BATTERY_LEVEL
foreach location ( /sys/class/power_supply/BAT* )
setenv CSHENV_BATTERY_DEVICE ${location}/capacity
setenv CSHENV_SHOW_BATTERY_LEVEL
end
# Set the acknowledgement bit, essentially
setenv CSHENV_SYSTEM_CONFIGURED Linux