Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data TMTerm = TMTerm {}
- data TMNotebookTab = TMNotebookTab {}
- data TMNotebook = TMNotebook {}
- data TMState' = TMState {}
- type TMState = MVar TMState'
- createTMTerm :: Terminal -> Int -> Unique -> TMTerm
- newTMTerm :: Terminal -> Int -> IO TMTerm
- getFocusedTermFromState :: TMState -> IO (Maybe Terminal)
- createTMNotebookTab :: Label -> ScrolledWindow -> TMTerm -> TMNotebookTab
- createTMNotebook :: Notebook -> FocusList TMNotebookTab -> TMNotebook
- createEmptyTMNotebook :: Notebook -> TMNotebook
- notebookToList :: Notebook -> IO [Widget]
- newTMState :: TMConfig -> Application -> ApplicationWindow -> TMNotebook -> FontDescription -> IO TMState
- newEmptyTMState :: TMConfig -> Application -> ApplicationWindow -> Notebook -> FontDescription -> IO TMState
- newTMStateSingleTerm :: TMConfig -> Application -> ApplicationWindow -> Notebook -> Label -> ScrolledWindow -> Terminal -> Int -> FontDescription -> IO TMState
- traceShowMTMState :: TMState -> IO ()
- data FontSize
- defaultFontSize :: FontSize
- modFontSize :: Int -> FontSize -> FontSize
- data FontConfig = FontConfig {
- fontFamily :: !Text
- fontSize :: !FontSize
- defaultFontConfig :: FontConfig
- data Option a
- whenSet :: Monoid m => Option a -> (a -> m) -> m
- data ShowScrollbar
- data ShowTabBar
- data ConfigOptions = ConfigOptions {}
- defaultConfigOptions :: ConfigOptions
- data TMConfig = TMConfig {
- options :: !ConfigOptions
- hooks :: !ConfigHooks
- defaultTMConfig :: TMConfig
- data ConfigHooks = ConfigHooks {
- createTermHook :: TMState -> Terminal -> IO ()
- defaultConfigHooks :: ConfigHooks
- defaultCreateTermHook :: TMState -> Terminal -> IO ()
- data FocusNotSameErr
- data TabsDoNotMatch
- data TMStateInvariantErr
- invariantTMState' :: TMState' -> IO [TMStateInvariantErr]
- assertInvariantTMState :: TMState -> IO ()
- pPrintTMState :: TMState -> IO ()
Documentation
A wrapper around a VTE Terminal
. This also stores the process ID of the
process running on this terminal, as well as a Unique
that can be used for
comparing terminals.
data TMNotebookTab Source #
A container that holds everything in a given terminal window. The term
in the TMTerm
is inside the tmNotebookTabTermContainer
ScrolledWindow
.
The notebook tab Label
is also available.
TMNotebookTab | |
|
Instances
Eq TMNotebookTab Source # | |
Defined in Termonad.Types (==) :: TMNotebookTab -> TMNotebookTab -> Bool # (/=) :: TMNotebookTab -> TMNotebookTab -> Bool # | |
Show TMNotebookTab Source # | |
Defined in Termonad.Types showsPrec :: Int -> TMNotebookTab -> ShowS # show :: TMNotebookTab -> String # showList :: [TMNotebookTab] -> ShowS # |
data TMNotebook Source #
This holds the GTK Notebook
containing multiple tabs of Terminal
s. We
keep a separate list of terminals in tmNotebookTabs
.
TMNotebook | |
|
Instances
Show TMNotebook Source # | |
Defined in Termonad.Types showsPrec :: Int -> TMNotebook -> ShowS # show :: TMNotebook -> String # showList :: [TMNotebook] -> ShowS # |
createTMNotebookTab :: Label -> ScrolledWindow -> TMTerm -> TMNotebookTab Source #
newTMState :: TMConfig -> Application -> ApplicationWindow -> TMNotebook -> FontDescription -> IO TMState Source #
newEmptyTMState :: TMConfig -> Application -> ApplicationWindow -> Notebook -> FontDescription -> IO TMState Source #
newTMStateSingleTerm :: TMConfig -> Application -> ApplicationWindow -> Notebook -> Label -> ScrolledWindow -> Terminal -> Int -> FontDescription -> IO TMState Source #
traceShowMTMState :: TMState -> IO () 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.
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 |
FontSizeUnits Double | This sets the font size based on "device units". In general, this
can be thought of as one pixel. The function
|
Instances
Eq FontSize Source # | |
Show FontSize Source # | |
Generic FontSize Source # | |
ToJSON FontSize Source # | |
Defined in Termonad.Types | |
FromJSON FontSize Source # | |
type Rep FontSize Source # | |
Defined in Termonad.Types type Rep FontSize = D1 ('MetaData "FontSize" "Termonad.Types" "termonad-4.0.0.1-inplace" '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
modFontSize :: Int -> FontSize -> FontSize Source #
Modify a FontSize
by adding some value.
>>>
modFontSize 1 (FontSizePoints 13)
FontSizePoints 14>>>
modFontSize 1 (FontSizeUnits 9.0)
FontSizeUnits 10.0
You can reduce the font size by passing a negative value.
>>>
modFontSize (-2) (FontSizePoints 13)
FontSizePoints 11
If you try to create a font size less than 1, then the old font size will be used.
>>>
modFontSize (-10) (FontSizePoints 5)
FontSizePoints 5>>>
modFontSize (-1) (FontSizeUnits 1.0)
FontSizeUnits 1.0
data FontConfig Source #
Settings for the font to be used in Termonad.
FontConfig | |
|
Instances
defaultFontConfig :: FontConfig Source #
The default FontConfig
to use if not specified.
>>>
defaultFontConfig == FontConfig {fontFamily = "Monospace", fontSize = defaultFontSize}
True
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
.
Instances
Functor Option Source # | |
Foldable Option Source # | |
Defined in Termonad.Types fold :: Monoid m => Option m -> m # foldMap :: Monoid m => (a -> m) -> Option a -> m # foldMap' :: Monoid m => (a -> m) -> Option a -> m # foldr :: (a -> b -> b) -> b -> Option a -> b # foldr' :: (a -> b -> b) -> b -> Option a -> b # foldl :: (b -> a -> b) -> b -> Option a -> b # foldl' :: (b -> a -> b) -> b -> Option a -> b # foldr1 :: (a -> a -> a) -> Option a -> a # foldl1 :: (a -> a -> a) -> Option a -> a # elem :: Eq a => a -> Option a -> Bool # maximum :: Ord a => Option a -> a # minimum :: Ord a => Option a -> a # | |
Eq a => Eq (Option a) Source # | |
Ord a => Ord (Option a) Source # | |
Defined in Termonad.Types | |
Read a => Read (Option a) Source # | |
Show a => Show (Option a) Source # | |
data ShowScrollbar Source #
Whether or not to show the scroll bar in a terminal.
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
data ShowTabBar Source #
Whether or not to show the tab bar for switching tabs.
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
data ConfigOptions Source #
Configuration options for Termonad.
See defaultConfigOptions
for the default values.
ConfigOptions | |
|
Instances
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 } in defaultConfigOptions == defConfOpt :} True
The Termonad ConfigOptions
along with the ConfigHooks
.
TMConfig | |
|
defaultTMConfig :: TMConfig Source #
The default TMConfig
.
options
is defaultConfigOptions
and hooks
is defaultConfigHooks
.
data 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.
ConfigHooks | |
|
Instances
Show ConfigHooks Source # | |
Defined in Termonad.Types showsPrec :: Int -> ConfigHooks -> ShowS # show :: ConfigHooks -> String # showList :: [ConfigHooks] -> ShowS # |
defaultConfigHooks :: ConfigHooks Source #
Default values for the ConfigHooks
.
- The default function for
createTermHook
isdefaultCreateTermHook
.
defaultCreateTermHook :: TMState -> Terminal -> IO () Source #
Default value for createTermHook
. Does nothing.
data FocusNotSameErr Source #
FocusListFocusExistsButNoNotebookTabWidget | |
NotebookTabWidgetDiffersFromFocusListFocus | |
NotebookTabWidgetExistsButNoFocusListFocus |
Instances
Show FocusNotSameErr Source # | |
Defined in Termonad.Types showsPrec :: Int -> FocusNotSameErr -> ShowS # show :: FocusNotSameErr -> String # showList :: [FocusNotSameErr] -> ShowS # |
data TabsDoNotMatch Source #
TabLengthsDifferent Int Int | The first |
TabAtIndexDifferent Int | The tab at index |
Instances
Show TabsDoNotMatch Source # | |
Defined in Termonad.Types showsPrec :: Int -> TabsDoNotMatch -> ShowS # show :: TabsDoNotMatch -> String # showList :: [TabsDoNotMatch] -> ShowS # |
data TMStateInvariantErr Source #
Instances
Show TMStateInvariantErr Source # | |
Defined in Termonad.Types showsPrec :: Int -> TMStateInvariantErr -> ShowS # show :: TMStateInvariantErr -> String # showList :: [TMStateInvariantErr] -> ShowS # |
invariantTMState' :: TMState' -> IO [TMStateInvariantErr] Source #
Gather up the invariants for TMState
and return them as a list.
If no invariants have been violated, then this function should return an empty list.
assertInvariantTMState :: TMState -> IO () Source #
pPrintTMState :: TMState -> IO () Source #
Orphan instances
ToJSON CursorBlinkMode Source # | |
toJSON :: CursorBlinkMode -> Value # toEncoding :: CursorBlinkMode -> Encoding # toJSONList :: [CursorBlinkMode] -> Value # toEncodingList :: [CursorBlinkMode] -> Encoding # | |
FromJSON CursorBlinkMode Source # | |
parseJSON :: Value -> Parser CursorBlinkMode # parseJSONList :: Value -> Parser [CursorBlinkMode] # |