Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Provides configuration types.
Synopsis
- data Config = MkConfig {
- events :: !(NonEmpty AnyEvent)
- logging :: !Logging
- noteSystem :: !NoteSystem
- data ConfigErr
- _FileErr :: Prism' ConfigErr SomeException
- _TomlError :: Prism' ConfigErr TOMLError
- _NoEvents :: Prism' ConfigErr ()
- data Logging = MkLogging {}
- data LogLoc
- _DefPath :: Prism' LogLoc ()
- _Stdout :: Prism' LogLoc ()
- _File :: Prism' LogLoc Path
- defaultLogging :: Logging
- data NoteSystem
- = DBus
- | NotifySend
- _DBus :: Prism' NoteSystem ()
- _NotifySend :: Prism' NoteSystem ()
- defaultNoteSystem :: NoteSystem
Config
Config
holds the data from ConfigToml
once it has been processed
(e.g., all user defined Events are parsed).
MkConfig | |
|
Instances
Show Config Source # | |
(k ~ A_Lens, a ~ NonEmpty AnyEvent, b ~ NonEmpty AnyEvent) => LabelOptic "events" k Config Config a b Source # | |
Defined in Navi.Config.Types | |
(k ~ A_Lens, a ~ Logging, b ~ Logging) => LabelOptic "logging" k Config Config a b Source # | |
Defined in Navi.Config.Types | |
(k ~ A_Lens, a ~ NoteSystem, b ~ NoteSystem) => LabelOptic "noteSystem" k Config Config a b Source # | |
Defined in Navi.Config.Types |
ConfigErr
represents the errors we can encounter when attempting to
parse a config file.
Logging
Logging configuration.
Instances
Show Logging Source # | |
Eq Logging Source # | |
(k ~ A_Lens, a ~ Maybe LogLoc, b ~ Maybe LogLoc) => LabelOptic "location" k Logging Logging a b Source # | |
Defined in Navi.Config.Types | |
(k ~ A_Lens, a ~ Maybe LogLevel, b ~ Maybe LogLevel) => LabelOptic "severity" k Logging Logging a b Source # | |
Defined in Navi.Config.Types |
Log location configuration.
Instances
defaultLogging :: Logging Source #
Default logging i.e. log errors and use the default path.
Note System
data NoteSystem Source #
Configuration for notification systems.
DBus | For use with a running notification server that receives messages via DBus. |
NotifySend | For use with the notify-send tool. |
Instances
Show NoteSystem Source # | |
Defined in Navi.Config.Types | |
Eq NoteSystem Source # | |
Defined in Navi.Config.Types (==) :: NoteSystem -> NoteSystem -> Bool Source # (/=) :: NoteSystem -> NoteSystem -> Bool Source # |
_DBus :: Prism' NoteSystem () Source #
_NotifySend :: Prism' NoteSystem () Source #
defaultNoteSystem :: NoteSystem Source #
Default notification system i.e. DBus.