-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.hs
48 lines (37 loc) · 1.16 KB
/
Config.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
module Config where
import System.FilePath
mainColor :: String
mainColor = "\ESC[35m"
resetColor :: String
resetColor = "\ESC[0m"
boldColor :: String
boldColor = "\ESC[1m"
-- Required by Shell
splashText :: Maybe String
splashText = Just $ mainColor <> "Purity" <> resetColor <> " - A Lazily Evaluated Purely Functional Terminal\n"
formatDir :: FilePath -> String
formatDir "/" = "/"
formatDir x = takeBaseName x
-- Required by Shell
commandPrompt :: FilePath -> String
commandPrompt path = mconcat [ " ("
, mainColor
, "λ ", resetColor, boldColor
, formatDir path
, resetColor
, ") "
]
-- Required by Shell
codePrompt :: FilePath -> String
codePrompt _ = mainColor <> " λ " <> resetColor
-- Required by Shell
blockPrompt :: Maybe String
blockPrompt = Just "| "
-- Required by Shell
defaultImports :: [String]
defaultImports = [ "Prelude"
, "System.Directory"
]
-- Required by Shell
errorColorPrefix :: Maybe String
errorColorPrefix = Just "\ESC[38;5;161m"