termonad-4.5.0.0: Terminal emulator configurable in Haskell

Copyright | (c) Dennis Gosnell 2018
License | BSD3
Stability | experimental
Portability | POSIX
Safe Haskell | None
Language | Haskell2010

Termonad.Config

Contents

- Main Config Data Type
- Fonts
- Misc

Description

This module exposes termonad's basic configuration options. To set these options in your config, first ensure you've imported Termonad.

Then for your main, apply `start` or `defaultMain` to a `TMConfig` value. We suggest you build such values by performing record updates on the `defaultTMConfig` rather than using the `TMConfig` constructor, as the latter is much more likely to break when there are changes to the `TMConfig` type.

E.g.

     -- Re-exports this module.
     import Termonad

     main :: IO ()
     main = start $ defaultTMConfig
       { showScrollbar = ShowScrollbarNever
       , confirmExit = False
       , showMenu = False
       , cursorBlinkMode = CursorBlinkModeOff
       }

Additional options can be found in the following modules.

- Termonad.Config.Colour

If you want to see an example configuration file, as well as an explanation for how to use Termonad, see the Termonad README.

Synopsis

- data TMConfig = TMConfig {
  - options :: !ConfigOptions
  - hooks :: !ConfigHooks
  }
- defaultTMConfig :: TMConfig
- data ConfigOptions = ConfigOptions {
  - fontConfig :: !FontConfig
  - showScrollbar :: !ShowScrollbar
  - scrollbackLen :: !Integer
  - confirmExit :: !Bool
  - wordCharExceptions :: !Text
  - showMenu :: !Bool
  - showTabBar :: !ShowTabBar
  - cursorBlinkMode :: !CursorBlinkMode
  - boldIsBright :: !Bool
  - enableSixel :: !Bool
  - allowBold :: !Bool
  }
- defaultConfigOptions :: ConfigOptions
- newtype ConfigHooks = ConfigHooks {
  - createTermHook :: TMState -> Terminal -> IO ()
  }
- defaultConfigHooks :: ConfigHooks
- data FontSize
  - = FontSizePoints Int
  - | FontSizeUnits Double
- defaultFontSize :: FontSize
- data FontConfig = FontConfig {
  - fontFamily :: !Text
  - fontSize :: !FontSize
  }
- defaultFontConfig :: FontConfig
- data Option a
  - = Unset
  - | Set !a
- data ShowScrollbar
  - = ShowScrollbarNever
  - | ShowScrollbarAlways
  - | ShowScrollbarIfNeeded
- data ShowTabBar
  - = ShowTabBarNever
  - | ShowTabBarAlways
  - | ShowTabBarIfNeeded
- data CursorBlinkMode
  - = CursorBlinkModeSystem
  - | CursorBlinkModeOn
  - | CursorBlinkModeOff
  - | AnotherCursorBlinkMode Int
- tmConfigFromPreferencesFile :: IO TMConfig

# Main Config Data Type

data TMConfig Source #

The Termonad `ConfigOptions` along with the `ConfigHooks`.

Constructors

TMConfig |

Fields

- options :: !ConfigOptions
- hooks :: !ConfigHooks

#### Instances

Instances details

Show TMConfig Source # |
Instance details Defined in Termonad.Types Methods showsPrec :: Int -> TMConfig -> ShowS Source # show :: TMConfig -> String Source # showList :: [TMConfig] -> ShowS Source #

defaultTMConfig :: TMConfig Source #

The default `TMConfig`.

`options` is `defaultConfigOptions` and `hooks` is `defaultConfigHooks`.

data ConfigOptions Source #

Configuration options for Termonad.

See `defaultConfigOptions` for the default values.

Constructors

ConfigOptions |

Fields

- fontConfig :: !FontConfig

  Specific options for fonts.

- showScrollbar :: !ShowScrollbar

  When to show the scroll bar.

- scrollbackLen :: !Integer

  The number of lines to keep in the scroll back history for each terminal.

- confirmExit :: !Bool

  Whether or not to ask you for confirmation when closing individual terminals or Termonad itself. It is generally safer to keep this as `True`.

- wordCharExceptions :: !Text

  When double-clicking on text in the terminal with the mouse, Termonad will use this value to determine what to highlight. The individual characters in this list will be counted as part of a word.

  For instance if `wordCharExceptions` is `""`, then when you double-click on the text `http://`, only the `http` portion will be highlighted. If `wordCharExceptions` is `":"`, then the `http:` portion will be highlighted.

- showMenu :: !Bool

  Whether or not to show the `File` `Edit` etc menu.

- showTabBar :: !ShowTabBar

  When to show the tab bar.

- cursorBlinkMode :: !CursorBlinkMode

  How to handle cursor blink.

- boldIsBright :: !Bool

  This option controls whether or not to force bold text to use colors from the `ExtendedPalatte`.

  If `True`, then colored bold text will always use colors from the `ExtendedPalatte`. There will be no way to print bold text colored with the `BasicPalatte`.

  This often isn't a big problem, since many TUI applications use bold in combination with colors from the `ExtendedPalatte`. Also, the VTE default blue color can be difficult to read with a dark background, and enabling this can work around the problem. See https://github.com/cdepillabout/termonad/issues/177 for more information.

  If `False`, then bold can be applied separately to colors from both the `BasicPalatte` and `ExtendedPalatte`.

- enableSixel :: !Bool

  Enable SIXEL to draw graphics in a terminal.

  In order for this option to do anything, you need to be using a version of VTE >= 0.63, and compile VTE with SIXEL support.

  Note that even if you do the above, there may still be some problems with SIXEL support in VTE. Follow https://gitlab.gnome.org/GNOME/vte/-/issues/253 for more information.

- allowBold :: !Bool

  Allow terminal to use bold text.

  You may want to disable this, for instance, if you use a font that doesn't look good when bold.

#### Instances

Instances details

FromJSON ConfigOptions Source # |
Instance details Defined in Termonad.Types Methods parseJSON :: Value -> Parser ConfigOptions Source # parseJSONList :: Value -> Parser [ConfigOptions] Source # omittedField :: Maybe ConfigOptions Source #
ToJSON ConfigOptions Source # |
Instance details Defined in Termonad.Types Methods toJSON :: ConfigOptions -> Value Source # toEncoding :: ConfigOptions -> Encoding Source # toJSONList :: [ConfigOptions] -> Value Source # toEncodingList :: [ConfigOptions] -> Encoding Source # omitField :: ConfigOptions -> Bool Source #
Generic ConfigOptions Source # |

Instance details

Defined in Termonad.Types

Associated Types

type Rep ConfigOptions |

Instance details

Defined in Termonad.Types

type Rep ConfigOptions = D1 ('MetaData "ConfigOptions" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "ConfigOptions" 'PrefixI 'True) (((S1 ('MetaSel ('Just "fontConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FontConfig) :*: S1 ('MetaSel ('Just "showScrollbar") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShowScrollbar)) :*: (S1 ('MetaSel ('Just "scrollbackLen") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer) :*: (S1 ('MetaSel ('Just "confirmExit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "wordCharExceptions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) :*: ((S1 ('MetaSel ('Just "showMenu") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "showTabBar") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShowTabBar) :*: S1 ('MetaSel ('Just "cursorBlinkMode") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CursorBlinkMode))) :*: (S1 ('MetaSel ('Just "boldIsBright") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "enableSixel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "allowBold") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))))))

Methods

from :: ConfigOptions -> Rep ConfigOptions x Source #

to :: Rep ConfigOptions x -> ConfigOptions Source #

Show ConfigOptions Source # |
Instance details Defined in Termonad.Types Methods showsPrec :: Int -> ConfigOptions -> ShowS Source # show :: ConfigOptions -> String Source # showList :: [ConfigOptions] -> ShowS Source #
Eq ConfigOptions Source # |
Instance details Defined in Termonad.Types Methods (==) :: ConfigOptions -> ConfigOptions -> Bool Source # (/=) :: ConfigOptions -> ConfigOptions -> Bool Source #
type Rep ConfigOptions Source # |

Instance details

Defined in Termonad.Types

type Rep ConfigOptions = D1 ('MetaData "ConfigOptions" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "ConfigOptions" 'PrefixI 'True) (((S1 ('MetaSel ('Just "fontConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FontConfig) :*: S1 ('MetaSel ('Just "showScrollbar") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShowScrollbar)) :*: (S1 ('MetaSel ('Just "scrollbackLen") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer) :*: (S1 ('MetaSel ('Just "confirmExit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "wordCharExceptions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) :*: ((S1 ('MetaSel ('Just "showMenu") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "showTabBar") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShowTabBar) :*: S1 ('MetaSel ('Just "cursorBlinkMode") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CursorBlinkMode))) :*: (S1 ('MetaSel ('Just "boldIsBright") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "enableSixel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "allowBold") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))))))

defaultConfigOptions :: ConfigOptions Source #

The default `ConfigOptions`.

    >>> :{
      let defConfOpt =
            ConfigOptions
              { fontConfig = defaultFontConfig
              , showScrollbar = ShowScrollbarIfNeeded
              , scrollbackLen = 10000
              , confirmExit = True
              , wordCharExceptions = "-#%&+,./=?@\\_~\183:"
              , showMenu = True
              , showTabBar = ShowTabBarIfNeeded
              , cursorBlinkMode = CursorBlinkModeOn
              , boldIsBright = False
              , enableSixel = False
              , allowBold = True
              }
      in defaultConfigOptions == defConfOpt
    :}
    True

newtype ConfigHooks Source #

Hooks into certain termonad operations and VTE events. Used to modify termonad's behaviour in order to implement new functionality. Fields should have sane `Semigroup` and `Monoid` instances so that config extensions can be combined uniformly and new hooks can be added without incident.

Constructors

ConfigHooks |

Fields

- createTermHook :: TMState -> Terminal -> IO ()

  Produce an IO action to run on creation of new `Terminal`, given `TMState` and the `Terminal` in question.

#### Instances

Instances details

Show ConfigHooks Source # |
Instance details Defined in Termonad.Types Methods showsPrec :: Int -> ConfigHooks -> ShowS Source # show :: ConfigHooks -> String Source # showList :: [ConfigHooks] -> ShowS Source #

defaultConfigHooks :: ConfigHooks Source #

Default values for the `ConfigHooks`.

- The default function for `createTermHook` is `defaultCreateTermHook`.

# Fonts

data FontSize Source #

The font size for the Termonad terminal. There are two ways to set the fontsize, corresponding to the two different ways to set the font size in the Pango font rendering library.

If you're not sure which to use, try `FontSizePoints` first and see how it looks. It should generally correspond to font sizes you are used to from other applications.

Constructors

FontSizePoints Int | This sets the font size based on "points". The conversion between a point and an actual size depends on the system configuration and the output device. The function `fontDescriptionSetSize` is used to set the font size. See the documentation for that function for more info.
FontSizeUnits Double | This sets the font size based on "device units". In general, this can be thought of as one pixel. The function `fontDescriptionSetAbsoluteSize` is used to set the font size. See the documentation for that function for more info.

#### Instances

Instances details

FromJSON FontSize Source # |
Instance details Defined in Termonad.Types Methods parseJSON :: Value -> Parser FontSize Source # parseJSONList :: Value -> Parser [FontSize] Source # omittedField :: Maybe FontSize Source #
ToJSON FontSize Source # |
Instance details Defined in Termonad.Types Methods toJSON :: FontSize -> Value Source # toEncoding :: FontSize -> Encoding Source # toJSONList :: [FontSize] -> Value Source # toEncodingList :: [FontSize] -> Encoding Source # omitField :: FontSize -> Bool Source #
Generic FontSize Source # |

Instance details

Defined in Termonad.Types

Associated Types

type Rep FontSize |

Instance details

Defined in Termonad.Types

type Rep FontSize = D1 ('MetaData "FontSize" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "FontSizePoints" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "FontSizeUnits" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))

Methods

from :: FontSize -> Rep FontSize x Source #

to :: Rep FontSize x -> FontSize Source #

Show FontSize Source # |
Instance details Defined in Termonad.Types Methods showsPrec :: Int -> FontSize -> ShowS Source # show :: FontSize -> String Source # showList :: [FontSize] -> ShowS Source #
Eq FontSize Source # |
Instance details Defined in Termonad.Types Methods (==) :: FontSize -> FontSize -> Bool Source # (/=) :: FontSize -> FontSize -> Bool Source #
type Rep FontSize Source # |

Instance details

Defined in Termonad.Types

type Rep FontSize = D1 ('MetaData "FontSize" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "FontSizePoints" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "FontSizeUnits" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))

defaultFontSize :: FontSize Source #

The default `FontSize` used if not specified.

    >>> defaultFontSize
    FontSizePoints 12

data FontConfig Source #

Settings for the font to be used in Termonad.

Constructors

FontConfig |

Fields

- fontFamily :: !Text

  The font family to use. Example: `"DejaVu Sans Mono"` or `"Source Code Pro"`

- fontSize :: !FontSize

  The font size.

#### Instances

Instances details

FromJSON FontConfig Source # |
Instance details Defined in Termonad.Types Methods parseJSON :: Value -> Parser FontConfig Source # parseJSONList :: Value -> Parser [FontConfig] Source # omittedField :: Maybe FontConfig Source #
ToJSON FontConfig Source # |
Instance details Defined in Termonad.Types Methods toJSON :: FontConfig -> Value Source # toEncoding :: FontConfig -> Encoding Source # toJSONList :: [FontConfig] -> Value Source # toEncodingList :: [FontConfig] -> Encoding Source # omitField :: FontConfig -> Bool Source #
Generic FontConfig Source # |

Instance details

Defined in Termonad.Types

Associated Types

type Rep FontConfig |

Instance details

Defined in Termonad.Types

type Rep FontConfig = D1 ('MetaData "FontConfig" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "FontConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "fontFamily") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "fontSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FontSize)))

Methods

from :: FontConfig -> Rep FontConfig x Source #

to :: Rep FontConfig x -> FontConfig Source #

Show FontConfig Source # |
Instance details Defined in Termonad.Types Methods showsPrec :: Int -> FontConfig -> ShowS Source # show :: FontConfig -> String Source # showList :: [FontConfig] -> ShowS Source #
Eq FontConfig Source # |
Instance details Defined in Termonad.Types Methods (==) :: FontConfig -> FontConfig -> Bool Source # (/=) :: FontConfig -> FontConfig -> Bool Source #
type Rep FontConfig Source # |

Instance details

Defined in Termonad.Types

type Rep FontConfig = D1 ('MetaData "FontConfig" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "FontConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "fontFamily") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "fontSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FontSize)))

defaultFontConfig :: FontConfig Source #

The default `FontConfig` to use if not specified.

    >>> defaultFontConfig == FontConfig {fontFamily = "Monospace", fontSize = defaultFontSize}
    True

# Misc

data Option a Source #

This data type represents an option that can either be `Set` or `Unset`.

This data type is used in situations where leaving an option unset results in a special state that is not representable by setting any specific value.

Examples of this include the `cursorFgColour` and `cursorBgColour` options supplied by the `ColourConfig` `ConfigExtension`. By default, `cursorFgColour` and `cursorBgColour` are both `Unset`. However, when `cursorBgColour` is `Set`, `cursorFgColour` defaults to the color of the text underneath. There is no way to represent this by setting `cursorFgColour`.

Constructors

Unset |
Set !a |

#### Instances

Instances details

Functor Option Source # |
Instance details Defined in Termonad.Types Methods fmap :: (a -> b) -> Option a -> Option b Source # (<$) :: a -> Option b -> Option a Source #
Foldable Option Source # |

Instance details

Defined in Termonad.Types

Methods

fold :: Monoid m => Option m -> m Source #

foldMap :: Monoid m => (a -> m) -> Option a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Option a -> m Source #

foldr :: (a -> b -> b) -> b -> Option a -> b Source #

foldr' :: (a -> b -> b) -> b -> Option a -> b Source #

foldl :: (b -> a -> b) -> b -> Option a -> b Source #

foldl' :: (b -> a -> b) -> b -> Option a -> b Source #

foldr1 :: (a -> a -> a) -> Option a -> a Source #

foldl1 :: (a -> a -> a) -> Option a -> a Source #

toList :: Option a -> [a] Source #

null :: Option a -> Bool Source #

length :: Option a -> Int Source #

elem :: Eq a => a -> Option a -> Bool Source #

maximum :: Ord a => Option a -> a Source #

minimum :: Ord a => Option a -> a Source #

sum :: Num a => Option a -> a Source #

product :: Num a => Option a -> a Source #

Read a => Read (Option a) Source # |
Instance details Defined in Termonad.Types Methods readsPrec :: Int -> ReadS (Option a) Source # readList :: ReadS [Option a] Source # readPrec :: ReadPrec (Option a) Source # readListPrec :: ReadPrec [Option a] Source #
Show a => Show (Option a) Source # |
Instance details Defined in Termonad.Types Methods showsPrec :: Int -> Option a -> ShowS Source # show :: Option a -> String Source # showList :: [Option a] -> ShowS Source #
Eq a => Eq (Option a) Source # |
Instance details Defined in Termonad.Types Methods (==) :: Option a -> Option a -> Bool Source # (/=) :: Option a -> Option a -> Bool Source #
Ord a => Ord (Option a) Source # |
Instance details Defined in Termonad.Types Methods compare :: Option a -> Option a -> Ordering Source # (<) :: Option a -> Option a -> Bool Source # (<=) :: Option a -> Option a -> Bool Source # (>) :: Option a -> Option a -> Bool Source # (>=) :: Option a -> Option a -> Bool Source # max :: Option a -> Option a -> Option a Source # min :: Option a -> Option a -> Option a Source #

data ShowScrollbar Source #

Whether or not to show the scroll bar in a terminal.

Constructors

ShowScrollbarNever | Never show the scroll bar, even if there are too many lines on the terminal to show all at once. You should still be able to scroll with the mouse wheel.
ShowScrollbarAlways | Always show the scrollbar, even if it is not needed.
ShowScrollbarIfNeeded | Only show the scrollbar if there are too many lines on the terminal to show all at once.

#### Instances

Instances details

FromJSON ShowScrollbar Source # |
Instance details Defined in Termonad.Types Methods parseJSON :: Value -> Parser ShowScrollbar Source # parseJSONList :: Value -> Parser [ShowScrollbar] Source # omittedField :: Maybe ShowScrollbar Source #
ToJSON ShowScrollbar Source # |
Instance details Defined in Termonad.Types Methods toJSON :: ShowScrollbar -> Value Source # toEncoding :: ShowScrollbar -> Encoding Source # toJSONList :: [ShowScrollbar] -> Value Source # toEncodingList :: [ShowScrollbar] -> Encoding Source # omitField :: ShowScrollbar -> Bool Source #
Enum ShowScrollbar Source # |

Instance details

Defined in Termonad.Types

Methods

succ :: ShowScrollbar -> ShowScrollbar Source #

pred :: ShowScrollbar -> ShowScrollbar Source #

toEnum :: Int -> ShowScrollbar Source #

fromEnum :: ShowScrollbar -> Int Source #

enumFrom :: ShowScrollbar -> [ShowScrollbar] Source #

enumFromThen :: ShowScrollbar -> ShowScrollbar -> [ShowScrollbar] Source #

enumFromTo :: ShowScrollbar -> ShowScrollbar -> [ShowScrollbar] Source #

enumFromThenTo :: ShowScrollbar -> ShowScrollbar -> ShowScrollbar -> [ShowScrollbar] Source #

Generic ShowScrollbar Source # |

Instance details

Defined in Termonad.Types

Associated Types

type Rep ShowScrollbar |
Instance details Defined in Termonad.Types type Rep ShowScrollbar = D1 ('MetaData "ShowScrollbar" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "ShowScrollbarNever" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ShowScrollbarAlways" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ShowScrollbarIfNeeded" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: ShowScrollbar -> Rep ShowScrollbar x Source #

to :: Rep ShowScrollbar x -> ShowScrollbar Source #

Show ShowScrollbar Source # |
Instance details Defined in Termonad.Types Methods showsPrec :: Int -> ShowScrollbar -> ShowS Source # show :: ShowScrollbar -> String Source # showList :: [ShowScrollbar] -> ShowS Source #
Eq ShowScrollbar Source # |
Instance details Defined in Termonad.Types Methods (==) :: ShowScrollbar -> ShowScrollbar -> Bool Source # (/=) :: ShowScrollbar -> ShowScrollbar -> Bool Source #
type Rep ShowScrollbar Source # |
Instance details Defined in Termonad.Types type Rep ShowScrollbar = D1 ('MetaData "ShowScrollbar" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "ShowScrollbarNever" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ShowScrollbarAlways" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ShowScrollbarIfNeeded" 'PrefixI 'False) (U1 :: Type -> Type)))

data ShowTabBar Source #

Whether or not to show the tab bar for switching tabs.

Constructors

ShowTabBarNever | Never show the tab bar, even if there are multiple tabs open. This may be confusing if you plan on using multiple tabs.
ShowTabBarAlways | Always show the tab bar, even if you only have one tab open.
ShowTabBarIfNeeded | Only show the tab bar if you have multiple tabs open.

#### Instances

Instances details

FromJSON ShowTabBar Source # |
Instance details Defined in Termonad.Types Methods parseJSON :: Value -> Parser ShowTabBar Source # parseJSONList :: Value -> Parser [ShowTabBar] Source # omittedField :: Maybe ShowTabBar Source #
ToJSON ShowTabBar Source # |
Instance details Defined in Termonad.Types Methods toJSON :: ShowTabBar -> Value Source # toEncoding :: ShowTabBar -> Encoding Source # toJSONList :: [ShowTabBar] -> Value Source # toEncodingList :: [ShowTabBar] -> Encoding Source # omitField :: ShowTabBar -> Bool Source #
Enum ShowTabBar Source # |

Instance details

Defined in Termonad.Types

Methods

succ :: ShowTabBar -> ShowTabBar Source #

pred :: ShowTabBar -> ShowTabBar Source #

toEnum :: Int -> ShowTabBar Source #

fromEnum :: ShowTabBar -> Int Source #

enumFrom :: ShowTabBar -> [ShowTabBar] Source #

enumFromThen :: ShowTabBar -> ShowTabBar -> [ShowTabBar] Source #

enumFromTo :: ShowTabBar -> ShowTabBar -> [ShowTabBar] Source #

enumFromThenTo :: ShowTabBar -> ShowTabBar -> ShowTabBar -> [ShowTabBar] Source #

Generic ShowTabBar Source # |

Instance details

Defined in Termonad.Types

Associated Types

type Rep ShowTabBar |
Instance details Defined in Termonad.Types type Rep ShowTabBar = D1 ('MetaData "ShowTabBar" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "ShowTabBarNever" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ShowTabBarAlways" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ShowTabBarIfNeeded" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: ShowTabBar -> Rep ShowTabBar x Source #

to :: Rep ShowTabBar x -> ShowTabBar Source #

Show ShowTabBar Source # |
Instance details Defined in Termonad.Types Methods showsPrec :: Int -> ShowTabBar -> ShowS Source # show :: ShowTabBar -> String Source # showList :: [ShowTabBar] -> ShowS Source #
Eq ShowTabBar Source # |
Instance details Defined in Termonad.Types Methods (==) :: ShowTabBar -> ShowTabBar -> Bool Source # (/=) :: ShowTabBar -> ShowTabBar -> Bool Source #
type Rep ShowTabBar Source # |
Instance details Defined in Termonad.Types type Rep ShowTabBar = D1 ('MetaData "ShowTabBar" "Termonad.Types" "termonad-4.5.0.0-7uU3irOtqdH6C5UVGNCsC8" 'False) (C1 ('MetaCons "ShowTabBarNever" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ShowTabBarAlways" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ShowTabBarIfNeeded" 'PrefixI 'False) (U1 :: Type -> Type)))

data CursorBlinkMode Source #

An enumerated type which can be used to indicate the cursor blink mode for the terminal.

Constructors

CursorBlinkModeSystem | Follow GTK+ settings for cursor blinking.
CursorBlinkModeOn | Cursor blinks.
CursorBlinkModeOff | Cursor does not blink.
AnotherCursorBlinkMode Int | Catch-all for unknown values

#### Instances

Instances details

FromJSON CursorBlinkMode Source # |
Instance details Defined in Termonad.Types Methods parseJSON :: Value -> Parser CursorBlinkMode Source # parseJSONList :: Value -> Parser [CursorBlinkMode] Source # omittedField :: Maybe CursorBlinkMode Source #
ToJSON CursorBlinkMode Source # |
Instance details Defined in Termonad.Types Methods toJSON :: CursorBlinkMode -> Value Source # toEncoding :: CursorBlinkMode -> Encoding Source # toJSONList :: [CursorBlinkMode] -> Value Source # toEncodingList :: [CursorBlinkMode] -> Encoding Source # omitField :: CursorBlinkMode -> Bool Source #
Enum CursorBlinkMode |

Instance details

Defined in GI.Vte.Enums

Methods

succ :: CursorBlinkMode -> CursorBlinkMode Source #

pred :: CursorBlinkMode -> CursorBlinkMode Source #

toEnum :: Int -> CursorBlinkMode Source #

fromEnum :: CursorBlinkMode -> Int Source #

enumFrom :: CursorBlinkMode -> [CursorBlinkMode] Source #

enumFromThen :: CursorBlinkMode -> CursorBlinkMode -> [CursorBlinkMode] Source #

enumFromTo :: CursorBlinkMode -> CursorBlinkMode -> [CursorBlinkMode] Source #

enumFromThenTo :: CursorBlinkMode -> CursorBlinkMode -> CursorBlinkMode -> [CursorBlinkMode] Source #

Show CursorBlinkMode |
Instance details Defined in GI.Vte.Enums Methods showsPrec :: Int -> CursorBlinkMode -> ShowS Source # show :: CursorBlinkMode -> String Source # showList :: [CursorBlinkMode] -> ShowS Source #
Eq CursorBlinkMode |
Instance details Defined in GI.Vte.Enums Methods (==) :: CursorBlinkMode -> CursorBlinkMode -> Bool Source # (/=) :: CursorBlinkMode -> CursorBlinkMode -> Bool Source #
Ord CursorBlinkMode |

Instance details

Defined in GI.Vte.Enums

Methods

compare :: CursorBlinkMode -> CursorBlinkMode -> Ordering Source #

(<) :: CursorBlinkMode -> CursorBlinkMode -> Bool Source #

(<=) :: CursorBlinkMode -> CursorBlinkMode -> Bool Source #

(>) :: CursorBlinkMode -> CursorBlinkMode -> Bool Source #

(>=) :: CursorBlinkMode -> CursorBlinkMode -> Bool Source #

max :: CursorBlinkMode -> CursorBlinkMode -> CursorBlinkMode Source #

min :: CursorBlinkMode -> CursorBlinkMode -> CursorBlinkMode Source #

BoxedEnum CursorBlinkMode |
Instance details Defined in GI.Vte.Enums
TypedObject CursorBlinkMode |
Instance details Defined in GI.Vte.Enums Methods glibType :: IO GType Source #
HasParentTypes CursorBlinkMode |
Instance details Defined in GI.Vte.Enums
type ParentTypes CursorBlinkMode |
Instance details Defined in GI.Vte.Enums type ParentTypes CursorBlinkMode = '[] :: [Type]

tmConfigFromPreferencesFile :: IO TMConfig Source #

Read the configuration for the preferences file `~/.config/termonad/termonad.yaml`. This file stores only the `options` of `TMConfig` so `hooks` are initialized with `defaultConfigHooks`. If the file doesn't exist, create it with the default values.

Any options that do not exist will get initialized with values from `defaultConfigOptions`.