Skip to content

Commit 32328e3

Browse files
jmtdsimonmichael
authored andcommitted
feat: ui: Add a dark theme
I wanted a theme with roughly the same degree of colour as the default but which was easier on my eyes late at night. Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 4c15cfb commit 32328e3

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

hledger-ui/Hledger/UI/Theme.hs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,29 @@ themesList = [
103103
(attrName "list" <> attrName "selected" , defAttr & reverseVideo)
104104
])
105105

106+
,("dark", attrMap (white `on` black & dim) [
107+
(attrName "border" , white `on` black)
108+
, (attrName "border" <> attrName "bold" , currentAttr & bold)
109+
, (attrName "border" <> attrName "depth" , active)
110+
, (attrName "border" <> attrName "filename" , currentAttr)
111+
, (attrName "border" <> attrName "key" , active)
112+
, (attrName "border" <> attrName "minibuffer" , white `on` black & bold)
113+
, (attrName "border" <> attrName "query" , active)
114+
, (attrName "border" <> attrName "selected" , active)
115+
, (attrName "error" , fg red)
116+
, (attrName "help" , currentAttr & bold)
117+
, (attrName "help" <> attrName "heading" , fg blue)
118+
, (attrName "help" <> attrName "key" , active)
119+
, (attrName "list" <> attrName "amount" <> attrName "decrease" , fg red)
120+
, (attrName "list" <> attrName "amount" <> attrName "decrease" <> attrName "selected" , red `on` black & bold)
121+
, (attrName "list" <> attrName "balance" , currentAttr)
122+
, (attrName "list" <> attrName "balance" <> attrName "negative" , fg red)
123+
, (attrName "list" <> attrName "balance" <> attrName "positive" , fg white)
124+
, (attrName "list" <> attrName "balance" <> attrName "negative" <> attrName "selected" , red `on` black & bold)
125+
, (attrName "list" <> attrName "balance" <> attrName "positive" <> attrName "selected" , yellow `on` black & bold)
126+
, (attrName "list" <> attrName "selected" , yellow `on` black & bold)
127+
])
128+
106129
]
107130

108131
-- halfbrightattr = defAttr & dim

hledger-ui/hledger-ui.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ hledger\-ui provides the following options:
4949
\f[CR]\-w \-\-watch\f[R]
5050
watch for data and date changes and reload automatically
5151
.TP
52-
\f[CR]\-\-theme=default|terminal|greenterm\f[R]
52+
\f[CR]\-\-theme=default|terminal|greenterm|dark\f[R]
5353
use this custom display theme
5454
.TP
5555
\f[CR]\-\-menu\f[R]

hledger-ui/hledger-ui.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ the data.
6666
'-w --watch'
6767

6868
watch for data and date changes and reload automatically
69-
'--theme=default|terminal|greenterm'
69+
'--theme=default|terminal|greenterm|dark'
7070

7171
use this custom display theme
7272
'--menu'

hledger-ui/hledger-ui.m4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ hledger-ui provides the following options:
5757
`-w --watch`
5858
: watch for data and date changes and reload automatically
5959

60-
`--theme=default|terminal|greenterm`
60+
`--theme=default|terminal|greenterm|dark`
6161
: use this custom display theme
6262

6363
`--menu`

hledger-ui/hledger-ui.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ OPTIONS
4444
-w --watch
4545
watch for data and date changes and reload automatically
4646

47-
--theme=default|terminal|greenterm
47+
--theme=default|terminal|greenterm|dark
4848
use this custom display theme
4949

5050
--menu start in the menu screen

0 commit comments

Comments
 (0)