├── LICENSE.txt
├── README.md
├── load-nano.el
├── nano-base-colors.el
├── nano-colors.el
├── nano-face-override.el
├── nano-faces.el
├── nano-layout.el
├── nano-modeline.el
├── nano-theme-dark.el
├── nano-theme-light.el
├── nano-theme.el
└── screenshots
├── 1.png
└── 2.png
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # doom-nano-testing
2 |
3 | # Notice:
4 | I haven't used this in several months. Both Doom and Nano are actively maintained and this repository does not reflect the current state of either of those projects. If it works for you, that's great. Otherwise, it may be better to see this repository as historical. If I ever resurrect it, I'll remove this notice.
5 |
6 | ---
7 |
8 | This is my attempt at adapting the gorgeous Nano Emacs by Nicolas Rougier to work with the powerhouse that is Doom Emacs.
9 |
10 | I am a learning coder and did not write most of the code in this repo. What I've done is trimmed down the Nano codebase to just the files I need and wrote some code to get it working and looking the way I like.
11 |
12 | Load this code by adding the cloned repo to the load path and requiring it in your private config. Like so for instance:
13 |
14 | ``` emacs-lisp
15 | (add-to-list 'load-path "~/build/doom-nano-testing")
16 | (require 'load-nano)
17 | ```
18 |
19 | Files I wrote:
20 |
21 | * `load-nano.el` - This file loads Nano and attempts to fix some issues with cursor appearance. This file is something of a testbed for my attempts to understand/fix compatibility issues between doom and nano.
22 | * `nano-face-override.el` - This file is necessary for forcing faces to /not look so flipping crazy/. Doom's `custom-set-faces!` does not seem to work at all because of the way that Nano redefines faces. There is undoubtedly a better/easier way of accomplishing this which would likely involve lots of work on `nano-faces.el` or replacing the way that file works entirely with doom functionality. As it is now, I've been adding code to this file every time I come across a face that looks out of place. When you use this, you can possibly end up with errors about undefined faces. As I understand it, this is due to lazy loading. Solve it by wrapping the `set-face-attribute` in question with `(after!)`. There are several examples of this in the file.
23 |
24 | Files from Nano containing large scale changes by me:
25 |
26 | * `nano-faces.el` - I've changed the font from `Roboto Mono` to `Hack Nerd Font`. Find/Replace will let you set whatever your favorite font is. Hack doesn't have 20 weights like `Roboto Mono`, which is not a problem for me but do expect that using a different font than the Nano default will result in a very different look, especially if the chosen font doesn't have as many weights as `Roboto Mono`.
27 | * `nano-theme-light.el` - This has been completely changed to suit my aesthetic desire. I expect anyone who clones this repo will want to adapt this to their own preferred color scheme. Using the dark theme from the Nano repo should be easy enough; one could replace the contents of this file with those of the dark scheme, or one could edit `nano-theme.el` to load the dark theme file instead. The possibilities are endless.
28 | * `nano-colors.el` I've entirely replaced the contents of this file with my own list of colors. I attempted to keep most of the variable names consistent with the naming used in Nano, but there were only so many options. I find that enabling `rainbow-mode` while editing a file that contains such hex color strings makes it much easier to see what I'm doing; YMMV.
29 |
30 |
31 | I've decided to upload this code for a few reasons:
32 | 1. Doom Emacs needs a `:ui nano` module! I'm willing to contribute to that, once I have more time.
33 | 2. My code, though likely not optimal, is usable as is (for me at least). I've discussed using it in a few internet communities and have had people ask me about it. Now there's a repo I can direct them to.
34 | 3. I'm learning this stuff in a hobbyist fashion! I want to contribute to the open source community and this is something I can do with the knowledge I have right now. I really hope that someone with more knowledge than I sees this and, whether out of outrage at my bad code, or because they like this idea as much as I do, decides to write some better code that I can learn from and shamelessly use for myself.
35 |
36 | Sources, and inspiration:
37 |
38 | [Nano Emacs](https://github.com/rougier/nano-emacs)
39 |
40 | [Doom Emacs](https://github.com/hlissner/doom-emacs)
41 |
42 | Screenshots:
43 | 
44 | 
45 |
--------------------------------------------------------------------------------
/load-nano.el:
--------------------------------------------------------------------------------
1 | ;;; load-nano.el -*- lexical-binding: t; -*-
2 |
3 | ;; This file loads nano. Enable by putting (require 'load-nano) in config.el
4 |
5 | ; necessary for proper appearance of nano
6 | (setq doom-theme 'nil)
7 |
8 | (require 'nano-layout)
9 | (require 'nano-modeline)
10 | (require 'nano-theme)
11 | (require 'nano-colors)
12 | (require 'nano-theme-light)
13 | (require 'nano-faces)
14 | (nano-faces)
15 | (nano-theme)
16 | (require 'nano-face-override)
17 |
18 | (setq display-line-numbers-type nil
19 | evil-default-cursor t
20 | custom-blue "#718591"
21 | custom-yellow "#BDA441")
22 |
23 | ; still haven't figured out what is up with point
24 | ; related to nano. this is a stopgap measure to
25 | ; get a decent looking cursor
26 | (if (daemonp)
27 | (add-hook 'after-make-frame-functions
28 | (lambda (frame)
29 | (with-selected-frame frame
30 | (set-cursor-color custom-blue))))
31 | (set-cursor-color custom-blue))
32 |
33 | (defun set-yellow ()
34 | (interactive)
35 | (set-cursor-color custom-yellow))
36 | (defun set-blue ()
37 | (interactive)
38 | (set-cursor-color custom-blue))
39 |
40 | (provide 'load-nano)
41 |
--------------------------------------------------------------------------------
/nano-base-colors.el:
--------------------------------------------------------------------------------
1 | ;; ---------------------------------------------------------------------
2 | ;; GNU Emacs / N Λ N O - Emacs made simple
3 | ;; Copyright (C) 2020 - N Λ N O developers
4 | ;;
5 | ;; This program is free software; you can redistribute it and/or modify
6 | ;; it under the terms of the GNU General Public License as published by
7 | ;; the Free Software Foundation, either version 3 of the License, or
8 | ;; (at your option) any later version.
9 | ;;
10 | ;; This program is distributed in the hope that it will be useful,
11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | ;; GNU General Public License for more details.
14 | ;;
15 | ;; You should have received a copy of the GNU General Public License
16 | ;; along with this program. If not, see .
17 | ;; ---------------------------------------------------------------------
18 | ;;
19 | ;; Defines the 9 basic colors of the nano theme.
20 | ;; The default values are loaded from well-known faces of Emacs.
21 | ;;
22 | ;; To change nano's appearance you therefore may:
23 | ;; - Load any Emacs theme before loading nano to change the appearance
24 | ;; - Load one of the few nano themes after this file. This will result inactive
25 | ;; the best experience.
26 | ;; - Set your own colors by customizing nano group
27 | ;;
28 | ;; ---------------------------------------------------------------------
29 |
30 | (defgroup nano '()
31 | "Faces and colors for the nano emacs theme")
32 |
33 | ;; Derive our default color set from classic Emacs faces.
34 | ;; This allows dropping nano components into already themed Emacsen with varying
35 | ;; degrees of visual appeal.
36 | ;;
37 | ;; We memorize the default colorset in this var in order not to confuse
38 | ;; customize: the STANDARD argument of defcustom gets re-evaluated by customize
39 | ;; to determine if the current value is default or not.
40 | (defvar nano-base-colors--defaults
41 | `((foreground . ,(face-foreground 'default nil t))
42 | (background . ,(face-background 'default nil t))
43 | (highlight . ,(face-background 'fringe nil t))
44 | (critical . ,(face-foreground 'error nil t))
45 | (salient . ,(face-foreground 'font-lock-keyword-face nil t))
46 | (strong . ,(face-foreground 'default nil t))
47 | (popout . ,(face-foreground 'font-lock-string-face nil t))
48 | (subtle . ,(face-background 'mode-line-inactive nil t))
49 | (faded . ,(face-foreground 'shadow nil t))))
50 |
51 | (defun nano-base-colors--get (name)
52 | "Get default color associated with symbol NAME."
53 | (cdr (assoc name nano-base-colors--defaults)))
54 |
55 | (defcustom nano-color-foreground (nano-base-colors--get 'foreground)
56 | ""
57 | :type 'color
58 | :group 'nano)
59 |
60 | (defcustom nano-color-background (nano-base-colors--get 'background)
61 | ""
62 | :type 'color
63 | :group 'nano)
64 |
65 | (defcustom nano-color-highlight (nano-base-colors--get 'highlight)
66 | ""
67 | :type 'color
68 | :group 'nano)
69 |
70 | (defcustom nano-color-critical (nano-base-colors--get 'critical)
71 | ""
72 | :type 'color
73 | :group 'nano)
74 |
75 | (defcustom nano-color-salient (nano-base-colors--get 'salient)
76 | ""
77 | :type 'color
78 | :group 'nano)
79 |
80 | (defcustom nano-color-strong (nano-base-colors--get 'strong)
81 | ""
82 | :type 'color
83 | :group 'nano)
84 |
85 | (defcustom nano-color-popout (nano-base-colors--get 'popout)
86 | ""
87 | :type 'color
88 | :group 'nano)
89 |
90 | (defcustom nano-color-subtle (nano-base-colors--get 'subtle)
91 | ""
92 | :type 'color
93 | :group 'nano)
94 |
95 | (defcustom nano-color-faded (nano-base-colors--get 'faded)
96 | ""
97 | :type 'color
98 | :group 'nano)
99 |
100 | (provide 'nano-base-colors)
101 |
--------------------------------------------------------------------------------
/nano-colors.el:
--------------------------------------------------------------------------------
1 | ;;; doom-nano-testing/nano-colors.el -*- lexical-binding: t; -*-
2 |
3 | (setq dn-background "#C2C5C8" ; silver
4 | dn-contrast "#B2BAC2" ; light-grey
5 | dn-attention "#AB9D27" ; dark yellow
6 | dn-popout "#4C6B3D" ; dark green
7 | dn-blue-green "#628F88" ; dark blue-green
8 | dn-blue "#547894" ; blue
9 | dn-salient "#335B6B" ; dark turquoise
10 | dn-highlight "#24566B" ; dark blue
11 | dn-medium "#98A5B3" ; blue-grey
12 | dn-medium-alt "#92A0A9" ; blue-grey alternate
13 | dn-grey "#879099" ; grey
14 | dn-subtle "#718591" ; dark teal
15 | dn-faded "#4c5e6e" ; dark grey
16 | dn-faded-alt "#485961" ; dark grey alternate
17 | dn-violet "#7A4A82" ; violet
18 | dn-violet-alt "#664273" ; violet alternate
19 | dn-critical "#9C2F18" ; dark red
20 | dn-strong "#2E3B40" ; light black
21 | dn-foreground "#2F3B41" ; very dark blue-grey
22 | )
23 |
24 | (provide 'nano-colors)
25 |
--------------------------------------------------------------------------------
/nano-face-override.el:
--------------------------------------------------------------------------------
1 | ;;; nano-face-override.el -*- lexical-binding: t; -*-
2 |
3 | ; this is my way of customizing the faces used by nano.
4 | ; by default, nano's faces are too limiting in my opinion;
5 | ; syntax highlighting is much less effective when so many
6 | ; fields receive the same face attributes.
7 |
8 | (after! flycheck
9 | (set-face-attribute 'flycheck-error nil
10 | :underline
11 | '(:color "#9C2F18" :style wave ))
12 | (set-face-attribute 'flycheck-warning nil
13 | :underline
14 | '(:color "#AB9D27" :style wave )))
15 |
16 | (after! nano-faces
17 | (set-face-attribute 'nano-face-critical nil
18 | :foreground dn-critical
19 | :background dn-background )
20 | (set-face-attribute 'nano-face-tag-critical nil
21 | :foreground dn-critical
22 | :background dn-background ))
23 | (set-face-attribute 'help-key-binding nil
24 | :foreground dn-foreground
25 | :background dn-background
26 | :weight 'bold
27 | :box nil )
28 | (after! eros
29 | (set-face-attribute 'eros-result-overlay-face nil
30 | :foreground dn-foreground
31 | :background dn-background
32 | :weight 'bold
33 | :box t ))
34 | (after! avy
35 | (set-face-attribute 'avy-lead-face nil
36 | :foreground dn-foreground
37 | :background dn-subtle
38 | :underline t )
39 | (set-face-attribute 'avy-lead-face-1 nil
40 | :foreground dn-foreground
41 | :background dn-subtle
42 | :underline t )
43 | (set-face-attribute 'avy-lead-face-0 nil
44 | :foreground dn-foreground
45 | :background dn-subtle
46 | :underline t ))
47 | (after! lsp-ui
48 | (set-face-attribute 'lsp-ui-doc-url nil
49 | :background dn-contrast
50 | :inherit nil
51 | :underline t )
52 | (set-face-attribute 'lsp-ui-doc-background nil
53 | :background dn-contrast
54 | :inherit nil
55 | :box t ))
56 | (after! lsp-mode
57 | (set-face-attribute 'lsp-signature-face nil
58 | :background dn-contrast
59 | :inherit nil )
60 | (set-face-attribute 'lsp-face-highlight-read nil
61 | :background dn-contrast
62 | :underline nil
63 | :inherit nil )
64 | (set-face-attribute 'lsp-face-highlight-write nil
65 | :background dn-contrast
66 | :underline t
67 | :inherit nil ))
68 | (after! git-gutter-fringe
69 | (set-face-attribute 'git-gutter-fr:added nil
70 | :foreground dn-popout
71 | :weight 'bold )
72 | (set-face-attribute 'git-gutter:modified nil
73 | :foreground dn-attention
74 | :weight 'bold)
75 | (set-face-attribute 'git-gutter-fr:modified nil
76 | :foreground dn-attention
77 | :weight 'bold))
78 | (after! magit
79 | (set-face-attribute 'magit-diff-hunk-heading-highlight nil
80 | :background dn-medium
81 | :box nil
82 | :underline t )
83 | (set-face-attribute 'magit-diff-hunk-heading nil
84 | :background dn-medium )
85 | (set-face-attribute 'magit-diff-context-highlight nil
86 | :foreground dn-foreground
87 | :background dn-background )
88 | (set-face-attribute 'magit-diff-added-highlight nil
89 | :foreground dn-popout
90 | :background dn-background
91 | :weight 'bold)
92 | (set-face-attribute 'magit-diff-added nil
93 | :foreground dn-popout
94 | :background dn-background )
95 | (set-face-attribute 'magit-diff-removed-highlight nil
96 | :foreground dn-critical
97 | :background dn-background
98 | :weight 'bold )
99 | (set-face-attribute 'magit-diff-removed nil
100 | :foreground dn-critical
101 | :background dn-background )
102 | (set-face-attribute 'magit-hash nil
103 | :foreground dn-grey
104 | :weight 'bold)
105 | (set-face-attribute 'magit-section-highlight nil
106 | :background dn-contrast
107 | :inherit nil ))
108 | (after! info
109 | (set-face-attribute 'info-xref-visited nil
110 | :foreground dn-violet )
111 | (set-face-attribute 'info-menu-star nil
112 | :foreground dn-foreground ))
113 | (after! popup
114 | (set-face-attribute 'popup-tip-face nil
115 | :background dn-contrast ))
116 | (set-face-attribute 'link nil
117 | :underline t )
118 | (set-face-attribute 'button nil
119 | :underline t )
120 | (after! hl-line
121 | (set-face-attribute 'hl-line nil :background dn-medium ))
122 | (set-face-attribute 'cursor nil
123 | :background dn-subtle )
124 | (after! web-mode
125 | (set-face-attribute 'web-mode-doctype-face nil
126 | :foreground dn-faded )
127 | (set-face-attribute 'web-mode-html-attr-name-face nil
128 | :foreground dn-salient )
129 | (set-face-attribute 'web-mode-html-tag-face nil
130 | :foreground dn-violet ))
131 | (after! company
132 | (set-face-attribute 'company-tooltip-search nil
133 | :background dn-medium )
134 | (set-face-attribute 'company-tooltip-common nil
135 | :background dn-medium )
136 | ;(set-face-attribute 'company-box-scrollbar nil
137 | ; :background dn-medium )
138 | (set-face-attribute 'company-tooltip-annotation nil
139 | :background dn-medium )
140 | (set-face-attribute 'company-scrollbar-bg nil
141 | :background dn-medium )
142 | (set-face-attribute 'company-scrollbar-fg nil
143 | :background dn-medium ))
144 | (after! diredfl
145 | (set-face-attribute 'diredfl-dir-heading nil
146 | :foreground dn-faded
147 | :background nil
148 | :weight 'bold
149 | :underline t )
150 | (set-face-attribute 'diredfl-dir-name nil
151 | :foreground dn-salient
152 | :background nil )
153 | (set-face-attribute 'diredfl-compressed-file-suffix nil
154 | :foreground dn-salient
155 | :background nil )
156 | (set-face-attribute 'diredfl-file-name nil
157 | :foreground dn-foreground )
158 | (set-face-attribute 'diredfl-deletion nil
159 | :foreground dn-critical
160 | :background dn-background )
161 | :weight 'bold
162 | (set-face-attribute 'diredfl-deletion-file-name nil
163 | :foreground dn-critical )
164 | (set-face-attribute 'diredfl-file-suffix nil
165 | :foreground dn-faded ))
166 | (set-face-attribute 'org-link nil
167 | :underline t )
168 | (set-face-attribute 'font-lock-builtin-face nil
169 | :foreground dn-violet )
170 | (defun set-shell-face
171 | ( )
172 | (set-face-attribute 'sh-quoted-exec nil
173 | :foreground dn-blue ))
174 | (add-hook 'sh-mode-hook #'set-shell-face )
175 | (defun vterm-faces
176 | ( )
177 | (set-face-attribute 'vterm-color-red nil
178 | :foreground dn-critical
179 | :background nil )
180 | (set-face-attribute 'vterm-color-yellow nil
181 | :foreground dn-attention
182 | :background nil )
183 | (set-face-attribute 'vterm-color-blue nil
184 | :foreground dn-blue
185 | :background nil )
186 | (set-face-attribute 'vterm-color-magenta nil
187 | :foreground dn-violet
188 | :background nil )
189 | (set-face-attribute 'vterm-color-green nil
190 | :foreground dn-popout
191 | :background nil ))
192 | (add-hook 'vterm-mode-hook #'vterm-faces )
193 | (after! font-latex
194 | (set-face-attribute 'font-latex-script-char-face nil
195 | :foreground dn-faded
196 | :weight 'bold )
197 | (set-face-attribute 'font-latex-math-face nil
198 | :foreground dn-faded
199 | :weight 'bold ))
200 | (after! hydra
201 | (set-face-attribute 'hydra-face-red nil
202 | :foreground dn-critical
203 | :weight 'bold ))
204 | (after! smartparens
205 | (set-face-attribute 'show-paren-match nil
206 | :foreground dn-violet
207 | :background dn-blue-green
208 | :weight 'bold
209 | :inverse-video t )
210 | (set-face-attribute 'sp-show-pair-match-face nil
211 | :foreground dn-violet
212 | :background dn-blue-green
213 | :weight 'bold
214 | :inverse-video t ))
215 |
216 | ; for reference
217 | ;(set-face-attribute face nil
218 | ; :foreground 'unspecified :background 'unspecified
219 | ; :family 'unspecified :slant 'unspecified
220 | ; :weight 'unspecified :height 'unspecified
221 | ; :underline 'unspecified :overline 'unspecified
222 | ; :box 'unspecified :inherit style )
223 |
224 | (provide 'nano-face-override)
225 |
--------------------------------------------------------------------------------
/nano-faces.el:
--------------------------------------------------------------------------------
1 | ;;; nano-faces --- Face settings for nano-emacs
2 |
3 | ;;; License:
4 | ;; ---------------------------------------------------------------------
5 | ;; GNU Emacs / N Λ N O - Emacs made simple
6 | ;; Copyright (C) 2020 - N Λ N O developers
7 | ;;
8 | ;; This program is free software; you can redistribute it and/or modify
9 | ;; it under the terms of the GNU General Public License as published by
10 | ;; the Free Software Foundation, either version 3 of the License, or
11 | ;; (at your option) any later version.
12 | ;;
13 | ;; This program is distributed in the hope that it will be useful,
14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | ;; GNU General Public License for more details.
17 | ;;
18 | ;; You should have received a copy of the GNU General Public License
19 | ;; along with this program. If not, see .
20 | ;; ---------------------------------------------------------------------
21 | ;;; Commentary:
22 | ;;
23 | ;; This file defines the 6 basic nano faces:
24 | ;;
25 | ;; - nano-face-critical - nano-face-popout - nano-face-salient
26 | ;; - nano-face-default - nano-face-faded - nano-face-subtle
27 | ;;
28 | ;; Several nano modules require
29 | ;;
30 | ;; ---------------------------------------------------------------------
31 | ;;; Code:
32 |
33 | (require 'nano-base-colors)
34 |
35 | ;; A theme is fully defined by these six faces
36 |
37 | (defface nano-face-default nil
38 | "Default face is used for regular information."
39 | :group 'nano)
40 |
41 | (defface nano-face-critical nil
42 | "Critical face is for information that requires immediate action.
43 | It should be of high constrast when compared to other faces. This
44 | can be realized (for example) by setting an intense background
45 | color, typically a shade of red. It must be used scarcely."
46 | :group 'nano)
47 |
48 | (defface nano-face-popout nil
49 | "Popout face is used for information that needs attention.
50 | To achieve such effect, the hue of the face has to be
51 | sufficiently different from other faces such that it attracts
52 | attention through the popout effect."
53 | :group 'nano)
54 |
55 | (defface nano-face-strong nil
56 | "Strong face is used for information of a structural nature.
57 | It has to be the same color as the default color and only the
58 | weight differs by one level (e.g., light/regular or
59 | regular/bold). IT is generally used for titles, keywords,
60 | directory, etc."
61 | :group 'nano)
62 |
63 | (defface nano-face-salient nil
64 | "Salient face is used for information that are important.
65 | To suggest the information is of the same nature but important,
66 | the face uses a different hue with approximately the same
67 | intensity as the default face. This is typically used for links."
68 | :group 'nano)
69 |
70 | (defface nano-face-faded nil
71 | "Faded face is for information that are less important.
72 | It is made by using the same hue as the default but with a lesser
73 | intensity than the default. It can be used for comments,
74 | secondary information and also replace italic (which is generally
75 | abused anyway)."
76 | :group 'nano)
77 |
78 | (defface nano-face-subtle nil
79 | "Subtle face is used to suggest a physical area on the screen.
80 | It is important to not disturb too strongly the reading of
81 | information and this can be made by setting a very light
82 | background color that is barely perceptible."
83 | :group 'nano)
84 |
85 | (defface nano-face-header-default nil
86 | "Default face for ther header line."
87 | :group 'nano)
88 |
89 | (defface nano-face-header-critical nil
90 | "Critical face for ther header line."
91 | :group 'nano)
92 |
93 | (defface nano-face-header-popout nil
94 | "Popout face for ther header line."
95 | :group 'nano)
96 |
97 | (defface nano-face-header-strong nil
98 | "Strong face for ther header line."
99 | :group 'nano)
100 |
101 | (defface nano-face-header-salient nil
102 | "Salient face for ther header line."
103 | :group 'nano)
104 |
105 | (defface nano-face-header-faded nil
106 | "Faded face for ther header line."
107 | :group 'nano)
108 |
109 | (defface nano-face-header-subtle nil
110 | "Subtle face for ther header line."
111 | :group 'nano)
112 |
113 | (defface nano-face-header-highlight nil
114 | "Highlight face for ther header line."
115 | :group 'nano)
116 |
117 | (defface nano-face-header-separator nil
118 | "Face for separating item in the header line (internal use)"
119 | :group 'nano)
120 |
121 | (defface nano-face-header-filler nil
122 | "Face compsenting spaces in the header line (internal use) "
123 | :group 'nano)
124 |
125 | (defface nano-face-tag-default nil
126 | "Default face for tags"
127 | :group 'nano)
128 |
129 | (defface nano-face-tag-faded nil
130 | "Faded face for tags"
131 | :group 'nano)
132 |
133 | (defface nano-face-tag-strong nil
134 | "Strong face for tags"
135 | :group 'nano)
136 |
137 | (defface nano-face-tag-salient nil
138 | "Salient face for tags"
139 | :group 'nano)
140 |
141 | (defface nano-face-tag-popout nil
142 | "Popout face for tags"
143 | :group 'nano)
144 |
145 | (defface nano-face-tag-critical nil
146 | "Critical face for tags"
147 | :group 'nano)
148 |
149 | (defun nano-what-faces (pos)
150 | "Get the font faces at POS."
151 | (interactive "d")
152 | (let ((faces (remq nil
153 | (list
154 | (get-char-property pos 'read-face-name)
155 | (get-char-property pos 'face)
156 | (plist-get (text-properties-at pos) 'face)))))
157 | (message "Faces: %s" faces)))
158 |
159 | (defun nano-faces ()
160 | "Derive face attributes for nano-faces using nano-theme values."
161 | (set-face-attribute 'nano-face-default nil
162 | :foreground nano-color-foreground
163 | :background nano-color-background)
164 | (set-face-attribute 'nano-face-critical nil
165 | :foreground nano-color-foreground
166 | :background nano-color-critical)
167 | (set-face-attribute 'nano-face-popout nil
168 | :foreground nano-color-popout)
169 |
170 | (if (display-graphic-p)
171 | (set-face-attribute 'nano-face-strong nil
172 | :foreground (face-foreground 'nano-face-default)
173 | :family "Hack"
174 | :weight 'bold)
175 | (set-face-attribute 'nano-face-strong nil
176 | :foreground (face-foreground 'nano-face-default)
177 | :weight 'bold))
178 |
179 | (set-face-attribute 'nano-face-salient nil
180 | :foreground nano-color-salient
181 | :weight 'regular)
182 |
183 | (set-face-attribute 'nano-face-faded nil
184 | :foreground nano-color-faded
185 | :weight 'light)
186 |
187 | (set-face-attribute 'nano-face-subtle nil
188 | :background nano-color-subtle)
189 |
190 | (set-face-attribute 'nano-face-header-default nil
191 | :foreground nano-color-foreground
192 | :background nano-color-subtle
193 | :box `(:line-width 1
194 | :color ,nano-color-background
195 | :style nil))
196 |
197 | (set-face-attribute 'nano-face-tag-default nil
198 | :foreground nano-color-foreground
199 | :background nano-color-background
200 | :family "Hack" :weight 'regular
201 | :height (if (display-graphic-p) 160 1)
202 | :box `(:line-width 1
203 | :color ,nano-color-foreground
204 | :style nil))
205 |
206 | (set-face-attribute 'nano-face-header-strong nil
207 | :foreground nano-color-strong
208 | :background nano-color-subtle
209 | :inherit 'nano-face-strong
210 | :box `(:line-width 1
211 | :color ,nano-color-background
212 | :style nil))
213 |
214 | (set-face-attribute 'nano-face-tag-strong nil
215 | :foreground nano-color-strong
216 | :background nano-color-subtle
217 | :family "Hack" :weight 'regular
218 | :height (if (display-graphic-p) 160 1)
219 | :box `(:line-width 1
220 | :color ,nano-color-strong
221 | :style nil))
222 |
223 | (set-face-attribute 'nano-face-header-salient nil
224 | :foreground nano-color-background
225 | :background nano-color-salient
226 | :box `(:line-width 1
227 | :color ,nano-color-background
228 | :style nil))
229 |
230 | (set-face-attribute 'nano-face-tag-salient nil
231 | :foreground nano-color-background
232 | :background nano-color-salient
233 | :family "Hack" :weight 'regular
234 | :height (if (display-graphic-p) 160 1)
235 | :box `(:line-width 1
236 | :color ,nano-color-salient
237 | :style nil))
238 |
239 | (set-face-attribute 'nano-face-header-popout nil
240 | :foreground nano-color-background
241 | :background nano-color-popout
242 | :box `(:line-width 1
243 | :color ,nano-color-background
244 | :style nil))
245 |
246 | (set-face-attribute 'nano-face-tag-popout nil
247 | :foreground nano-color-background
248 | :background nano-color-popout
249 | :family "Hack" :weight 'regular
250 | :height (if (display-graphic-p) 160 1)
251 | :box `(:line-width 1
252 | :color ,nano-color-popout
253 | :style nil))
254 |
255 | (set-face-attribute 'nano-face-header-faded nil
256 | :foreground nano-color-background
257 | :background nano-color-faded
258 | :box `(:line-width 1
259 | :color ,nano-color-background
260 | :style nil))
261 |
262 | (set-face-attribute 'nano-face-tag-faded nil
263 | :foreground nano-color-background
264 | :background nano-color-faded
265 | :family "Hack" :weight 'regular
266 | :height (if (display-graphic-p) 160 1)
267 | :box `(:line-width 1
268 | :color ,nano-color-faded
269 | :style nil))
270 |
271 | (set-face-attribute 'nano-face-header-subtle nil)
272 |
273 | (set-face-attribute 'nano-face-header-critical nil
274 | :foreground nano-color-background
275 | :background nano-color-critical
276 | :box `(:line-width 1
277 | :color ,nano-color-background
278 | :style nil))
279 | (set-face-attribute 'nano-face-tag-critical nil
280 | :foreground nano-color-background
281 | :background nano-color-critical
282 | :family "Hack" :weight 'regular
283 | :height (if (display-graphic-p) 160 1)
284 | :box `(:line-width 1
285 | :color ,nano-color-critical
286 | :style nil))
287 |
288 | (set-face-attribute 'nano-face-header-separator nil
289 | :inherit 'nano-face-default
290 | :height 0.1)
291 | (set-face-attribute 'nano-face-header-filler nil
292 | :inherit 'nano-face-header-default
293 | :height 0.1)
294 | (set-face-attribute 'nano-face-header-highlight nil
295 | :inherit 'nano-face-header-faded
296 | :box nil))
297 |
298 | (provide 'nano-faces)
299 | ;;; nano-faces.el ends here
300 |
--------------------------------------------------------------------------------
/nano-layout.el:
--------------------------------------------------------------------------------
1 | ;; ---------------------------------------------------------------------
2 | ;; GNU Emacs / N Λ N O - Emacs made simple
3 | ;; Copyright (C) 2020 - N Λ N O developers
4 | ;;
5 | ;; This program is free software; you can redistribute it and/or modify
6 | ;; it under the terms of the GNU General Public License as published by
7 | ;; the Free Software Foundation, either version 3 of the License, or
8 | ;; (at your option) any later version.
9 | ;;
10 | ;; This program is distributed in the hope that it will be useful,
11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | ;; GNU General Public License for more details.
14 | ;;
15 | ;; You should have received a copy of the GNU General Public License
16 | ;; along with this program. If not, see .
17 | ;; ---------------------------------------------------------------------
18 |
19 | (setq default-frame-alist
20 | (append (list
21 | '(font . "Hack:style=Regular:size=16")
22 | '(min-height . 1) '(height . 45)
23 | '(min-width . 1) '(width . 81)
24 | '(vertical-scroll-bars . nil)
25 | '(internal-border-width . 21)
26 | '(left-fringe . 0)
27 | '(right-fringe . 0)
28 | '(tool-bar-lines . 0)
29 | '(menu-bar-lines . 0))))
30 |
31 | ; Fall back font for glyph missing in Roboto
32 | (defface fallback '((t :family "Fira Code"
33 | :inherit 'nano-face-faded)) "Fallback")
34 | (set-display-table-slot standard-display-table 'truncation
35 | (make-glyph-code ?… 'fallback))
36 | (set-display-table-slot standard-display-table 'wrap
37 | (make-glyph-code ?↩ 'fallback))
38 |
39 | (add-hook 'term-mode-hook
40 | (lambda () (setq buffer-display-table (make-display-table))))
41 |
42 | (setq inhibit-startup-screen t
43 | inhibit-startup-message t
44 | inhibit-startup-echo-area-message t
45 | initial-scratch-message nil)
46 | (tool-bar-mode 0)
47 | (tooltip-mode 0)
48 | (menu-bar-mode 0)
49 | (setq x-underline-at-descent-line t)
50 |
51 | ;; Vertical window divider
52 | (setq window-divider-default-right-width 20)
53 | (setq window-divider-default-places 'right-only)
54 | (window-divider-mode 1)
55 |
56 | ;; No ugly button for checkboxes
57 | (setq widget-image-enable nil)
58 |
59 | ;; Hide org markup for README
60 | (setq org-hide-emphasis-markers t)
61 |
62 | (provide 'nano-layout)
63 |
--------------------------------------------------------------------------------
/nano-modeline.el:
--------------------------------------------------------------------------------
1 | ;; -*- lexical-binding: t -*-
2 | ;; -------------------------------------------------------------------
3 | ;; GNU Emacs / N Λ N O - Emacs made simple
4 | ;; Copyright (C) 2020 - N Λ N O developers
5 | ;;
6 | ;; This file is not part of GNU Emacs.
7 | ;;
8 | ;; This program is free software: you can redistribute it and/or
9 | ;; modify it under the terms of the GNU General Public License as
10 | ;; published by the Free Software Foundation, either version 3 of the
11 | ;; License, or (at your option) any later version.
12 | ;;
13 | ;; This program is distributed in the hope that it will be useful, but
14 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | ;; General Public License for more details.
17 | ;;
18 | ;; You should have received a copy of the GNU General Public License
19 | ;; along with this program. If not, see
20 | ;; -------------------------------------------------------------------
21 | ;;
22 | ;; Nano mode line format:
23 | ;;
24 | ;; [ status | name (primary) secondary | item1 | item2 ]
25 | ;;
26 | ;; -------------------------------------------------------------------
27 | (require 'subr-x)
28 |
29 |
30 | ;; -------------------------------------------------------------------
31 | (defun vc-branch ()
32 | (if vc-mode
33 | (let ((backend (vc-backend buffer-file-name)))
34 | (concat "#" (substring-no-properties vc-mode
35 | (+ (if (eq backend 'Hg) 2 3) 2)))) nil))
36 |
37 |
38 | ;; From https://amitp.blogspot.com/2011/08/emacs-custom-mode-line.html
39 | ;; ---------------------------------------------------------------------
40 | (defun shorten-directory (dir max-length)
41 | "Show up to `max-length' characters of a directory name `dir'."
42 | (let ((path (reverse (split-string (abbreviate-file-name dir) "/")))
43 | (output ""))
44 | (when (and path (equal "" (car path)))
45 | (setq path (cdr path)))
46 | (while (and path (< (length output) (- max-length 4)))
47 | (setq output (concat (car path) "/" output))
48 | (setq path (cdr path)))
49 | (when path
50 | (setq output (concat "…/" output)))
51 | output))
52 |
53 | ;; -------------------------------------------------------------------
54 | (defun nano-modeline-compose (status name primary secondary)
55 | "Compose a string with provided information"
56 | (let* ((char-width (window-font-width nil 'header-line))
57 | (window (get-buffer-window (current-buffer)))
58 | (space-up +0.15)
59 | (space-down -0.20)
60 | (prefix (cond ((string= status "RO")
61 | (propertize " RO " 'face 'nano-face-header-popout))
62 | ((string= status "**")
63 | (propertize " ** " 'face 'nano-face-header-critical))
64 | ((string= status "RW")
65 | (propertize " RW " 'face 'nano-face-header-faded))
66 | (t (propertize status 'face 'nano-face-header-popout))))
67 | (left (concat
68 | (propertize " " 'face 'nano-face-header-default
69 | 'display `(raise ,space-up))
70 | (propertize name 'face 'nano-face-header-strong)
71 | (propertize " " 'face 'nano-face-header-default
72 | 'display `(raise ,space-down))
73 | (propertize primary 'face 'nano-face-header-default)))
74 | (right (concat secondary " "))
75 | (available-width (- (window-total-width)
76 | (length prefix) (length left) (length right)
77 | (/ (window-right-divider-width) char-width)))
78 | (available-width (max 1 available-width)))
79 | (concat prefix
80 | left
81 | (propertize (make-string available-width ?\ )
82 | 'face 'nano-face-header-default)
83 | (propertize right 'face `(:inherit nano-face-header-default
84 | :foreground ,nano-color-faded)))))
85 |
86 | ;; ---------------------------------------------------------------------
87 | (defun nano-modeline-mu4e-dashboard-mode-p ()
88 | (bound-and-true-p mu4e-dashboard-mode))
89 |
90 | (defun nano-modeline-mu4e-dashboard-mode ()
91 | (nano-modeline-compose (nano-modeline-status)
92 | "Mail"
93 | (nano-modeline-mu4e-context)
94 | ""))
95 |
96 | ;; ---------------------------------------------------------------------
97 |
98 | ;; since the EIN library itself is constantly re-rendering the notebook, and thus
99 | ;; re-setting the header-line-format, we cannot use the nano-modeline function to set
100 | ;; the header format in a notebook buffer. Fortunately, EIN exposes the
101 | ;; ein:header-line-format variable for just this purpose.
102 |
103 | (with-eval-after-load 'ein
104 | (defun nano-modeline-ein-notebook-mode ()
105 | (let ((buffer-name (format-mode-line "%b")))
106 | (nano-modeline-compose (if (ein:notebook-modified-p) "**" "RW")
107 | buffer-name
108 | ""
109 | (ein:header-line))))
110 | (setq ein:header-line-format '((:eval (nano-modeline-ein-notebook-mode)))))
111 |
112 | ;; ---------------------------------------------------------------------
113 | (defun nano-modeline-elfeed-search-mode-p ()
114 | (derived-mode-p 'elfeed-search-mode))
115 |
116 | (defun nano-modeline-elfeed-search-mode ()
117 | (nano-modeline-compose (nano-modeline-status)
118 | "Elfeed"
119 | (concat "(" (elfeed-search--header) ")")
120 | ""))
121 |
122 | ;; Elfeed (regular header)
123 | (with-eval-after-load 'elfeed
124 | (defun elfeed-setup-header ()
125 | (setq header-line-format (default-value 'header-line-format)))
126 | (setq elfeed-search-header-function #'elfeed-setup-header))
127 |
128 | ;; ---------------------------------------------------------------------
129 | (defun nano-modeline-elfeed-show-mode-p ()
130 | (derived-mode-p 'elfeed-show-mode))
131 |
132 | (defun nano-modeline-elfeed-show-mode ()
133 | (let* ((title (elfeed-entry-title elfeed-show-entry))
134 | (tags (elfeed-entry-tags elfeed-show-entry))
135 | (tags-str (mapconcat #'symbol-name tags ", "))
136 | (date (seconds-to-time (elfeed-entry-date elfeed-show-entry)))
137 | (feed (elfeed-entry-feed elfeed-show-entry))
138 | (feed-title (plist-get (elfeed-feed-meta feed) :title))
139 | (entry-author (elfeed-meta elfeed-show-entry :author)))
140 | (nano-modeline-compose (nano-modeline-status)
141 | (s-truncate 40 title "…")
142 | (concat "(" tags-str ")")
143 | feed-title)))
144 |
145 | ;; ---------------------------------------------------------------------
146 | (defun nano-modeline-calendar-mode-p ()
147 | (derived-mode-p 'calendar-mode))
148 |
149 | (defun nano-modeline-calendar-mode () "")
150 |
151 | ;; Calendar (no header, only overline)
152 | (with-eval-after-load 'calendar
153 | (defun calendar-setup-header ()
154 | (setq header-line-format "")
155 | (face-remap-add-relative
156 | 'header-line `(:overline ,(face-foreground 'default)
157 | :height 0.5
158 | :background ,(face-background 'default))))
159 | (add-hook 'calendar-initial-window-hook #'calendar-setup-header)
160 |
161 | ;; From https://emacs.stackexchange.com/questions/45650
162 | (add-to-list 'display-buffer-alist
163 | `(,(rx string-start "*Calendar*" string-end)
164 | (display-buffer-below-selected))))
165 |
166 | ;; ---------------------------------------------------------------------
167 | (defun nano-modeline-org-capture-mode-p ()
168 | (bound-and-true-p org-capture-mode))
169 |
170 | (defun nano-modeline-org-capture-mode ()
171 | (nano-modeline-compose (nano-modeline-status)
172 | "Capture"
173 | "(org)"
174 | ""))
175 |
176 | (with-eval-after-load 'org-capture
177 | (defun org-capture-turn-off-header-line ()
178 | (setq-local header-line-format (default-value 'header-line-format))
179 | ;; (fit-window-to-buffer nil nil 8)
180 | ;; (face-remap-add-relative 'header-line '(:background "#ffffff"))
181 | (message nil))
182 | (add-hook 'org-capture-mode-hook
183 | #'org-capture-turn-off-header-line))
184 |
185 | ;; ---------------------------------------------------------------------
186 | (setq Info-use-header-line nil)
187 | (defun nano-modeline-info-breadcrumbs ()
188 | (let ((nodes (Info-toc-nodes Info-current-file))
189 | (cnode Info-current-node)
190 | (node Info-current-node)
191 | (crumbs ())
192 | (depth Info-breadcrumbs-depth)
193 | line)
194 | (while (> depth 0)
195 | (setq node (nth 1 (assoc node nodes)))
196 | (if node (push node crumbs))
197 | (setq depth (1- depth)))
198 | (setq crumbs (cons "Top" (if (member (pop crumbs) '(nil "Top"))
199 | crumbs (cons nil crumbs))))
200 | (forward-line 1)
201 | (dolist (node crumbs)
202 | (let ((text
203 | (if (not (equal node "Top")) node
204 | (format "%s"
205 | (if (stringp Info-current-file)
206 | (file-name-sans-extension
207 | (file-name-nondirectory Info-current-file))
208 | Info-current-file)))))
209 | (setq line (concat line (if (null line) "" " > ")
210 | (if (null node) "..." text)))))
211 | (if (and cnode (not (equal cnode "Top")))
212 | (setq line (concat line (if (null line) "" " > ") cnode)))
213 | line))
214 |
215 | (defun nano-modeline-info-mode-p ()
216 | (derived-mode-p 'Info-mode))
217 |
218 | (defun nano-modeline-info-mode ()
219 | (nano-modeline-compose (nano-modeline-status)
220 | "Info"
221 | (concat "("
222 | (nano-modeline-info-breadcrumbs)
223 | ")")
224 | ""))
225 |
226 | ;; ---------------------------------------------------------------------
227 | (defun nano-modeline-org-agenda-mode-p ()
228 | (derived-mode-p 'org-agenda-mode))
229 |
230 | (defun nano-modeline-org-agenda-mode ()
231 | (nano-modeline-compose (nano-modeline-status)
232 | "Agenda"
233 | ""
234 | (format-time-string "%H:%M")))
235 |
236 | ;; ---------------------------------------------------------------------
237 | (defun nano-modeline-term-mode-p ()
238 | (derived-mode-p 'term-mode))
239 |
240 | (defun nano-modeline-vterm-mode-p ()
241 | (derived-mode-p 'vterm-mode))
242 |
243 | (defun nano-modeline-term-mode ()
244 | (nano-modeline-compose " >_ "
245 | "Terminal"
246 | (concat "(" shell-file-name ")")
247 | (shorten-directory default-directory 32)))
248 |
249 | ;; ---------------------------------------------------------------------
250 | (defun nano-modeline-mu4e-main-mode-p ()
251 | (derived-mode-p 'mu4e-main-mode))
252 |
253 | (defun nano-modeline-mu4e-main-mode ()
254 | (nano-modeline-compose (nano-modeline-status)
255 | "Mail"
256 | (nano-modeline-mu4e-context)
257 | (format-time-string "%A %d %B %Y, %H:%M")))
258 |
259 | ;; ---------------------------------------------------------------------
260 | (defun nano-modeline-mu4e-headers-mode-p ()
261 | (derived-mode-p 'mu4e-headers-mode))
262 |
263 | (defun nano-modeline-mu4e-headers-mode ()
264 | (nano-modeline-compose (nano-modeline-status)
265 | (mu4e~quote-for-modeline mu4e~headers-last-query)
266 | ""
267 | ""))
268 |
269 | (with-eval-after-load 'mu4e
270 | (defun mu4e~header-line-format () (nano-modeline)))
271 |
272 | ;; ---------------------------------------------------------------------
273 | (setq mu4e-modeline-max-width 72)
274 |
275 | (defun nano-modeline-mu4e-view-mode-p ()
276 | (derived-mode-p 'mu4e-view-mode))
277 |
278 | (defun nano-modeline-mu4e-view-mode ()
279 | (let* ((msg (mu4e-message-at-point))
280 | (subject (mu4e-message-field msg :subject))
281 | (from (mu4e~headers-contact-str (mu4e-message-field msg :from)))
282 | (date (mu4e-message-field msg :date)))
283 | (nano-modeline-compose (nano-modeline-status)
284 | (s-truncate 40 subject "…")
285 | ""
286 | from)))
287 |
288 | (add-hook 'mu4e-view-mode-hook
289 | (lambda () (setq header-line-format "%-")
290 | (face-remap-add-relative 'header-line
291 | '(:background nil
292 | :underline nil
293 | :box nil
294 | :height 1.0))))
295 |
296 |
297 | ;; ---------------------------------------------------------------------
298 | (defun nano-modeline-nano-help-mode-p ()
299 | (derived-mode-p 'nano-help-mode))
300 |
301 | (defun nano-modeline-nano-help-mode ()
302 | (nano-modeline-compose (nano-modeline-status)
303 | "GNU Emacs / N Λ N O"
304 | "(help)"
305 | ""))
306 |
307 | ;; ---------------------------------------------------------------------
308 | (defun nano-modeline-message-mode-p ()
309 | (derived-mode-p 'message-mode))
310 |
311 | (defun nano-modeline-message-mode ()
312 | (nano-modeline-compose (nano-modeline-status)
313 | "Message" "(draft)" ""))
314 |
315 |
316 | ;; ---------------------------------------------------------------------
317 | (setq org-mode-line-string nil)
318 | (with-eval-after-load 'org-clock
319 | (add-hook 'org-clock-out-hook
320 | '(lambda () (setq org-mode-line-string nil)
321 | (force-mode-line-update))))
322 |
323 | (defun nano-modeline-org-clock-mode-p ()
324 | org-mode-line-string)
325 |
326 | (defun nano-modeline-org-clock-mode ()
327 | (let ((buffer-name (format-mode-line "%b"))
328 | (mode-name (format-mode-line "%m"))
329 | (branch (vc-branch))
330 | (position (format-mode-line "%l:%c")))
331 | (nano-modeline-compose (nano-modeline-status)
332 | buffer-name
333 | (concat "(" mode-name
334 | (if branch (concat ", "
335 | (propertize branch 'face 'italic)))
336 | ")" )
337 | org-mode-line-string)))
338 |
339 | ;; ---------------------------------------------------------------------
340 | (defun nano-modeline-docview-mode-p ()
341 | (derived-mode-p 'doc-view-mode))
342 |
343 | (defun nano-modeline-docview-mode ()
344 | (let ((buffer-name (format-mode-line "%b"))
345 | (mode-name (format-mode-line "%m"))
346 | (branch (vc-branch))
347 | (page-number (concat
348 | (number-to-string (doc-view-current-page)) "/"
349 | (or (ignore-errors
350 | (number-to-string (doc-view-last-page-number)))
351 | "???"))))
352 | (nano-modeline-compose
353 | (nano-modeline-status)
354 | buffer-name
355 | (concat "(" mode-name
356 | (if branch (concat ", "
357 | (propertize branch 'face 'italic)))
358 | ")" )
359 | page-number)))
360 |
361 | ;; ---------------------------------------------------------------------
362 | (defun nano-modeline-pdf-view-mode-p ()
363 | (derived-mode-p 'pdf-view-mode))
364 |
365 | (defun nano-modeline-pdf-view-mode ()
366 | (let ((buffer-name (format-mode-line "%b"))
367 | (mode-name (format-mode-line "%m"))
368 | (branch (vc-branch))
369 | (page-number (concat
370 | (number-to-string (pdf-view-current-page)) "/"
371 | (or (ignore-errors
372 | (number-to-string (pdf-cache-number-of-pages)))
373 | "???"))))
374 | (nano-modeline-compose
375 | "RW"
376 | buffer-name
377 | (concat "(" mode-name
378 | (if branch (concat ", "
379 | (propertize branch 'face 'italic)))
380 | ")" )
381 | page-number)))
382 |
383 | ;; ---------------------------------------------------------------------
384 | (defun buffer-menu-mode-header-line ()
385 | (face-remap-add-relative
386 | 'header-line `(:background ,(face-background 'nano-face-subtle))))
387 | (add-hook 'Buffer-menu-mode-hook
388 | #'buffer-menu-mode-header-line)
389 |
390 | ;; ---------------------------------------------------------------------
391 | (defun nano-modeline-completion-list-mode-p ()
392 | (derived-mode-p 'completion-list-mode))
393 |
394 | (defun nano-modeline-completion-list-mode ()
395 | (let ((buffer-name (format-mode-line "%b"))
396 | (mode-name (format-mode-line "%m"))
397 | (position (format-mode-line "%l:%c")))
398 |
399 | (nano-modeline-compose (nano-modeline-status)
400 | buffer-name "" position)))
401 | ;; ---------------------------------------------------------------------
402 | (with-eval-after-load 'deft
403 | (defun deft-print-header ()
404 | (force-mode-line-update)
405 | (widget-insert "\n")))
406 |
407 | (defun nano-modeline-deft-mode-p ()
408 | (derived-mode-p 'deft-mode))
409 |
410 | (defun nano-modeline-deft-mode ()
411 | (let ((prefix " DEFT ")
412 | (primary "Search")
413 | (filter (if deft-filter-regexp
414 | (deft-whole-filter-regexp) ""))
415 | (matches (if deft-filter-regexp
416 | (format "%d matches" (length deft-current-files))
417 | (format "%d notes" (length deft-all-files)))))
418 | (nano-modeline-compose " DEFT "
419 | primary filter matches)))
420 |
421 |
422 | ;; ---------------------------------------------------------------------
423 | (defun nano-modeline-prog-mode-p ()
424 | (derived-mode-p 'prog-mode))
425 |
426 | (defun nano-modeline-text-mode-p ()
427 | (derived-mode-p 'text-mode))
428 |
429 | (defun nano-modeline-default-mode ()
430 | (let ((buffer-name (format-mode-line "%b"))
431 | (mode-name (format-mode-line "%m"))
432 | (branch (vc-branch))
433 | (position (format-mode-line "%l:%c")))
434 | (nano-modeline-compose (nano-modeline-status)
435 | buffer-name
436 | (concat "(" mode-name
437 | (if branch (concat ", "
438 | (propertize branch 'face 'italic)))
439 | ")" )
440 | position)))
441 |
442 | ;; ---------------------------------------------------------------------
443 | (defun nano-modeline-status ()
444 | "Return buffer status: read-only (RO), modified (**) or read-write (RW)"
445 |
446 | (let ((read-only buffer-read-only)
447 | (modified (and buffer-file-name (buffer-modified-p))))
448 | (cond (modified "**") (read-only "RO") (t "RW"))))
449 |
450 | ;; ---------------------------------------------------------------------
451 | (defun nano-modeline-mu4e-context ()
452 | "Return the current mu4e context as a non propertized string."
453 |
454 | (if (> (length (mu4e-context-label)) 0)
455 | (concat "(" (substring-no-properties (mu4e-context-label) 1 -1) ")")
456 | "(none)"))
457 |
458 | ;; ---------------------------------------------------------------------
459 | (defun nano-modeline ()
460 | "Install a header line whose content is dependend on the major mode"
461 | (interactive)
462 | (setq-default header-line-format
463 | '((:eval
464 | (cond ((nano-modeline-prog-mode-p) (nano-modeline-default-mode))
465 | ((nano-modeline-message-mode-p) (nano-modeline-message-mode))
466 | ((nano-modeline-elfeed-search-mode-p) (nano-modeline-elfeed-search-mode))
467 | ((nano-modeline-elfeed-show-mode-p) (nano-modeline-elfeed-show-mode))
468 | ((nano-modeline-deft-mode-p) (nano-modeline-deft-mode))
469 | ((nano-modeline-info-mode-p) (nano-modeline-info-mode))
470 | ((nano-modeline-calendar-mode-p) (nano-modeline-calendar-mode))
471 | ((nano-modeline-org-capture-mode-p) (nano-modeline-org-capture-mode))
472 | ((nano-modeline-org-agenda-mode-p) (nano-modeline-org-agenda-mode))
473 | ((nano-modeline-org-clock-mode-p) (nano-modeline-org-clock-mode))
474 | ((nano-modeline-term-mode-p) (nano-modeline-term-mode))
475 | ((nano-modeline-vterm-mode-p) (nano-modeline-term-mode))
476 | ((nano-modeline-mu4e-dashboard-mode-p) (nano-modeline-mu4e-dashboard-mode))
477 | ((nano-modeline-mu4e-main-mode-p) (nano-modeline-mu4e-main-mode))
478 | ((nano-modeline-mu4e-headers-mode-p) (nano-modeline-mu4e-headers-mode))
479 | ;; ((nano-modeline-mu4e-view-mode-p) (nano-modeline-mu4e-view-mode))
480 | ((nano-modeline-text-mode-p) (nano-modeline-default-mode))
481 | ((nano-modeline-pdf-view-mode-p) (nano-modeline-pdf-view-mode))
482 | ((nano-modeline-docview-mode-p) (nano-modeline-docview-mode))
483 | ((nano-modeline-completion-list-mode-p) (nano-modeline-completion-list-mode))
484 | ((nano-modeline-nano-help-mode-p) (nano-modeline-nano-help-mode))
485 | (t (nano-modeline-default-mode)))))))
486 |
487 | ;; ---------------------------------------------------------------------
488 | (defun nano-modeline-update-windows ()
489 | "Modify the mode line depending on the presence of a window below."
490 |
491 | (dolist (window (window-list))
492 | (with-selected-window window
493 | (if (or (one-window-p t)
494 | (eq (window-in-direction 'below) (minibuffer-window))
495 | (not (window-in-direction 'below)))
496 | (with-current-buffer (window-buffer window)
497 | (setq mode-line-format (list "")))
498 | ;; (setq mode-line-format (list "")))
499 | (with-current-buffer (window-buffer window)
500 | (setq mode-line-format nil)))
501 | (if (window-in-direction 'above)
502 | (face-remap-add-relative 'header-line '(:overline "#98A5B3"))
503 | (face-remap-add-relative 'header-line '(:overline nil)))
504 | )))
505 | (add-hook 'window-configuration-change-hook 'nano-modeline-update-windows)
506 |
507 | (setq eshell-status-in-modeline nil)
508 | ;; (setq-default mode-line-format (list "%-"))
509 | (setq-default mode-line-format "")
510 | (nano-modeline)
511 |
512 | (provide 'nano-modeline)
513 |
--------------------------------------------------------------------------------
/nano-theme-dark.el:
--------------------------------------------------------------------------------
1 | ;; ---------------------------------------------------------------------
2 | ;; GNU Emacs / N Λ N O - Emacs made simple
3 | ;; Copyright (C) 2020 - N Λ N O developers
4 | ;;
5 | ;; This program is free software; you can redistribute it and/or modify
6 | ;; it under the terms of the GNU General Public License as published by
7 | ;; the Free Software Foundation, either version 3 of the License, or
8 | ;; (at your option) any later version.
9 | ;;
10 | ;; This program is distributed in the hope that it will be useful,
11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | ;; GNU General Public License for more details.
14 | ;;
15 | ;; You should have received a copy of the GNU General Public License
16 | ;; along with this program. If not, see .
17 | ;; ---------------------------------------------------------------------
18 | (require 'nano-base-colors)
19 |
20 | (defun nano-theme-set-dark ()
21 | "Apply dark Nano theme base."
22 | ;; Colors from Nord theme at https://www.nordtheme.com
23 | (setq frame-background-mode 'dark)
24 | (setq nano-color-foreground "#c2c5c8") ;; Snow Storm 3 / nord 6
25 | (setq nano-color-background "#425057") ;; Polar Night 0 / nord 0
26 | (setq nano-color-highlight "#92A0A9") ;; Polar Night 1 / nord 1
27 | (setq nano-color-critical "#AB9D27") ;; Aurora / nord 11
28 | (setq nano-color-salient "#98A5B3") ;; Frost / nord 9
29 | (setq nano-color-strong "#B2BAC2") ;; Snow Storm 3 / nord 6
30 | (setq nano-color-popout "#5E857F") ;; Aurora / nord 12
31 | (setq nano-color-subtle "#4B5C63") ;; Polar Night 2 / nord 2
32 | (setq nano-color-faded "#718591") ;;
33 | )
34 |
35 | (nano-theme-set-dark)
36 |
37 | (provide 'nano-theme-dark)
38 |
--------------------------------------------------------------------------------
/nano-theme-light.el:
--------------------------------------------------------------------------------
1 | ;; ---------------------------------------------------------------------
2 | ;; GNU Emacs / N Λ N O - Emacs made simple
3 | ;; Copyright (C) 2020 - N Λ N O developers
4 | ;;
5 | ;; This program is free software; you can redistribute it and/or modify
6 | ;; it under the terms of the GNU General Public License as published by
7 | ;; the Free Software Foundation, either version 3 of the License, or
8 | ;; (at your option) any later version.
9 | ;;
10 | ;; This program is distributed in the hope that it will be useful,
11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | ;; GNU General Public License for more details.
14 | ;;
15 | ;; You should have received a copy of the GNU General Public License
16 | ;; along with this program. If not, see .
17 | ;; ---------------------------------------------------------------------
18 |
19 | (require 'nano-base-colors)
20 | (defun nano-theme-set-light ()
21 | "Apply light Nano theme base."
22 | (setq frame-background-mode 'light )
23 | (setq nano-color-foreground dn-foreground)
24 | (setq nano-color-background dn-background)
25 | (setq nano-color-highlight dn-highlight )
26 | (setq nano-color-critical dn-attention )
27 | (setq nano-color-salient dn-salient )
28 | (setq nano-color-strong dn-strong )
29 | (setq nano-color-popout dn-popout )
30 | (setq nano-color-subtle dn-subtle )
31 | (setq nano-color-faded dn-faded ))
32 |
33 | (nano-theme-set-light)
34 |
35 | (provide 'nano-theme-light)
36 |
--------------------------------------------------------------------------------
/nano-theme.el:
--------------------------------------------------------------------------------
1 | ;;; nano-theme --- Face settings for nano-emacs
2 | ;;; License:
3 | ;; ---------------------------------------------------------------------
4 | ;; GNU Emacs / N Λ N O - Emacs made simple
5 | ;; Copyright (C) 2020 - N Λ N O developers
6 | ;;
7 | ;; This program is free software; you can redistribute it and/or modify
8 | ;; it under the terms of the GNU General Public License as published by
9 | ;; the Free Software Foundation, either version 3 of the License, or
10 | ;; (at your option) any later version.
11 | ;;
12 | ;; This program is distributed in the hope that it will be useful,
13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | ;; GNU General Public License for more details.
16 | ;;
17 | ;; You should have received a copy of the GNU General Public License
18 | ;; along with this program. If not, see .
19 | ;; ---------------------------------------------------------------------
20 | ;;; Commentary:
21 | ;;
22 | ;; This file derives all faces in various modes from the fundamental faces
23 | ;; defined in nano-faces.
24 | ;;
25 | ;; Notable exceptions:
26 | ;; - The highlight-line face uses a very light color.
27 | ;; - The terminal faces use a palette derived from material theme.
28 | ;; that uses a very light color,
29 | ;;
30 | ;; ---------------------------------------------------------------------
31 | ;;; Code:
32 |
33 | (require 'nano-faces)
34 |
35 | ;; When we set a face, we take care of removing any previous settings
36 | (defun set-face (face style)
37 | "Reset FACE and make it inherit STYLE."
38 | (set-face-attribute face nil
39 | :foreground 'unspecified :background 'unspecified
40 | :family 'unspecified :slant 'unspecified
41 | :weight 'unspecified :height 'unspecified
42 | :underline 'unspecified :overline 'unspecified
43 | :box 'unspecified :inherit style))
44 |
45 |
46 | (defun nano-theme--basics ()
47 | "Derive basic Emacs faces from nano-faces and nano-color-theme."
48 |
49 | (set-foreground-color nano-color-foreground)
50 | (set-background-color nano-color-background)
51 |
52 | ;; XXX the following seems to be a no-op, should it be removed?
53 | (set-face-attribute 'default nil
54 | :foreground (face-foreground 'default)
55 | :background (face-background 'default))
56 |
57 | (if (display-graphic-p)
58 | (set-face-attribute 'bold nil :weight 'regular)
59 | (set-face-attribute 'bold nil :weight 'bold))
60 |
61 | ;; Structural
62 | (set-face 'bold 'nano-face-strong)
63 | (set-face 'italic 'nano-face-faded)
64 | (set-face 'bold-italic 'nano-face-strong)
65 | (set-face 'region 'nano-face-subtle)
66 | (set-face 'highlight 'nano-face-subtle)
67 | ;;(set-face 'fixed-pitch 'default)
68 | (set-face 'fixed-pitch-serif 'nano-face-default)
69 | (set-face 'variable-pitch 'nano-face-default)
70 | ; (set-face 'cursor 'nano-face-default)
71 |
72 | ; (set-face-attribute 'cursor nil
73 | ; :background (face-foreground 'nano-face-default))
74 | (set-face-attribute 'window-divider nil
75 | :foreground (face-background 'nano-face-default))
76 | (set-face-attribute 'window-divider-first-pixel nil
77 | :foreground nano-color-background)
78 | ;; :foreground (face-background 'nano-face-subtle))
79 | (set-face-attribute 'window-divider-last-pixel nil
80 | :foreground nano-color-background)
81 | ;; :foreground (face-background 'nano-face-subtle)))
82 | (set-face-foreground 'vertical-border nano-color-subtle)
83 |
84 | ;; Semantic
85 | (set-face 'shadow 'nano-face-faded)
86 | (set-face 'success 'nano-face-salient)
87 | (set-face 'warning 'nano-face-popout)
88 | (set-face 'error 'nano-face-critical)
89 | (set-face 'match 'nano-face-popout)
90 |
91 | ;; General
92 | (set-face 'buffer-menu-buffer 'nano-face-strong)
93 | (set-face 'minibuffer-prompt 'nano-face-strong)
94 | (set-face 'link 'nano-face-salient)
95 | (set-face 'fringe 'nano-face-faded)
96 | (set-face-attribute 'fringe nil
97 | :foreground (face-background 'nano-face-subtle)
98 | :background (face-background 'default))
99 | (set-face 'isearch 'nano-face-strong)
100 | (set-face 'isearch-fail 'nano-face-faded)
101 | (set-face 'lazy-highlight 'nano-face-subtle)
102 | (set-face 'trailing-whitespace 'nano-face-subtle)
103 | (set-face 'show-paren-match 'nano-face-popout)
104 | (set-face 'show-paren-mismatch 'face-normal)
105 | (set-face-attribute 'tooltip nil :height 0.85)
106 | (set-face 'secondary-selection 'nano-face-subtle)
107 | (set-face 'completions-common-part 'nano-face-faded)
108 | (set-face 'completions-first-difference 'nano-face-default))
109 | (defun nano-theme--font-lock ()
110 | "Derive font-lock faces from nano-faces."
111 | (set-face 'font-lock-comment-face 'nano-face-faded)
112 | (set-face 'font-lock-doc-face 'nano-face-faded)
113 | (set-face 'font-lock-string-face 'nano-face-popout)
114 | (set-face 'font-lock-constant-face 'nano-face-salient)
115 | (set-face 'font-lock-warning-face 'nano-face-popout)
116 | (set-face 'font-lock-function-name-face 'nano-face-strong)
117 | (set-face 'font-lock-variable-name-face 'nano-face-strong)
118 | (set-face 'font-lock-builtin-face 'nano-face-salient)
119 | (set-face 'font-lock-type-face 'nano-face-salient)
120 | (set-face 'font-lock-keyword-face 'nano-face-salient))
121 |
122 |
123 | (defun nano-theme--mode-line ()
124 | "Derive mode-line and header-line faces from nano-faces."
125 | (set-face-attribute 'mode-line nil
126 | :height 0.1
127 | :foreground (face-background 'nano-face-default)
128 | :background (face-background 'nano-face-default)
129 | :underline (face-background 'nano-face-subtle)
130 | :overline nil
131 | :box nil)
132 | (set-face-attribute 'mode-line-inactive nil
133 | :height 0.1
134 | :foreground (face-background 'nano-face-default)
135 | :background (face-background 'nano-face-default)
136 | :underline (face-background 'nano-face-subtle)
137 | :overline nil
138 | :inherit nil
139 | :box nil)
140 | ;;(when (display-graphic-p)
141 | (set-face-attribute 'header-line nil
142 | :weight 'light
143 | :foreground (face-foreground 'nano-face-default)
144 | :background (face-background 'nano-face-default)
145 |
146 | :overline nil
147 | :underline nil
148 | :box nil
149 | :box `(:line-width 1
150 | :color ,(face-background 'nano-face-default)
151 | :style nil)
152 | :inherit nil)
153 |
154 | ;; (when (not (display-graphic-p))
155 | ;; (set-face-attribute 'header-line nil
156 | ;; :weight 'light
157 | ;; :foreground (face-foreground 'nano-face-default)
158 | ;; :background (face-background 'nano-face-subtle)
159 | ;; :inverse-video t
160 | ;; :overline nil
161 | ;; :underline nil
162 | ;; :box nil
163 | ;; :inherit nil))
164 |
165 | ;; (set-face-attribute 'internal-border nil
166 | ;; :background (face-foreground 'nano-face-default))
167 |
168 | (set-face-attribute 'internal-border nil
169 | :background (face-background 'nano-face-default)))
170 |
171 |
172 | (defun nano-theme--minibuffer ()
173 | "Derive minibuffer / echo area faces from nano faces."
174 | ;; Minibuffer / echo area
175 | (dolist (buffer (list " *Minibuf-0*" " *Echo Area 0*"
176 | " *Minibuf-1*" " *Echo Area 1*"))
177 | (when (get-buffer buffer)
178 | (with-current-buffer buffer
179 | (face-remap-add-relative 'default 'nano-face-faded)))))
180 |
181 |
182 | ;(defun nano-theme--hl-line ()
183 | ; "Derive hl-line faces from nano faces."
184 | ; (with-eval-after-load 'hl-line
185 | ; (set-face-attribute 'hl-line nil
186 | ; :background nano-color-highlight)))
187 |
188 |
189 |
190 | (defun nano-theme--buttons ()
191 | "Derive button faces from nano faces."
192 | ;; Buttons
193 | (with-eval-after-load 'cus-edit
194 | (set-face-attribute 'custom-button nil
195 | :foreground (face-foreground 'nano-face-faded)
196 | :background (face-background 'nano-face-default)
197 | :box `(:line-width 1
198 | :color ,(face-foreground 'nano-face-faded)
199 | :style nil))
200 | (set-face-attribute 'custom-button-mouse nil
201 | ;; :inherit 'custom-button
202 | :foreground (face-foreground 'nano-face-faded)
203 | :background (face-background 'nano-face-subtle)
204 | :box `(:line-width 1
205 | :color ,(face-foreground 'nano-face-faded)
206 | :style nil))
207 | (set-face-attribute 'custom-button-pressed nil
208 | :foreground (face-background 'default)
209 | :background (face-foreground 'nano-face-salient)
210 | :inherit 'nano-face-salient
211 | :box `(:line-width 1
212 | :color ,(face-foreground 'nano-face-salient)
213 | :style nil)
214 | :inverse-video nil)))
215 |
216 |
217 | (defun nano-theme--info ()
218 | "Derive info faces from nano faces."
219 | (with-eval-after-load 'info
220 | (set-face 'info-menu-header 'nano-face-strong)
221 | (set-face 'info-header-node 'nano-face-default)
222 | (set-face 'info-index-match 'nano-face-salient)
223 | (set-face 'Info-quoted 'nano-face-faded)
224 | (set-face 'info-title-1 'nano-face-strong)
225 | (set-face 'info-title-2 'nano-face-strong)
226 | (set-face 'info-title-3 'nano-face-strong)
227 | (set-face 'info-title-4 'nano-face-strong)))
228 |
229 |
230 | (defun nano-theme--speedbar ()
231 | "Derive speedbar faces from nano faces "
232 | (with-eval-after-load 'speedbar
233 | (set-face 'speedbar-button-face 'nano-face-faded)
234 | (set-face 'speedbar-directory-face 'nano-face-strong)
235 | (set-face 'speedbar-file-face 'nano-face-default)
236 | (set-face 'speedbar-highlight-face 'nano-face-highlight)
237 | (set-face 'speedbar-selected-face 'nano-face-subtle)
238 | (set-face 'speedbar-separator-face 'nano-face-faded)
239 | (set-face 'speedbar-tag-face 'nano-face-faded)))
240 |
241 |
242 | (defun nano-theme--bookmark ()
243 | "Derive bookmark faces from nano faces."
244 | (with-eval-after-load 'bookmark
245 | (set-face 'bookmark-menu-heading 'nano-face-strong)
246 | (set-face 'bookmark-menu-bookmark 'nano-face-salient)))
247 |
248 |
249 | (defun nano-theme--message ()
250 | "Derive message faces from nano faces."
251 | (with-eval-after-load 'message
252 | (unless (version< emacs-version "27.0")
253 | (set-face 'message-cited-text-1 'nano-face-faded)
254 | (set-face 'message-cited-text-2 'nano-face-faded)
255 | (set-face 'message-cited-text-3 'nano-face-faded)
256 | (set-face 'message-cited-text-4 'nano-face-faded))
257 | (set-face 'message-cited-text 'nano-face-faded)
258 | (set-face 'message-header-cc 'nano-face-default)
259 | (set-face 'message-header-name 'nano-face-strong)
260 | (set-face 'message-header-newsgroups 'nano-face-default)
261 | (set-face 'message-header-other 'nano-face-default)
262 | (set-face 'message-header-subject 'nano-face-salient)
263 | (set-face 'message-header-to 'nano-face-salient)
264 | (set-face 'message-header-xheader 'nano-face-default)
265 | (set-face 'message-mml 'nano-face-popout)
266 | (set-face 'message-separator 'nano-face-faded)))
267 |
268 |
269 | (defun nano-theme--outline ()
270 | "Derive outline faces from nano faces."
271 | (with-eval-after-load 'outline
272 | (set-face 'outline-1 'nano-face-strong)
273 | (set-face 'outline-2 'nano-face-strong)
274 | (set-face 'outline-3 'nano-face-strong)
275 | (set-face 'outline-4 'nano-face-strong)
276 | (set-face 'outline-5 'nano-face-strong)
277 | (set-face 'outline-6 'nano-face-strong)
278 | (set-face 'outline-7 'nano-face-strong)
279 | (set-face 'outline-8 'nano-face-strong)))
280 |
281 |
282 | (defun nano-theme--customize ()
283 | "Derive customize faces from nano faces."
284 | (with-eval-after-load 'cus-edit
285 | (set-face 'widget-field 'nano-face-subtle)
286 | (set-face 'widget-button 'nano-face-strong)
287 | (set-face 'widget-single-line-field 'nano-face-subtle)
288 | (set-face 'custom-group-subtitle 'nano-face-strong)
289 | (set-face 'custom-group-tag 'nano-face-strong)
290 | (set-face 'custom-group-tag-1 'nano-face-strong)
291 | (set-face 'custom-comment 'nano-face-faded)
292 | (set-face 'custom-comment-tag 'nano-face-faded)
293 | (set-face 'custom-changed 'nano-face-salient)
294 | (set-face 'custom-modified 'nano-face-salient)
295 | (set-face 'custom-face-tag 'nano-face-strong)
296 | (set-face 'custom-variable-tag 'nano-face-default)
297 | (set-face 'custom-invalid 'nano-face-popout)
298 | (set-face 'custom-visibility 'nano-face-salient)
299 | (set-face 'custom-state 'nano-face-salient)
300 | (set-face 'custom-link 'nano-face-salient)))
301 |
302 | (defun nano-theme--package ()
303 | "Derive package faces from nano faces."
304 | (with-eval-after-load 'package
305 | (set-face 'package-description 'nano-face-default)
306 | (set-face 'package-help-section-name 'nano-face-default)
307 | (set-face 'package-name 'nano-face-salient)
308 | (set-face 'package-status-avail-obso 'nano-face-faded)
309 | (set-face 'package-status-available 'nano-face-default)
310 | (set-face 'package-status-built-in 'nano-face-salient)
311 | (set-face 'package-status-dependency 'nano-face-salient)
312 | (set-face 'package-status-disabled 'nano-face-faded)
313 | (set-face 'package-status-external 'nano-face-default)
314 | (set-face 'package-status-held 'nano-face-default)
315 | (set-face 'package-status-incompat 'nano-face-faded)
316 | (set-face 'package-status-installed 'nano-face-salient)
317 | (set-face 'package-status-new 'nano-face-default)
318 | (set-face 'package-status-unsigned 'nano-face-default))
319 |
320 | ;; Button face is hardcoded, we have to redefine the relevant
321 | ;; function
322 | (defun package-make-button (text &rest properties)
323 | "Insert button labeled TEXT with button PROPERTIES at point.
324 | PROPERTIES are passed to `insert-text-button', for which this
325 | function is a convenience wrapper used by `describe-package-1'."
326 | (let ((button-text (if (display-graphic-p)
327 | text (concat "[" text "]")))
328 | (button-face (if (display-graphic-p)
329 | `(:box `(:line-width 1
330 | :color ,nano-color-subtle
331 | :style nil)
332 | :foreground ,nano-color-faded
333 | :background ,nano-color-subtle)
334 | 'link)))
335 | (apply #'insert-text-button button-text
336 | 'face button-face 'follow-link t properties))))
337 |
338 |
339 | (defun nano-theme--flyspell ()
340 | "Derive flyspell faces from nano faces."
341 | (with-eval-after-load 'flyspell
342 | (set-face 'flyspell-duplicate 'nano-face-popout)
343 | (set-face 'flyspell-incorrect 'nano-face-popout)))
344 |
345 |
346 | (defun nano-theme--ido ()
347 | "Derive ido faces from nano faces."
348 | (with-eval-after-load 'ido
349 | (set-face 'ido-first-match 'nano-face-salient)
350 | (set-face 'ido-only-match 'nano-face-faded)
351 | (set-face 'ido-subdir 'nano-face-strong)))
352 |
353 |
354 | (defun nano-theme--diff ()
355 | "Derive diff faces from nano faces."
356 | (with-eval-after-load 'diff-mode
357 | (set-face 'diff-header 'nano-face-faded)
358 | (set-face 'diff-file-header 'nano-face-strong)
359 | (set-face 'diff-context 'nano-face-default)
360 | (set-face 'diff-removed 'nano-face-faded)
361 | (set-face 'diff-changed 'nano-face-popout)
362 | (set-face 'diff-added 'nano-face-salient)
363 | (set-face 'diff-refine-added '(nano-face-salient
364 | nano-face-strong))
365 | (set-face 'diff-refine-changed 'nano-face-popout)
366 | (set-face 'diff-refine-removed 'nano-face-faded)
367 | (set-face-attribute 'diff-refine-removed nil :strike-through t)))
368 |
369 |
370 | (defun nano-theme--term ()
371 | "Derive term faces from nano faces, and material theme colors."
372 | (with-eval-after-load 'term
373 | ;; (setq eterm-256color-disable-bold nil)
374 | (set-face 'term-bold 'nano-face-strong)
375 | (set-face-attribute 'term-color-black nil
376 | :foreground (face-foreground 'nano-face-default)
377 | :background (face-foreground 'nano-face-default))
378 | (set-face-attribute 'term-color-white nil
379 | :foreground (face-background 'nano-face-default)
380 | :background (face-background 'nano-face-default))
381 | (set-face-attribute 'term-color-blue nil
382 | :foreground "#42A5F5" ;; material color blue L400
383 | :background "#BBDEFB") ;; material color blue L100
384 | (set-face-attribute 'term-color-cyan nil
385 | :foreground "#26C6DA" ;; material color cyan L400
386 | :background "#B2EBF2") ;; material color cyan L100
387 | (set-face-attribute 'term-color-green nil
388 | :foreground "#66BB6A" ;; material color green L400
389 | :background "#C8E6C9") ;; material color green L100
390 | (set-face-attribute 'term-color-magenta nil
391 | :foreground "#AB47BC" ;; material color purple L400
392 | :background "#E1BEE7") ;; material color purple L100
393 | (set-face-attribute 'term-color-red nil
394 | :foreground "#EF5350" ;; material color red L400
395 | :background "#FFCDD2") ;; material color red L100
396 | (set-face-attribute 'term-color-yellow nil
397 | :foreground "#FFEE58" ;; material color yellow L400
398 | :background "#FFF9C4"))) ;; material color yellow L100
399 |
400 |
401 | (defun nano-theme--calendar ()
402 | "Derive calendar faces from nano faces."
403 | (with-eval-after-load 'calendar
404 | (set-face 'calendar-today 'nano-face-strong)))
405 |
406 |
407 | (defun nano-theme--agenda ()
408 | "Derive agenda faces from nano faces."
409 | (with-eval-after-load 'org-agenda
410 | (set-face 'org-agenda-calendar-event 'nano-face-default)
411 | (set-face 'org-agenda-calendar-sexp 'nano-face-salient)
412 | (set-face 'org-agenda-clocking 'nano-face-faded)
413 | (set-face 'org-agenda-column-dateline 'nano-face-faded)
414 | (set-face 'org-agenda-current-time 'nano-face-strong)
415 | (set-face 'org-agenda-date 'nano-face-salient)
416 | (set-face 'org-agenda-date-today '(nano-face-salient
417 | nano-face-strong))
418 | (set-face 'org-agenda-date-weekend 'nano-face-faded)
419 | (set-face 'org-agenda-diary 'nano-face-faded)
420 | (set-face 'org-agenda-dimmed-todo-face 'nano-face-faded)
421 | (set-face 'org-agenda-done 'nano-face-faded)
422 | (set-face 'org-agenda-filter-category 'nano-face-faded)
423 | (set-face 'org-agenda-filter-effort 'nano-face-faded)
424 | (set-face 'org-agenda-filter-regexp 'nano-face-faded)
425 | (set-face 'org-agenda-filter-tags 'nano-face-faded)
426 | ;; (set-face 'org-agenda-property-face 'nano-face-faded)
427 | (set-face 'org-agenda-restriction-lock 'nano-face-faded)
428 | (set-face 'org-agenda-structure 'nano-face-strong)))
429 |
430 |
431 | (defun nano-theme--org ()
432 | "Derive org faces from nano faces."
433 | (with-eval-after-load 'org
434 | (set-face 'org-archived 'nano-face-faded)
435 |
436 | ; (set-face 'org-block 'hl-line)
437 | (set-face 'org-block-begin-line 'nano-face-faded)
438 | (set-face 'org-block-end-line 'nano-face-faded)
439 | (unless (version< emacs-version "27.0")
440 | (set-face-attribute 'org-block nil :extend t)
441 | (set-face-attribute 'org-block-begin-line nil :extend t)
442 | (set-face-attribute 'org-block-end-line nil :extend t))
443 |
444 | (set-face 'org-checkbox 'nano-face-faded)
445 | (set-face 'org-checkbox-statistics-done 'nano-face-faded)
446 | (set-face 'org-checkbox-statistics-todo 'nano-face-faded)
447 | (set-face 'org-clock-overlay 'nano-face-faded)
448 | (set-face 'org-code 'nano-face-faded)
449 | (set-face 'org-column 'nano-face-faded)
450 | (set-face 'org-column-title 'nano-face-faded)
451 | (set-face 'org-date 'nano-face-faded)
452 | (set-face 'org-date-selected 'nano-face-faded)
453 | (set-face 'org-default 'nano-face-faded)
454 | (set-face 'org-document-info 'nano-face-faded)
455 | (set-face 'org-document-info-keyword 'nano-face-faded)
456 | (set-face 'org-document-title 'nano-face-faded)
457 | (set-face 'org-done 'nano-face-default)
458 | (set-face 'org-drawer 'nano-face-faded)
459 | (set-face 'org-ellipsis 'nano-face-faded)
460 | (set-face 'org-footnote 'nano-face-faded)
461 | (set-face 'org-formula 'nano-face-faded)
462 | (set-face 'org-headline-done 'nano-face-faded)
463 | ;; (set-face 'org-hide 'nano-face-faded)
464 | ;; (set-face 'org-indent 'nano-face-faded)
465 | (set-face 'org-latex-and-related 'nano-face-faded)
466 | (set-face 'org-level-1 'nano-face-strong)
467 | (set-face 'org-level-2 'nano-face-strong)
468 | (set-face 'org-level-3 'nano-face-strong)
469 | (set-face 'org-level-4 'nano-face-strong)
470 | (set-face 'org-level-5 'nano-face-strong)
471 | (set-face 'org-level-6 'nano-face-strong)
472 | (set-face 'org-level-7 'nano-face-strong)
473 | (set-face 'org-level-8 'nano-face-strong)
474 | (set-face 'org-link 'nano-face-salient)
475 | (set-face 'org-list-dt 'nano-face-faded)
476 | (set-face 'org-macro 'nano-face-faded)
477 | (set-face 'org-meta-line 'nano-face-faded)
478 | (set-face 'org-mode-line-clock 'nano-face-faded)
479 | (set-face 'org-mode-line-clock-overrun 'nano-face-faded)
480 | (set-face 'org-priority 'nano-face-faded)
481 | (set-face 'org-property-value 'nano-face-faded)
482 | (set-face 'org-quote 'nano-face-faded)
483 | (set-face 'org-scheduled 'nano-face-faded)
484 | (set-face 'org-scheduled-previously 'nano-face-faded)
485 | (set-face 'org-scheduled-today 'nano-face-faded)
486 | (set-face 'org-sexp-date 'nano-face-faded)
487 | (set-face 'org-special-keyword 'nano-face-faded)
488 | (set-face 'org-table 'nano-face-faded)
489 | (set-face 'org-tag 'nano-face-faded)
490 | (set-face 'org-tag-group 'nano-face-faded)
491 | (set-face 'org-target 'nano-face-faded)
492 | (set-face 'org-time-grid 'nano-face-faded)
493 | (set-face 'org-todo 'nano-face-salient)
494 | (set-face 'org-upcoming-deadline 'nano-face-faded)
495 | (set-face 'org-verbatim 'nano-face-popout)
496 | (set-face 'org-verse 'nano-face-faded)
497 | (set-face 'org-warning 'nano-face-popout)))
498 |
499 |
500 | (defun nano-theme--mu4e ()
501 | "Derive mu4e faces from nano faces."
502 | (with-eval-after-load 'mu4e
503 | (set-face 'mu4e-attach-number-face 'nano-face-strong)
504 | (set-face 'mu4e-cited-1-face 'nano-face-faded)
505 | (set-face 'mu4e-cited-2-face 'nano-face-faded)
506 | (set-face 'mu4e-cited-3-face 'nano-face-faded)
507 | (set-face 'mu4e-cited-4-face 'nano-face-faded)
508 | (set-face 'mu4e-cited-5-face 'nano-face-faded)
509 | (set-face 'mu4e-cited-6-face 'nano-face-faded)
510 | (set-face 'mu4e-cited-7-face 'nano-face-faded)
511 | (set-face 'mu4e-compose-header-face 'nano-face-faded)
512 | (set-face 'mu4e-compose-separator-face 'nano-face-faded)
513 | (set-face 'mu4e-contact-face 'nano-face-salient)
514 | (set-face 'mu4e-context-face 'nano-face-faded)
515 | (set-face 'mu4e-draft-face 'nano-face-faded)
516 | (set-face 'mu4e-flagged-face 'nano-face-popout)
517 | (set-face 'mu4e-footer-face 'nano-face-faded)
518 | (set-face 'mu4e-forwarded-face 'nano-face-faded)
519 | (set-face 'mu4e-header-face 'nano-face-default)
520 | (set-face 'mu4e-header-key-face 'nano-face-strong)
521 | (set-face 'mu4e-header-marks-face 'nano-face-faded)
522 | (set-face 'mu4e-header-title-face 'nano-face-strong)
523 | (set-face 'mu4e-header-value-face 'nano-face-default)
524 | (set-face 'mu4e-highlight-face 'nano-face-popout)
525 | (set-face 'mu4e-link-face 'nano-face-salient)
526 | (set-face 'mu4e-modeline-face 'nano-face-faded)
527 | (set-face 'mu4e-moved-face 'nano-face-faded)
528 | (set-face 'mu4e-ok-face 'nano-face-faded)
529 | (set-face 'mu4e-region-code 'nano-face-faded)
530 | (set-face 'mu4e-replied-face 'nano-face-default)
531 | (set-face 'mu4e-special-header-value-face 'nano-face-default)
532 | (set-face 'mu4e-system-face 'nano-face-faded)
533 | (set-face 'mu4e-title-face 'nano-face-strong)
534 | (set-face 'mu4e-trashed-face 'nano-face-faded)
535 | (set-face 'mu4e-unread-face 'nano-face-strong)
536 | (set-face 'mu4e-url-number-face 'nano-face-faded)
537 | (set-face 'mu4e-view-body-face 'nano-face-default)
538 | (set-face 'mu4e-warning-face 'nano-face-popout)))
539 |
540 |
541 | (defun nano-theme--elfeed ()
542 | "Derive elfeed faces from nano faces."
543 | (with-eval-after-load 'elfeed
544 | (set-face 'elfeed-log-date-face 'nano-face-faded)
545 | (set-face 'elfeed-log-info-level-face 'nano-face-default)
546 | (set-face 'elfeed-log-debug-level-face 'nano-face-default)
547 | (set-face 'elfeed-log-warn-level-face 'nano-face-popout)
548 | (set-face 'elfeed-log-error-level-face 'nano-face-popout)
549 | (set-face 'elfeed-search-tag-face 'nano-face-faded)
550 | (set-face 'elfeed-search-date-face 'nano-face-faded)
551 | (set-face 'elfeed-search-feed-face 'nano-face-salient)
552 | (set-face 'elfeed-search-filter-face 'nano-face-faded)
553 | (set-face 'elfeed-search-last-update-face 'nano-face-salient)
554 | (set-face 'elfeed-search-title-face 'nano-face-default)
555 | (set-face 'elfeed-search-tag-face 'nano-face-faded)
556 | (set-face 'elfeed-search-unread-count-face 'nano-face-strong)
557 | (set-face 'elfeed-search-unread-title-face 'nano-face-strong)))
558 |
559 | (defun nano-theme--deft ()
560 | "Derive deft faces from nano faces."
561 | (with-eval-after-load 'deft
562 | (set-face 'deft-filter-string-error-face 'nano-face-popout)
563 | (set-face 'deft-filter-string-face 'nano-face-default)
564 | (set-face 'deft-header-face 'nano-face-salient)
565 | (set-face 'deft-separator-face 'nano-face-faded)
566 | (set-face 'deft-summary-face 'nano-face-faded)
567 | (set-face 'deft-time-face 'nano-face-salient)
568 | (set-face 'deft-title-face 'nano-face-strong)))
569 |
570 | (defun nano-theme--rst ()
571 | "Derive rst faces from nano faces."
572 | (with-eval-after-load 'rst
573 | (set-face 'rst-adornment 'nano-face-faded)
574 | (set-face 'rst-block 'nano-face-default)
575 | (set-face 'rst-comment 'nano-face-faded)
576 | (set-face 'rst-definition 'nano-face-salient)
577 | (set-face 'rst-directive 'nano-face-salient)
578 | (set-face 'rst-emphasis1 'nano-face-faded)
579 | (set-face 'rst-emphasis2 'nano-face-strong)
580 | (set-face 'rst-external 'nano-face-salient)
581 | (set-face 'rst-level-1 'nano-face-strong)
582 | (set-face 'rst-level-2 'nano-face-strong)
583 | (set-face 'rst-level-3 'nano-face-strong)
584 | (set-face 'rst-level-4 'nano-face-strong)
585 | (set-face 'rst-level-5 'nano-face-strong)
586 | (set-face 'rst-level-6 'nano-face-strong)
587 | (set-face 'rst-literal 'nano-face-salient)
588 | (set-face 'rst-reference 'nano-face-salient)
589 | (set-face 'rst-transition 'nano-face-default)))
590 |
591 |
592 | (defun nano-theme--markdown ()
593 | "Derive markdown faces from nano faces."
594 | (with-eval-after-load 'markdown-mode
595 | (set-face 'markdown-blockquote-face 'nano-face-default)
596 | (set-face 'markdown-bold-face 'nano-face-strong)
597 | (set-face 'markdown-code-face 'nano-face-default)
598 | (set-face 'markdown-comment-face 'nano-face-faded)
599 | (set-face 'markdown-footnote-marker-face 'nano-face-default)
600 | (set-face 'markdown-footnote-text-face 'nano-face-default)
601 | (set-face 'markdown-gfm-checkbox-face 'nano-face-default)
602 | (set-face 'markdown-header-delimiter-face 'nano-face-faded)
603 | (set-face 'markdown-header-face 'nano-face-strong)
604 | (set-face 'markdown-header-face-1 'nano-face-strong)
605 | (set-face 'markdown-header-face-2 'nano-face-strong)
606 | (set-face 'markdown-header-face-3 'nano-face-strong)
607 | (set-face 'markdown-header-face-4 'nano-face-strong)
608 | (set-face 'markdown-header-face-5 'nano-face-strong)
609 | (set-face 'markdown-header-face-6 'nano-face-strong)
610 | (set-face 'markdown-header-rule-face 'nano-face-default)
611 | (set-face 'markdown-highlight-face 'nano-face-default)
612 | (set-face 'markdown-hr-face 'nano-face-default)
613 | (set-face 'markdown-html-attr-name-face 'nano-face-default)
614 | (set-face 'markdown-html-attr-value-face 'nano-face-default)
615 | (set-face 'markdown-html-entity-face 'nano-face-default)
616 | (set-face 'markdown-html-tag-delimiter-face 'nano-face-default)
617 | (set-face 'markdown-html-tag-name-face 'nano-face-default)
618 | (set-face 'markdown-inline-code-face 'nano-face-popout)
619 | (set-face 'markdown-italic-face 'nano-face-faded)
620 | (set-face 'markdown-language-info-face 'nano-face-default)
621 | (set-face 'markdown-language-keyword-face 'nano-face-default)
622 | (set-face 'markdown-line-break-face 'nano-face-default)
623 | (set-face 'markdown-link-face 'nano-face-salient)
624 | (set-face 'markdown-link-title-face 'nano-face-default)
625 | (set-face 'markdown-list-face 'nano-face-faded)
626 | (set-face 'markdown-markup-face 'nano-face-faded)
627 | (set-face 'markdown-math-face 'nano-face-default)
628 | (set-face 'markdown-metadata-key-face 'nano-face-faded)
629 | (set-face 'markdown-metadata-value-face 'nano-face-faded)
630 | (set-face 'markdown-missing-link-face 'nano-face-default)
631 | (set-face 'markdown-plain-url-face 'nano-face-default)
632 | (set-face 'markdown-pre-face 'nano-face-default)
633 | (set-face 'markdown-reference-face 'nano-face-salient)
634 | (set-face 'markdown-strike-through-face 'nano-face-faded)
635 | (set-face 'markdown-table-face 'nano-face-default)
636 | (set-face 'markdown-url-face 'nano-face-salient)))
637 |
638 |
639 | (defun nano-theme--ivy ()
640 | "Derive ivy faces from nano faces."
641 | (with-eval-after-load 'ivy
642 | (set-face 'ivy-action 'nano-face-faded)
643 | (set-face 'ivy-completions-annotations 'nano-face-faded)
644 | (set-face 'ivy-confirm-face 'nano-face-faded)
645 | (set-face 'ivy-current-match '(nano-face-strong nano-face-subtle))
646 | (set-face 'ivy-cursor 'nano-face-strong)
647 | (set-face 'ivy-grep-info 'nano-face-strong)
648 | (set-face 'ivy-grep-line-number 'nano-face-faded)
649 | (set-face 'ivy-highlight-face 'nano-face-strong)
650 | (set-face 'ivy-match-required-face 'nano-face-faded)
651 | (set-face 'ivy-minibuffer-match-face-1 'nano-face-faded)
652 | (set-face 'ivy-minibuffer-match-face-2 'nano-face-faded)
653 | (set-face 'ivy-minibuffer-match-face-3 'nano-face-faded)
654 | (set-face 'ivy-minibuffer-match-face-4 'nano-face-faded)
655 | (set-face 'ivy-minibuffer-match-highlight 'nano-face-strong)
656 | (set-face 'ivy-modified-buffer 'nano-face-popout)
657 | (set-face 'ivy-modified-outside-buffer 'nano-face-strong)
658 | (set-face 'ivy-org 'nano-face-faded)
659 | (set-face 'ivy-prompt-match 'nano-face-faded)
660 | (set-face 'ivy-remote 'nano-face-default)
661 | (set-face 'ivy-separator 'nano-face-faded)
662 | (set-face 'ivy-subdir 'nano-face-faded)
663 | (set-face 'ivy-virtual 'nano-face-faded)
664 | (set-face 'ivy-yanked-word 'nano-face-faded)))
665 |
666 | (defun nano-theme--helm ()
667 | "Derive helm faces from nano faces."
668 | (with-eval-after-load 'helm
669 | (set-face 'helm-selection '(nano-face-strong nano-face-subtle))
670 | (set-face 'helm-match 'nano-face-strong)
671 | (set-face 'helm-source-header 'nano-face-salient)
672 | (set-face 'helm-swoop-target-line-face '(nano-face-strong nano-face-subtle))
673 | (set-face 'helm-visible-mark 'nano-face-strong)
674 | (set-face 'helm-moccur-buffer 'nano-face-strong)
675 | (set-face 'helm-ff-file 'nano-face-faded)
676 | (set-face 'helm-ff-prefix 'nano-face-strong)
677 | (set-face 'helm-ff-dotted-directory 'nano-face-faded)
678 | (set-face 'helm-ff-directory 'nano-face-strong)
679 | (set-face 'helm-ff-executable 'nano-face-popout)
680 | (set-face 'helm-grep-match 'nano-face-strong)
681 | (set-face 'helm-grep-file 'nano-face-faded)
682 | (set-face 'helm-grep-lineno 'nano-face-faded)
683 | (set-face 'helm-grep-finish 'nano-face-default)))
684 |
685 | (defun nano-theme--company ()
686 | "Derive company tooltip window from nano faces."
687 | (with-eval-after-load 'company
688 | (set-face 'company-tooltip-selection '(nano-face-strong nano-face-subtle))
689 | (set-face 'company-tooltip 'nano-face-default)
690 | (set-face 'company-scrollbar-fg 'nano-face-faded)
691 | (set-face 'company-scrollbar-bg 'nano-face-default)
692 | (set-face 'company-tooltip-common 'nano-face-default)
693 | (set-face 'company-tooltip-common-selection '(nano-face-strong nano-face-subtle))
694 | (set-face 'company-tooltip-annotation 'nano-face-default)
695 | (set-face 'company-tooltip-annotation-selection '(nano-face-strong nano-face-subtle))))
696 |
697 | (defun nano-theme ()
698 | "Derive many, many faces from the core nano faces."
699 | (nano-theme--basics)
700 | (nano-theme--font-lock)
701 | (nano-theme--mode-line)
702 | (nano-theme--minibuffer)
703 | (nano-theme--buttons)
704 | (nano-theme--info)
705 | (nano-theme--bookmark)
706 | (nano-theme--speedbar)
707 | (nano-theme--message)
708 | (nano-theme--outline)
709 | (nano-theme--customize)
710 | (nano-theme--package)
711 | (nano-theme--flyspell)
712 | (nano-theme--ido)
713 | (nano-theme--diff)
714 | (nano-theme--term)
715 | (nano-theme--calendar)
716 | (nano-theme--agenda)
717 | (nano-theme--org)
718 | (nano-theme--mu4e)
719 | (nano-theme--elfeed)
720 | (nano-theme--deft)
721 | (nano-theme--rst)
722 | (nano-theme--markdown)
723 | (nano-theme--ivy)
724 | (nano-theme--helm)
725 | ; (nano-theme--hl-line)
726 | (nano-theme--company))
727 |
728 | (provide 'nano-theme)
729 |
--------------------------------------------------------------------------------
/screenshots/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyler544/doom-nano-testing/bd7dbb025a5bd75b3bddaab7192e1f8eb6a4fba5/screenshots/1.png
--------------------------------------------------------------------------------
/screenshots/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyler544/doom-nano-testing/bd7dbb025a5bd75b3bddaab7192e1f8eb6a4fba5/screenshots/2.png
--------------------------------------------------------------------------------