| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Navi.Config.Types
Contents
Description
Provides configuration types.
Synopsis
- data Config = MkConfig {}
- data ConfigErr
- data Logging = MkLogging {}
- data LogLoc
- data FilesSizeMode
- = FilesSizeModeWarn (Bytes 'B Natural)
- | FilesSizeModeDelete (Bytes 'B Natural)
- defaultLogging :: Logging
- defaultSizeMode :: FilesSizeMode
- data NoteSystem (p :: ConfigPhase)
- = AppleScript
- | DBus (DBusF p)
- | NotifySend
- defaultNoteSystem :: NoteSystem 'ConfigPhaseToml
Config
Config holds the data from ConfigToml once it has been processed
(e.g., all user defined Events are parsed).
Constructors
| MkConfig | |
Fields
| |
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 'ConfigPhaseToml, b ~ NoteSystem 'ConfigPhaseToml) => 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.
Constructors
| FileErr SomeException | |
| TomlError TOMLError | |
| NoEvents |
Instances
| Exception ConfigErr Source # | |
Defined in Navi.Config.Types Methods toException :: ConfigErr -> SomeException # fromException :: SomeException -> Maybe ConfigErr # displayException :: ConfigErr -> String # backtraceDesired :: ConfigErr -> Bool # | |
| Show ConfigErr Source # | |
Logging
Logging configuration.
Constructors
| MkLogging | |
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 | |
| (k ~ A_Lens, a ~ Maybe FilesSizeMode, b ~ Maybe FilesSizeMode) => LabelOptic "sizeMode" k Logging Logging a b Source # | |
Defined in Navi.Config.Types | |
Log location configuration.
data FilesSizeMode Source #
Determines what to do if the log file surpasses the given size threshold.
Constructors
| FilesSizeModeWarn (Bytes 'B Natural) | Print a warning. |
| FilesSizeModeDelete (Bytes 'B Natural) | Delete the file. |
Instances
| Show FilesSizeMode Source # | |
Defined in Navi.Config.Types Methods showsPrec :: Int -> FilesSizeMode -> ShowS # show :: FilesSizeMode -> String # showList :: [FilesSizeMode] -> ShowS # | |
| Eq FilesSizeMode Source # | |
Defined in Navi.Config.Types Methods (==) :: FilesSizeMode -> FilesSizeMode -> Bool # (/=) :: FilesSizeMode -> FilesSizeMode -> Bool # | |
defaultLogging :: Logging Source #
Default logging i.e. log errors and use the default path.
defaultSizeMode :: FilesSizeMode Source #
Since: 0.1
Note System
data NoteSystem (p :: ConfigPhase) Source #
Configuration for notification systems.
Constructors
| AppleScript | For use with osx. |
| DBus (DBusF p) | For use with a running notification server that receives messages via DBus. |
| NotifySend | For use with the notify-send tool. |
Instances
| Show (NoteSystem 'ConfigPhaseToml) Source # | |
Defined in Navi.Config.Types Methods showsPrec :: Int -> NoteSystem 'ConfigPhaseToml -> ShowS # show :: NoteSystem 'ConfigPhaseToml -> String # showList :: [NoteSystem 'ConfigPhaseToml] -> ShowS # | |
| Eq (NoteSystem 'ConfigPhaseToml) Source # | |
Defined in Navi.Config.Types Methods (==) :: NoteSystem 'ConfigPhaseToml -> NoteSystem 'ConfigPhaseToml -> Bool # (/=) :: NoteSystem 'ConfigPhaseToml -> NoteSystem 'ConfigPhaseToml -> Bool # | |
defaultNoteSystem :: NoteSystem 'ConfigPhaseToml Source #
Default notification system i.e. DBus for linux, AppleScript for osx.