default commands
parent
b58336c621
commit
165195cd96
|
@ -9,15 +9,18 @@ import Monitors.Net (queryNet)
|
|||
import Monitors.Volume (queryVolume)
|
||||
|
||||
usage :: IO String
|
||||
usage = printf "%s bat | vol | net | date" <$> getProgName
|
||||
usage = printf "%s bat (acpi_command) | vol (pamixer_command) | net (nmcli_command) | date" <$> getProgName
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
args <- getArgs
|
||||
output <- case args of
|
||||
[ "bat", cmd ] -> queryBattery cmd
|
||||
[ "bat" ] -> queryBattery "acpi"
|
||||
[ "vol", cmd ] -> queryVolume cmd
|
||||
[ "vol" ] -> queryVolume "pamixer"
|
||||
[ "net", cmd ] -> queryNet cmd
|
||||
[ "net" ] -> queryNet "nmcli"
|
||||
[ "date" ] -> queryDate True
|
||||
[ "date-min" ] -> queryDate False
|
||||
_ -> usage
|
||||
|
|
Loading…
Reference in New Issue