Auto-probe battery on Linux
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user