| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Termonad.Term
Synopsis
- focusTerm :: Int -> TMState -> IO ()
- altNumSwitchTerm :: Int -> TMState -> IO ()
- termExitFocused :: TMState -> IO ()
- termClose :: TMNotebookTab -> TMState -> IO ()
- termExitWithConfirmation :: TMNotebookTab -> TMState -> IO ()
- termExit :: TMNotebookTab -> TMState -> IO ()
- relabelTabs :: TMState -> IO ()
- computeTabLabel :: Int -> Maybe Text -> Text
- relabelTab :: Notebook -> Label -> ScrolledWindow -> Terminal -> IO ()
- showScrollbarToPolicy :: ShowScrollbar -> PolicyType
- createScrolledWin :: TMState -> IO ScrolledWindow
- createNotebookTabLabel :: IO (Box, Label, Button)
- setShowTabs :: TMConfig -> Notebook -> IO ()
- toRGBA :: Colour Double -> IO RGBA
- cwdOfPid :: Int -> IO (Maybe Text)
- getCWDFromFocusedTab :: TMNotebook -> IO (Maybe Text)
- createAndInitVteTerm :: FontDescription -> ConfigOptions -> IO Terminal
- launchShell :: Terminal -> Maybe Text -> IO Int
- addPage :: TMState -> TMNotebookTab -> Box -> IO ()
- setFocusOn :: ApplicationWindow -> Terminal -> IO ()
- createTerm :: (TMState -> EventKey -> IO Bool) -> TMState -> IO TMTerm
- handleMousePress :: Terminal -> EventButton -> IO Bool
Documentation
termExitFocused :: TMState -> IO () Source #
termExitWithConfirmation :: TMNotebookTab -> TMState -> IO () Source #
relabelTabs :: TMState -> IO () Source #
Arguments
| :: Int | Tab number. 0 is used for the first tab, 1 for the second, etc. |
| -> Maybe Text | A possible title for a tab. If this is |
| -> Text |
Compute the text for a Label for a GTK Notebook tab.
>>>computeTabLabel 0 (Just "me@machine:~")"1. me@machine:~"
>>>computeTabLabel 5 (Just "bash process")"6. bash process"
>>>computeTabLabel 2 Nothing"3. shell"
relabelTab :: Notebook -> Label -> ScrolledWindow -> Terminal -> IO () Source #
Update the given Label for a GTK Notebook tab.
The new text for the label is determined by the computeTabLabel function.
cwdOfPid :: Int -> IO (Maybe Text) Source #
TODO: This should probably be implemented in an external package, since it is a generally useful utility.
It should also be implemented for windows and osx.
getCWDFromFocusedTab :: TMNotebook -> IO (Maybe Text) Source #
Get the current working directory from the shell in the focused tab of a notebook.
Returns Nothing if there is no focused tab of the notebook, or the
current working directory could not be detected for the shell.
createAndInitVteTerm :: FontDescription -> ConfigOptions -> IO Terminal Source #
Create the VTE Terminal, set the fonts and options
Arguments
| :: Terminal | GTK |
| -> Maybe Text | An optional path to the current working directory to start the
shell in. If |
| -> IO Int |
Starts a shell in a terminal and return a new TMTerm
Arguments
| :: TMState | |
| -> TMNotebookTab | |
| -> Box | The GTK Object holding the label we want to show for the tab of the newly created page of the notebook. |
| -> IO () |
Add a page to the notebook and switch to it.
setFocusOn :: ApplicationWindow -> Terminal -> IO () Source #
Set the keyboard focus on a vte terminal
Arguments
| :: (TMState -> EventKey -> IO Bool) | Funtion for handling key presses on the terminal. |
| -> TMState | |
| -> IO TMTerm |
Create a new TMTerm, setting it up and adding it to the GTKNotebook.
handleMousePress :: Terminal -> EventButton -> IO Bool Source #
Popup the context menu on right click