Copyright | (c) Dennis Gosnell 2023 |
---|---|
License | BSD3 |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module controls the Preferences dialog, which lets you set Termonad preferences at run-time.
It also exports helpful functions from Termonad.Preferences.File.
Synopsis
- tmConfigFromPreferencesFile :: IO TMConfig
- saveToPreferencesFile :: TMConfig -> IO ()
- showPreferencesDialog :: TMState -> IO ()
Documentation
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
.
saveToPreferencesFile :: TMConfig -> IO () Source #
Save the configuration to the preferences file
~/.config/termonad/termonad.yaml
showPreferencesDialog :: TMState -> IO () Source #
Show the preferences dialog.
When the user clicks on the Ok button, it copies the new settings to TMState. Then apply them to the current terminals.