From 4ac554f0375d02aa690154a8f31403d136964690 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Wed, 5 Dec 2018 09:11:41 +1000 Subject: [PATCH] Initial commit --- .config/termonad/termonad.hs | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .config/termonad/termonad.hs diff --git a/.config/termonad/termonad.hs b/.config/termonad/termonad.hs new file mode 100644 index 0000000..a2a033a --- /dev/null +++ b/.config/termonad/termonad.hs @@ -0,0 +1,71 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | This is my configuration file for the Termonad terminal emulator. + +module Main where + +import Data.Colour.SRGB (Colour, sRGB24) +-- import Data.Colour (withOpacity) +import Termonad.App (defaultMain) +import Termonad.Config + ( FontConfig, FontSize(FontSizePoints), Option(Set) + , ShowScrollbar(ShowScrollbarNever), defaultFontConfig, defaultTMConfig + , fontConfig, fontFamily, fontSize, showScrollbar, showMenu + ) +import Termonad.Config.Colour +import Termonad.Config.Vec (Vec, VecT((:+), EmptyV), N8) +import Termonad.Config.Extension ((<+>)) + +-- | This sets the color of the cursor in the terminal. +-- +-- This uses the "Data.Colour" module to define a dark-red color. +-- There are many default colors defined in "Data.Colour.Names". +cursBgColor :: Colour Double +cursBgColor = sRGB24 204 0 0 + +-- | This sets the colors used for the terminal. We only specify the background +-- color of the cursor. +colConf :: ColourConfig (Colour Double) +colConf = + defaultColourConfig + { cursorBgColour = Set cursBgColor -- `withOpacity` 0.7 + , palette = BasicPalette mySolarizedColours + } where + mySolarizedColours :: Vec N8 (Colour Double) + mySolarizedColours + = sRGB24 0 43 54 -- base03, background + :+ sRGB24 220 50 47 -- red + :+ sRGB24 7 54 66 -- base02 + :+ sRGB24 203 75 22 -- orange + :+ sRGB24 38 139 210 -- blue + :+ sRGB24 211 54 130 -- magenta + :+ sRGB24 42 161 152 -- cyan + :+ sRGB24 211 54 130 -- magenta + -- :+ sRGB24 211 54 130 -- magenta + -- :+ sRGB24 211 54 130 -- magenta + -- :+ sRGB24 211 54 130 -- magenta + -- :+ sRGB24 211 54 130 -- magenta + -- :+ sRGB24 211 54 130 -- magenta + -- :+ sRGB24 211 54 130 -- magenta + -- :+ sRGB24 211 54 130 -- magenta + -- :+ sRGB24 211 54 130 -- magenta + :+ EmptyV + +-- | This defines the font for the terminal. +fontConf :: FontConfig +fontConf = + defaultFontConfig + { fontFamily = "DejaVu Sans Mono" + , fontSize = FontSizePoints 8 + } + +main :: IO () +main = do + let termonadConf = + defaultTMConfig + { fontConfig = fontConf + -- Make sure the scrollbar is never visible. + , showScrollbar = ShowScrollbarNever + , showMenu = False + } <+> colConf + defaultMain termonadConf