34
35:- module(prolog_theme_dark, []).
44:- multifile
45 prolog:theme/1,
46 prolog:console_color/2,
47 pldoc_style:theme/3. 48
49prolog:theme(dark). 50
51:- if(current_predicate(win_window_color/2)). 52set_window_colors :-
53 win_window_color(background, rgb(0,0,0)),
54 win_window_color(foreground, rgb(255,255,255)),
55 win_window_color(selection_background, rgb(0,255,255)),
56 win_window_color(selection_foreground, rgb(0,0,0)).
57
58:- initialization
59 set_window_colors. 60:- endif. 61
62 65
67prolog:console_color(var, [hfg(cyan)]).
68prolog:console_color(code, [hfg(yellow)]).
70prolog:console_color(comment, [hfg(green)]).
71prolog:console_color(warning, [fg(yellow)]).
72prolog:console_color(error, [bold, fg(red)]).
74prolog:console_color(truth(false), [bold, fg(red)]).
75prolog:console_color(truth(true), [bold]).
76prolog:console_color(truth(undefined), [bold, fg(cyan)]).
77prolog:console_color(wfs(residual_program), [fg(cyan)]).
79prolog:console_color(frame(level), [bold]).
80prolog:console_color(port(call), [bold, fg(green)]).
81prolog:console_color(port(exit), [bold, fg(green)]).
82prolog:console_color(port(fail), [bold, fg(red)]).
83prolog:console_color(port(redo), [bold, fg(yellow)]).
84prolog:console_color(port(unify), [bold, fg(blue)]).
85prolog:console_color(port(exception), [bold, fg(magenta)]).
87prolog:console_color(message(informational), [hfg(green)]).
88prolog:console_color(message(information), [hfg(green)]).
89prolog:console_color(message(debug(_)), [hfg(yellow)]).
90prolog:console_color(message(Level), Attrs) :-
91 nonvar(Level),
92 prolog:console_color(Level, Attrs).
93
94
95
105pldoc_style:theme(var, true, [color(bright_cyan)]).
106pldoc_style:theme(code, true, [color(bright_yellow)]).
107pldoc_style:theme(pre, true, [color(bright_yellow)]).
108pldoc_style:theme(p, class(warning), [color(yellow)]).
109pldoc_style:theme(span, class('synopsis-hdr'), [color(bright_green)]).
110pldoc_style:theme(span, class(autoload), [color(bright_green)]).
111
112
113 116
117:- multifile
118 pce:on_load/0,
119 prolog_colour:style/2. 120
121prolog_colour:style(Class, Style) :-
122 style(Class, Style).
133style(goal(built_in,_), [colour(cyan)]).
134style(goal(imported(_),_), [colour(cyan)]).
135style(goal(autoload(_),_), [colour(dark_cyan)]).
136style(goal(global,_), [colour(dark_cyan)]).
137style(goal(undefined,_), [colour(orange)]).
138style(goal(thread_local(_),_), [colour(magenta), underline(true)]).
139style(goal(dynamic(_),_), [colour(magenta)]).
140style(goal(multifile(_),_), [colour(pale_green)]).
141style(goal(expanded,_), [colour(cyan), underline(true)]).
142style(goal(extern(_),_), [colour(cyan), underline(true)]).
143style(goal(extern(_,private),_), [colour(red)]).
144style(goal(extern(_,public),_), [colour(cyan)]).
145style(goal(recursion,_), [underline(true)]).
146style(goal(meta,_), [colour(red4)]).
147style(goal(foreign(_),_), [colour(darkturquoise)]).
148style(goal(local(_),_), []).
149style(goal(constraint(_),_), [colour(darkcyan)]).
150style(goal(not_callable,_), [background(orange)]).
151
152style(function, [colour(cyan)]).
153style(no_function, [colour(orange)]).
154
155style(option_name, [colour('#3434ba')]).
156style(no_option_name, [colour(orange)]).
157
158style(head(exported,_), [colour(cyan), bold(true)]).
159style(head(public(_),_), [colour('#016300'), bold(true)]).
160style(head(extern(_),_), [colour(cyan), bold(true)]).
161style(head(dynamic,_), [colour(magenta), bold(true)]).
162style(head(multifile,_), [colour(pale_green), bold(true)]).
163style(head(unreferenced,_), [colour(red), bold(true)]).
164style(head(hook,_), [colour(cyan), underline(true)]).
165style(head(meta,_), []).
166style(head(constraint(_),_), [colour(darkcyan), bold(true)]).
167style(head(imported(_),_), [colour(darkgoldenrod4), bold(true)]).
168style(head(built_in,_), [background(orange), bold(true)]).
169style(head(iso,_), [background(orange), bold(true)]).
170style(head(def_iso,_), [colour(cyan), bold(true)]).
171style(head(def_swi,_), [colour(cyan), bold(true)]).
172style(head(_,_), [bold(true)]).
173
174style(module(_), [colour(light_slate_blue)]).
175style(comment(_), [colour(green)]).
176
177style(directive, [background(grey20)]).
178style(method(_), [bold(true)]).
179
180style(var, [colour(orangered1)]).
181style(singleton, [bold(true), colour(orangered1)]).
182style(unbound, [colour(red), bold(true)]).
183style(quoted_atom, [colour(pale_green)]).
184style(string, [colour(pale_green)]).
185style(codes, [colour(pale_green)]).
186style(chars, [colour(pale_green)]).
187style(nofile, [colour(red)]).
188style(file(_), [colour(cyan), underline(true)]).
189style(file_no_depend(_), [colour(cyan), underline(true),
190 background(dark_violet)]).
191style(directory(_), [colour(cyan)]).
192style(class(built_in,_), [colour(cyan), underline(true)]).
193style(class(library(_),_), [colour(pale_green), underline(true)]).
194style(class(local(_,_,_),_), [underline(true)]).
195style(class(user(_),_), [underline(true)]).
196style(class(user,_), [underline(true)]).
197style(class(undefined,_), [colour(red), underline(true)]).
198style(prolog_data, [colour(cyan), underline(true)]).
199style(flag_name(_), [colour(cyan)]).
200style(no_flag_name(_), [colour(red)]).
201style(unused_import, [colour(cyan), background(pink)]).
202style(undefined_import, [colour(red)]).
203
204style(constraint(_), [colour(darkcyan)]).
205
206style(keyword(_), [colour(cyan)]).
207style(identifier, [bold(true)]).
208style(delimiter, [bold(true)]).
209style(expanded, [colour(cyan), underline(true)]).
210style(hook(_), [colour(cyan), underline(true)]).
211style(op_type(_), [colour(cyan)]).
212
213style(qq_type, [bold(true)]).
214style(qq(_), [colour(cyan), bold(true)]).
215style(qq_content(_), [colour(red4)]).
216
217style(dict_tag, [bold(true)]).
218style(dict_key, [bold(true)]).
219style(dict_function(_), [colour(pale_green)]).
220style(dict_return_op, [colour(cyan)]).
221
222style(hook, [colour(cyan), underline(true)]).
223style(dcg_right_hand_ctx, [background('#609080')]).
224
225style(error, [background(orange)]).
226style(type_error(_), [background(orange)]).
227style(syntax_error(_,_), [background(orange)]).
228style(instantiation_error, [background(orange)]).
229
230style(table_option(_), [bold(true)]).
231style(table_mode(_), [bold(true)]).
232
233
234 237
238:- op(200, fy, @). 239:- op(800, xfx, :=). 240
241pce:on_load :-
242 pce_set_defaults.
243
244pce_set_defaults :-
245 pce_style(Class, Properties),
246 member(Prop, Properties),
247 Prop =.. [Name,Value],
248 term_string(Value, String),
249 send(@default_table, append, Name, vector(Class, String)),
250 fail ; true.
259
260pce_style(text_image,
261 [ background(black),
262 colour(white)
263 ]).
264pce_style(text_margin,
265 [ background(grey20)
266 ]).
267pce_style(editor,
268 [ selection_style(style(background := yellow, colour := black)),
269 isearch_style(style(background := green, colour := black)),
270 isearch_other_style(style(background := pale_turquoise,
271 colour := black))
272 ]).
273
275
276pce_style(prolog_stack_view,
277 [ background(black)
278 ]).
279pce_style(prolog_stack_frame,
280 [ background(black),
281 colour(white)
282 ]).
283pce_style(prolog_stack_link,
284 [ colour(white)
285 ]).
286pce_style(prolog_bindings_view,
287 [ background_active(black),
288 background_inactive(grey50)
289 ]).
290pce_style(prolog_source_structure,
291 [ background(black),
292 colour(white)
293 ]).
301:- multifile
302 prolog_source_view:port_style/2. 303
304prolog_source_view:port_style(call, [background(forest_green), colour(black)]).
305prolog_source_view:port_style(fail, [background(indian_red), colour(black)]).
306prolog_source_view:port_style(_, [colour(black)])
SWI-Prolog theme file -- dark
To enable the dark theme, use
*/