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