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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# Example calcli configuration.
#
# Copy to your config directory to customize defaults:
# $XDG_CONFIG_HOME/calcli/config.toml (or ~/.config/calcli/config.toml)
#
# Every key is optional; omitted keys keep the built-in default shown below.
# Merging is per key, not per section: setting one colour leaves the rest alone.
#
# A config.toml written for calcli 0.2 (a flat `[theme]` table and a top-level
# `glyphs`) still loads; its colours are mapped onto the sections below. The 0.2
# shape is deprecated but supported, with one exception: `history_zebra` was
# removed, and an unknown key is an error rather than a shrug. Delete that one
# line and the rest of the file loads as it always did.
## Calculation and display ####################################################
# Default notation: "decimal", "scientific" or "siprefixed".
= "decimal"
# Fractional digits in decimal and scientific notation.
= 3
# Default angle mode for trig functions: "rad" or "deg".
= "rad"
# Decimal mark used for display and accepted on input: "." or ",".
# (The other of . / , is always accepted as a thousands separator on input.)
= "."
# Thousands group separator used for display (a space by default; "" disables).
= " "
# Drop trailing fractional zeros on display (12 instead of 12.000, 1.5 k instead
# of 1.500 k). `decimals` still caps the precision. Toggle at runtime with F6.
= true
# Maximum number of history lines kept.
= 500
# On startup, restore the last session's settings (true) or always start from
# the defaults above (false). Variables and history are restored either way.
= true
## Behaviour ##################################################################
# Show a live result preview / validity warning on the input border as you type.
= true
# Ask before deleting a history line, clearing the history or resetting the
# variables.
= true
# Ask before the soft quit (`q` outside the input, or the `:q` command).
# The hard `Ctrl+Q` chord always exits at once and never asks.
= false
## The history list ###########################################################
# Blank lines inserted after each history entry's result.
= 1
# Draw a separator line in the gap between history entries (needs spacing >= 1).
# These rules replaced the alternating background tint of calcli 0.2; a leftover
# `history_zebra` key in this file is now a startup error, so delete the line.
= true
# Max height (in text lines) the input field grows to as a long expression wraps.
= 5
## Appearance #################################################################
[]
# The theme: "calcli" (the default), "default", "monochrome", or any theme you
# define under [themes.<name>] below. Cycle it at runtime in the Settings view.
= "calcli"
# Glyph set: "unicode" or "ascii".
= "unicode"
# Per-colour overrides on top of the selected theme. The names are the palette's
# own; anything else is ignored with a warning. Values are "#rrggbb", "#rgb",
# "rgb(r, g, b)" or a colour name.
#
# accent accent_dim accent_vivid
# foreground foreground_dim foreground_muted
# background header footer panel surface
# selection cursor input_bg input_bg_active border border_focus
# success warning error info
[]
# The block cursor in the input field, deliberately distinct from the accent.
= "#d65c5c"
# The input field's resting and focused fills. Left to itself the toolkit derives
# these by lightening `surface`, which overshoots on calcli's near-black surface.
# At rest the field recedes into the content; focused it lifts clearly above it,
# but stays below its own border.
= "#100e15"
= "#262336"
# The frame around the input box. `border_focus` is what it draws while the
# field has the keyboard; left out it follows `border`, and overriding `border`
# alone drags it along, so the focused frame never sinks into its own border.
# The `calcli` theme sets both, so neither needs an override here.
#
# border = "#3e3e3e"
# border_focus = "#4a7c60"
# The tint behind the selected history entry and the selected list row. Derived
# by mixing a third of the accent into `surface`, which shouts on calcli's dark
# surface; this keeps the accent hue at the weight of the focused input field.
= "#354440"
## Syntax highlighting ########################################################
# Token colours for the expression (input, history and in-place editing).
# Operators are always rendered bold, parentheses dim, `ans` underlined and
# comments italic; these set the colour only.
[]
= "#78c2b3"
= "#7c94ff"
= "#fe7057"
= "#e5cb49"
= "#b27cde"
= "#7dcfff"
= "#67c1e5"
= "#ff79c6"
## Custom themes ##############################################################
# Define your own theme and select it with `[appearance].theme`. Only `accent`,
# `foreground` and `background` are required; the neutrals are derived from the
# background unless you set them.
#
# [themes.solarized]
# accent = "#268bd2"
# foreground = "#839496"
# background = "#002b36"
# header = "#00212b"
# footer = "#00212b"
# surface = "#073642"
# border = "#0a4a5a"
# border_focus = "#1d7f96" # omit it and it is derived from `border`
#
# A theme may set: accent, foreground, background, header, footer, panel,
# surface, border, border_focus, success, warning, error, info. Anything else
# (cursor, selection, the input fills, …) is derived by the toolkit and belongs
# in [appearance.colors]; naming it here is reported and ignored.
## Key bindings ###############################################################
# Rebind any action. A value is one key or a list of keys. Modifiers are
# `ctrl+`, `alt+` and `shift+`. On a character, shift is carried by the case
# (`D` is Shift+D) and `shift+` is ignored; on any other key it is part of the
# chord, so `shift+left` and `left` are two different keys. Function keys are
# `f1`..`f12`; named keys are `enter`, `esc`, `tab`, `backtab`, `space`,
# `backspace`, `insert`, `del`, `home`, `end`, `pgup`, `pgdn` and the arrows.
#
# `ctrl+q` is not bindable: it is the toolkit's unconditional escape hatch, and
# `f1` toggles the shortcut hints. Both are shown in the footer's Global group.
#
# A key already claimed by an earlier action in an overlapping context is
# ignored with a warning, so a shadowed binding never fails silently.
#
# [keys]
# # Views (the Calc view is a text field, so bare digits stay typeable)
# view_calc = "alt+1"
# view_variables = ["alt+2", "f4"]
# view_settings = "alt+3"
#
# # Settings, reachable from every view
# notation = "f2"
# angle_mode = "f3"
# decimal_separator = "f5"
# trim_zeros = "f6"
#
# # Global
# help = ["f12", "?"]
# quit = "q"
# copy_result = "ctrl+y"
# search_history = "ctrl+r"
# palette = "ctrl+p"
#
# # The input field
# submit = "enter"
# enter_history = ["up", "pgup"]
# clear_input = "esc"
#
# # Editing a history line in place
# apply_edit = "enter"
# cancel_edit = "esc"
#
# # Any list (history, variables, settings)
# up = "up"
# down = "down"
# page_up = "pgup"
# page_down = "pgdn"
# top = "home"
# bottom = "end"
# copy = "y"
# copy_displayed = "Y"
# back = "esc"
#
# # The history list
# edit = ["enter", "e"]
# insert_below = "o"
# insert_above = "O"
# move_up = "alt+up"
# move_down = "alt+down"
# delete = ["d", "del"]
# clear = "D"
#
# # The variables list
# insert_variable = "enter"
# delete_variable = ["d", "del"]
# reset_variables = "R"
#
# # The settings list
# prev_value = "left"
# next_value = ["right", "enter"]