# The resource file for asapm

# fail = terminate on errors while reading APM device
# nofail = don't (default)
### nofail
### fail
nofail

# The alternative device to read APM info from
### device /proc/apm

# SysLevels = Use the system (APM daemon) definition
# for "low" and "critical" power levels
# NoSysLevels = use asapm definition (40% and 20%)
### NoSysLevels

# SysTime = use the time to live for the battery as
# supplied by the APM daemon
# NoSysTime = calculate our own
### SysTime

# Force the given color depth for the bitmaps
### ColorDepth 16

#-------------------------------------------------------
# From here go the commands-reactions on certain events.
# The bash is used to execute (see system(3) call) them
# so check the commands carefully.
#
# To put the executed commands in the background
# for asynchronous execution add "&"
# Watch out for race conditions when you execute commands
# asynchronously.

# ACOn = execute this command when switched over to the AC
### ACOn cat ~/GNUstep/Library/AfterStep/desktop/sounds/train.au > /dev/audio

# ACOff = execute the command when the AC power is off
### ACOff cat ~/GNUstep/Library/AfterStep/desktop/sounds/crash.au > /dev/audio

# PowerDown = execute this command every time the battery
# power level decreases
PowerDown cat ~/GNUstep/Library/AfterStep/desktop/sounds/drip.au > /dev/audio

# PowerUp = execute this command every time the battery
# power level increases
### PowerUp cat ~/GNUstep/Library/AfterStep/desktop/sounds/gong.au > /dev/audio

# DownTo <percent> <command> 
# execute the command when power level falls to this 
# _exact_ level
DownTo 10 /usr/bin/sudo /usr/bin/apm -s ; xmessage 'You forgot to switch off the machine, so I did it for you! - asapm'

# UpTo <percent> <command>
# execute this command when the power level of the battery
# reaches up to this _exact_ level
UpTo 100 cat ~/GNUstep/Library/AfterStep/desktop/sounds/train.au > /dev/audio &

#-------------------------------------------------------------
# From here on go the colors for various parts of the display.

# Status - the color of the time-left and percentile indicators
### Status  #00a0a0

# Green - the color for the letters and signs
### Green   #00a0a0

# Yellow - the color for the battery sign when low power
### Yellow  yellow

# Red - the color for the battery sign when critical power level
### Red     #ff0000

# Lower - the battery indicator part for the charge left
### Lower   #007070

# Upper - the part of the battery we've used Up ;)
### Upper   #303030

