Maintainer | ongy |
---|---|
Stability | testing |
Portability | Linux |
Safe Haskell | Safe |
Language | Haskell2010 |
This module allows to read information about a battery connected to the system.
This module does not support every setup yet. The files in sys used by this module are driver dependend. If it crashes monky for you setup please make a bug report with an `ls sysclasspower_supply" ++ e ++ "/` attached.
- getBatteryHandle :: String -> String -> IO BatteryHandle
- getBatteryHandle' :: String -> IO BatteryHandle
- getCurrentStatus :: BatteryHandle -> IO BatteryState
- getCurrentLevel :: BatteryHandle -> IO Int
- data BatteryHandle
- getTimeLeft :: BatteryHandle -> IO Int
- getLoading :: BatteryHandle -> IO Float
- data BatteryState
Documentation
:: String | The name of the wall socket adapter used by the battery |
-> String | The name of the battery |
-> IO BatteryHandle |
Create a BatteryHandle
getBatteryHandle' :: String -> IO BatteryHandle #
Version which defaults to BAT0
getCurrentStatus :: BatteryHandle -> IO BatteryState #
Get the current state of the battery (loadingdrainingfull)
getCurrentLevel :: BatteryHandle -> IO Int #
Get the charge left in the battery in percent.
data BatteryHandle #
The handle exported by this module
getTimeLeft :: BatteryHandle -> IO Int #
Get an approximated amount of seconds left until the battery runs out
getLoading :: BatteryHandle -> IO Float #
Get current loading speed in Watt/s