Skip to content

Instantly share code, notes, and snippets.

@mimi1vx
Created Oct 18, 2019
Embed
What would you like to do?
my termonad config
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Termonad
( CursorBlinkMode(CursorBlinkModeOn)
, FontConfig
, FontSize(FontSizePoints)
, Option(Set)
, ShowScrollbar(ShowScrollbarAlways)
, TMConfig
, confirmExit
, cursorBlinkMode
, defaultConfigOptions
, defaultFontConfig
, defaultTMConfig
, fontConfig
, fontFamily
, fontSize
, options
, showMenu
, showScrollbar
, start
, start
)
import Termonad.Config.Colour
( AlphaColour
, ColourConfig
, Palette(ExtendedPalette)
, addColourExtension
, backgroundColour
, createColour
, createColourExtension
, defaultColourConfig
, foregroundColour
, palette
)
import Termonad.Config.Vec (N8, Vec((:*), EmptyVec))
monokaiDark :: ColourConfig (AlphaColour Double)
monokaiDark =
defaultColourConfig
{ foregroundColour = Set (createColour 248 248 242)
, backgroundColour = Set (createColour 39 40 34)
, palette = ExtendedPalette monokaiDark1 monokaiDark2
}
where
monokaiDark1 :: Vec N8 (AlphaColour Double)
monokaiDark1 =
createColour 117 113 94 :*
createColour 249 38 114 :*
createColour 166 226 46 :*
createColour 244 191 117 :*
createColour 102 217 239 :*
createColour 174 129 255 :*
createColour 42 161 152 :*
createColour 249 248 245 :*
EmptyVec
monokaiDark2 :: Vec N8 (AlphaColour Double)
monokaiDark2 =
createColour 39 40 34 :*
createColour 249 38 114 :*
createColour 166 226 46 :*
createColour 244 191 117 :*
createColour 102 217 239 :*
createColour 174 129 255 :*
createColour 42 161 152 :*
createColour 248 248 242 :*
EmptyVec
molokai :: ColourConfig (AlphaColour Double)
molokai =
defaultColourConfig
{ foregroundColour = Set (createColour 187 187 187)
, backgroundColour = Set (createColour 27 29 30)
, palette = ExtendedPalette molokai1 molokai2
}
where
molokai1 :: Vec N8 (AlphaColour Double)
molokai1 =
createColour 27 29 30 :*
createColour 115 37 250 :*
createColour 35 226 152 :*
createColour 96 212 223 :*
createColour 208 128 16 :*
createColour 255 0 135 :*
createColour 208 168 67 :*
createColour 187 187 187 :*
EmptyVec
molokai2 :: Vec N8 (AlphaColour Double)
molokai2 =
createColour 85 85 85 :*
createColour 157 102 246 :*
createColour 95 224 177 :*
createColour 109 242 255 :*
createColour 255 175 0 :*
createColour 255 135 175 :*
createColour 255 206 81 :*
createColour 255 255 255 :*
EmptyVec
fontConf :: FontConfig
fontConf =
defaultFontConfig
{fontFamily = "Source Code Pro", fontSize = FontSizePoints 11}
myTMConfig :: TMConfig
myTMConfig =
defaultTMConfig
{ options =
defaultConfigOptions
{ showScrollbar = ShowScrollbarAlways
, confirmExit = False
, showMenu = False
, fontConfig = fontConf
, cursorBlinkMode = CursorBlinkModeOn
}
}
main :: IO ()
main = do
myColourExt <- createColourExtension molokai -- monokaiDark
let newTMConfig = addColourExtension myTMConfig myColourExt
start newTMConfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment