Updated the config for more recent termonad

This commit is contained in:
Serĉanto de Scio 2020-01-25 23:05:25 +10:00
parent 23c2da2478
commit 561ca37b67
Signed by: sercanto
GPG key ID: A4122FF3971B6865

View file

@ -4,19 +4,36 @@
module Main where module Main where
import Termonad import Termonad
( CursorBlinkMode(CursorBlinkModeOff), Option(Set) ( CursorBlinkMode(CursorBlinkModeOff)
, ShowScrollbar(ShowScrollbarNever), TMConfig, confirmExit, cursorBlinkMode , Option(Set)
, defaultConfigOptions, defaultTMConfig, options, showMenu, showScrollbar , ShowScrollbar(ShowScrollbarNever)
, start, FontConfig, FontSize(FontSizePoints), defaultFontConfig, fontConfig , TMConfig
, fontFamily, fontSize , confirmExit
, cursorBlinkMode
, defaultConfigOptions
, defaultTMConfig
, options
, showMenu
, showScrollbar
, start
, FontConfig
, FontSize(FontSizePoints)
, defaultFontConfig
, fontConfig
, fontFamily
, fontSize
) )
import Termonad.Config.Colour import Termonad.Config.Colour
( Colour, ColourConfig, Palette(ExtendedPalette), addColourExtension ( AlphaColour
, createColourExtension, cursorBgColour, defaultColourConfig, foregroundColour , ColourConfig
, palette, sRGB24 , Palette(ExtendedPalette)
, addColourExtension
, createColour
, createColourExtension
, defaultColourConfig
, foregroundColour, palette
) )
import Termonad.Config.Vec (Vec((:*), EmptyVec), N8, unsafeFromListVec_) import Termonad.Config.Vec (Vec((:*), EmptyVec), N8)
import Data.Colour.SRGB (Colour, sRGB24)
-- This is our main 'TMConfig'. It holds all of the non-colour settings -- This is our main 'TMConfig'. It holds all of the non-colour settings
-- for Termonad. -- for Termonad.
@ -36,78 +53,78 @@ myTMConfig =
} }
-- This is our Solarized dark 'ColourConfig'. It holds all of our dark-related settings. -- This is our Solarized dark 'ColourConfig'. It holds all of our dark-related settings.
solarizedDark :: ColourConfig (Colour Double) solarizedDark :: ColourConfig (AlphaColour Double)
solarizedDark = solarizedDark =
defaultColourConfig defaultColourConfig
-- Set the default foreground colour of text of the terminal. -- Set the default foreground colour of text of the terminal.
{ foregroundColour = sRGB24 131 148 150 -- base0 { foregroundColour = Set (createColour 131 148 150) -- base0
-- Set the extended palette that has 2 Vecs of 8 Solarized pallette colours -- Set the extended palette that has 2 Vecs of 8 Solarized palette colours
, palette = ExtendedPalette solarizedDark1 solarizedDark2 , palette = ExtendedPalette solarizedDark1 solarizedDark2
} }
where where
solarizedDark1 :: Vec N8 (Colour Double) solarizedDark1 :: Vec N8 (AlphaColour Double)
solarizedDark1 = solarizedDark1 =
sRGB24 0 43 54 -- base03, background createColour 0 43 54 -- base03, background
:* sRGB24 220 50 47 -- red :* createColour 220 50 47 -- red
:* sRGB24 133 153 0 -- green :* createColour 133 153 0 -- green
:* sRGB24 181 137 0 -- yellow :* createColour 181 137 0 -- yellow
:* sRGB24 38 139 210 -- blue :* createColour 38 139 210 -- blue
:* sRGB24 211 54 130 -- magenta :* createColour 211 54 130 -- magenta
:* sRGB24 42 161 152 -- cyan :* createColour 42 161 152 -- cyan
:* sRGB24 238 232 213 -- base2 :* createColour 238 232 213 -- base2
:* EmptyVec :* EmptyVec
solarizedDark2 :: Vec N8 (Colour Double) solarizedDark2 :: Vec N8 (AlphaColour Double)
solarizedDark2 = solarizedDark2 =
sRGB24 7 54 66 -- base02, background highlights createColour 7 54 66 -- base02, background highlights
:* sRGB24 203 75 22 -- orange :* createColour 203 75 22 -- orange
:* sRGB24 88 110 117 -- base01, comments / secondary text :* createColour 88 110 117 -- base01, comments / secondary text
:* sRGB24 131 148 150 -- base0, body text / default code / primary content :* createColour 131 148 150 -- base0, body text / default code / primary content
:* sRGB24 147 161 161 -- base1, optional emphasised content :* createColour 147 161 161 -- base1, optional emphasised content
:* sRGB24 108 113 196 -- violet :* createColour 108 113 196 -- violet
:* sRGB24 101 123 131 -- base00 :* createColour 101 123 131 -- base00
:* sRGB24 253 246 227 -- base3 :* createColour 253 246 227 -- base3
:* EmptyVec :* EmptyVec
-- This is our Solarized light 'ColourConfig'. It holds all of our light-related settings. -- This is our Solarized light 'ColourConfig'. It holds all of our light-related settings.
solarizedLight :: ColourConfig (Colour Double) solarizedLight :: ColourConfig (AlphaColour Double)
solarizedLight = solarizedLight =
defaultColourConfig defaultColourConfig
-- Set the default foreground colour of text of the terminal. -- Set the default foreground colour of text of the terminal.
{ foregroundColour = sRGB24 101 123 131 -- base00 { foregroundColour = Set (createColour 101 123 131) -- base00
-- Set the extended palette that has 2 Vecs of 8 Solarized pallette colours -- Set the extended palette that has 2 Vecs of 8 Solarized palette colours
, palette = ExtendedPalette solarizedLight1 solarizedLight2 , palette = ExtendedPalette solarizedLight1 solarizedLight2
} }
where where
solarizedLight1 :: Vec N8 (Colour Double) solarizedLight1 :: Vec N8 (AlphaColour Double)
solarizedLight1 = solarizedLight1 =
sRGB24 238 232 213 -- base2, background highlights createColour 238 232 213 -- base2, background highlights
:* sRGB24 220 50 47 -- red :* createColour 220 50 47 -- red
:* sRGB24 133 153 0 -- green :* createColour 133 153 0 -- green
:* sRGB24 181 137 0 -- yellow :* createColour 181 137 0 -- yellow
:* sRGB24 38 139 210 -- blue :* createColour 38 139 210 -- blue
:* sRGB24 211 54 130 -- magenta :* createColour 211 54 130 -- magenta
:* sRGB24 42 161 152 -- cyan :* createColour 42 161 152 -- cyan
:* sRGB24 7 54 66 -- base02 :* createColour 7 54 66 -- base02
:* EmptyVec :* EmptyVec
solarizedLight2 :: Vec N8 (Colour Double) solarizedLight2 :: Vec N8 (AlphaColour Double)
solarizedLight2 = solarizedLight2 =
sRGB24 253 246 227 -- base3, background createColour 253 246 227 -- base3, background
:* sRGB24 203 75 22 -- orange :* createColour 203 75 22 -- orange
:* sRGB24 147 161 161 -- base1, comments / secondary text :* createColour 147 161 161 -- base1, comments / secondary text
:* sRGB24 101 123 131 -- base00, body text / default code / primary content :* createColour 101 123 131 -- base00, body text / default code / primary content
:* sRGB24 88 110 117 -- base01, optional emphasised content :* createColour 88 110 117 -- base01, optional emphasised content
:* sRGB24 108 113 196 -- violet :* createColour 108 113 196 -- violet
:* sRGB24 131 148 150 -- base0 :* createColour 131 148 150 -- base0
:* sRGB24 0 43 54 -- base03 :* createColour 0 43 54 -- base03
:* EmptyVec :* EmptyVec
-- This defines the font for the terminal. -- This defines the font for the terminal.
fontConf :: FontConfig fontConf :: FontConfig
fontConf = fontConf =
defaultFontConfig defaultFontConfig
{ fontFamily = "DejaVu Sans Mono" { fontFamily = "Droid Sans Mono Dotted for Powerline"
, fontSize = FontSizePoints 8 , fontSize = FontSizePoints 8
} }