navi-0.1: A utility program for sending system notifications.
Safe HaskellSafe-Inferred
LanguageGHC2021

Navi.Config

Description

This modules provides functionality for parsing configuration data from a toml file.

Synopsis

Config

readConfig :: (HasCallStack, MonadFileReader m, MonadIORef m, MonadThrow m) => Path -> m Config Source #

Parses the provided toml file into a Config. Throws ConfigErr if anything goes wrong.

data ConfigErr Source #

ConfigErr represents the errors we can encounter when attempting to parse a config file.

data Config Source #

Config holds the data from ConfigToml once it has been processed (e.g., all user defined Events are parsed).

Constructors

MkConfig 

Fields

Instances

Instances details
Show Config Source # 
Instance details

Defined in Navi.Config.Types

(k ~ A_Lens, a ~ NonEmpty AnyEvent, b ~ NonEmpty AnyEvent) => LabelOptic "events" k Config Config a b Source # 
Instance details

Defined in Navi.Config.Types

(k ~ A_Lens, a ~ Logging, b ~ Logging) => LabelOptic "logging" k Config Config a b Source # 
Instance details

Defined in Navi.Config.Types

(k ~ A_Lens, a ~ NoteSystem, b ~ NoteSystem) => LabelOptic "noteSystem" k Config Config a b Source # 
Instance details

Defined in Navi.Config.Types

Logging

data Logging Source #

Logging configuration.

Constructors

MkLogging 

Fields

Instances

Instances details
Show Logging Source # 
Instance details

Defined in Navi.Config.Types

Eq Logging Source # 
Instance details

Defined in Navi.Config.Types

(k ~ A_Lens, a ~ Maybe LogLoc, b ~ Maybe LogLoc) => LabelOptic "location" k Logging Logging a b Source # 
Instance details

Defined in Navi.Config.Types

(k ~ A_Lens, a ~ Maybe LogLevel, b ~ Maybe LogLevel) => LabelOptic "severity" k Logging Logging a b Source # 
Instance details

Defined in Navi.Config.Types

data LogLoc Source #

Log location configuration.

Constructors

DefPath 
Stdout 
File !Path 

Instances

Instances details
Show LogLoc Source # 
Instance details

Defined in Navi.Config.Types

Eq LogLoc Source # 
Instance details

Defined in Navi.Config.Types

Note System

data NoteSystem Source #

Configuration for notification systems.

Constructors

DBus

For use with a running notification server that receives messages via DBus.

NotifySend

For use with the notify-send tool.

Instances

Instances details
Show NoteSystem Source # 
Instance details

Defined in Navi.Config.Types

Eq NoteSystem Source # 
Instance details

Defined in Navi.Config.Types