Skip to main content

max / alloy

Scaffold repository Initialize the Alloy repo around the existing docs/. - GPLv3-or-later (LICENSE) - CONTRIBUTING.md captures conventions: no emoji, no PRs, Rust 2024, native builds per arch, mono-only typography, color reserved for info - README links the license; docs/todo.md marks the repo-setup item done and splits out branding assets as a follow-up - .gitignore skips docs/inspo/ (third-party screenshots, not ours)
Co-Authored-By
Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-06-26 19:05 UTC
Signed with PGP, not checked
Commit: a855286509b8c3350515a6940c5983eb31e91197
16 files changed, +2086 insertions, -0 deletions
A .gitignore +30
@@ -1,0 +1,30 @@
1 + /target
2 + **/*.rs.bk
3 + Cargo.lock.bak
4 +
5 + # Build/dist outputs
6 + /dist/build/
7 + /dist/*.iso
8 + /dist/*.img
9 + /dist/*.qcow2
10 + /dist/*.tar.zst
11 +
12 + # Environment
13 + .env
14 + .env.*
15 +
16 + # OS
17 + .DS_Store
18 + Thumbs.db
19 +
20 + # Editor
21 + .vscode/
22 + .idea/
23 + *.swp
24 +
25 + # Local-only notes (per CLAUDE.md split: private docs live under _private/)
26 + CLAUDE.md
27 + todo.local.md
28 +
29 + # Inspiration scrape — third-party images, not ours to redistribute
30 + docs/inspo/
@@ -1,0 +1,32 @@
1 + # Contributing to Alloy
2 +
3 + Alloy is currently solo-built by Max Johnson under Make Creative, LLC. External patches are not being accepted yet; this document records the conventions the project follows so the work stays internally consistent.
4 +
5 + ## License
6 +
7 + Alloy is licensed under the GNU General Public License v3.0 or later. See [LICENSE](LICENSE). Code contributed to this repository must be compatible with GPLv3+. Any future code outside this license (vendored dependencies, etc.) must carry compatible terms.
8 +
9 + ## Project state
10 +
11 + Pre-v0. The docs in [`docs/`](docs/) are the project. Code follows. When a design decision changes, edit the relevant doc and let the commit message carry the rationale — no separate changelog.
12 +
13 + ## Conventions
14 +
15 + These mirror the rest of the `~/Code` ecosystem; deviations should be deliberate.
16 +
17 + - **No emoji.** Anywhere. UI copy, commit messages, docs, comments, file names. The only graphic mark Alloy will adopt is its own.
18 + - **No PRs, no issue tracker.** Discussion happens directly. Open questions live in [`docs/todo.md`](docs/todo.md).
19 + - **Rust 2024 edition.** Latest stable. Latest deps; don't pin without a reason recorded in the manifest.
20 + - **Commits:** concise, imperative, no emoji. One logical change per commit when practical.
21 + - **Native builds per architecture.** No cross-compilation.
22 +
23 + ## Code style (when code lands)
24 +
25 + - The egui design-system crate is `alloy_ui`. Token constants and themed widgets live there; downstream apps re-export rather than redefine.
26 + - Tokens are the source of truth for color, type, spacing, and radius. See [`docs/TOKENS.md`](docs/TOKENS.md). No hardcoded color or pixel values in widget code — pull from tokens.
27 + - Prose surfaces stay in the working monospace. Mono-only is part of the brand. See [`docs/TOKENS.md`](docs/TOKENS.md).
28 + - Color is reserved for information. Chrome is tinted-greyscale. See [`docs/DESIGN-LANGUAGE.md`](docs/DESIGN-LANGUAGE.md).
29 +
30 + ## Working notes
31 +
32 + Personal notes, todos, and audit material that aren't part of the public project live outside this repo, under `_private/docs/alloy/` in the author's environment. The `.gitignore` blocks `CLAUDE.md` and `todo.local.md` so those never enter version control.
A LICENSE +500
@@ -1,0 +1,674 @@
1 + GNU GENERAL PUBLIC LICENSE
2 + Version 3, 29 June 2007
3 +
4 + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
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
Lines truncated
A README.md +26
@@ -1,0 +1,26 @@
1 + # Project Alloy
2 +
3 + *An opinionated tiling user layer for Fedora Silverblue.*
4 +
5 + **Project Alloy is to Silverblue what Omarchy is to Arch:** a curated, beautifully-defaulted, keyboard-driven environment that fuses an immutable base, a Wayland tiling compositor, an opinionated app/tool stack, and a project-authored design system into one coherent system. An alloy is stronger than its component metals.
6 +
7 + Short form for slugs, CLI binaries, package names, file extensions: `alloy`.
8 +
9 + ## Status
10 +
11 + Pre-v0. The docs are the project. Code follows.
12 +
13 + ## License
14 +
15 + GPLv3-or-later. See [`LICENSE`](LICENSE) and [`CONTRIBUTING.md`](CONTRIBUTING.md).
16 +
17 + ## Docs
18 +
19 + - [`docs/MANIFESTO.md`](docs/MANIFESTO.md) — what Alloy is, who it's for, the thesis.
20 + - [`docs/STACK.md`](docs/STACK.md) — every pick (base, compositor, bar, lock, launcher, notifications, screenshot, file manager) with reasoning and what was rejected.
21 + - [`docs/MARQUEE-APPS.md`](docs/MARQUEE-APPS.md) — the egui design-system app pipeline.
22 + - [`docs/COMPONENT-LIBRARY.md`](docs/COMPONENT-LIBRARY.md) — `alloy_ui` crate idioms (functions, builders, HOFs, `impl Widget`) and the design-token pipeline.
23 + - [`docs/RESEARCH-IMMEDIATE-MODE-DESIGN.md`](docs/RESEARCH-IMMEDIATE-MODE-DESIGN.md) — late-term research sketch: what does Figma look like for immediate-mode UI? How do designers and engineers collaborate without designers writing Rust?
24 + - [`docs/DESIGN-LANGUAGE.md`](docs/DESIGN-LANGUAGE.md) — tinted-greyscale chrome, color reserved for information.
25 + - [`docs/COSMIC.md`](docs/COSMIC.md) — which System76/COSMIC components Alloy adopts, considers, and skips.
26 + - [`docs/todo.md`](docs/todo.md) — open questions and next steps.
@@ -1,0 +1,214 @@
1 + # Alloy component library
2 +
3 + The intended idioms for the `alloy_ui` crate — the egui design-system library that all marquee Alloy apps depend on.
4 +
5 + ## Scope
6 +
7 + `alloy_ui` exposes:
8 +
9 + - **Design tokens** — palette, typography scale, spacing scale, geometry constants. Single source of truth for everything in [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md).
10 + - **Themed primitives** — buttons, text fields, tags, list rows, focus rings — all configured against the tokens, all carrying mandatory state variants.
11 + - **Layout combinators** — Alloy-flavored wrappers over egui's existing `horizontal` / `vertical` / `scope` HOFs.
12 + - **Composed patterns** — cards, dialog skeletons, form rows — built from the primitives.
13 +
14 + It does *not* expose:
15 +
16 + - Application-level state or logic
17 + - Reactive primitives, signals, observables (would violate principle 3 in [MANIFESTO.md](MANIFESTO.md))
18 + - Hot-reloadable DSL files (we don't have one to reload)
19 +
20 + ## The four idioms
21 +
22 + The "DSL feel" recovers through pure Rust patterns. The crate uses four idioms consistently so authoring across the marquee apps feels uniform.
23 +
24 + ### Functions as components
25 +
26 + The lightest pattern. A component is a function taking `&mut Ui`:
27 +
28 + ```rust
29 + pub fn primary_button(ui: &mut Ui, label: &str) -> Response {
30 + ui.add(
31 + Button::new(label)
32 + .fill(tokens::SURFACE_RAISED)
33 + .stroke(Stroke::new(1.0, tokens::BORDER))
34 + .corner_radius(tokens::RADIUS_CONTROL),
35 + )
36 + }
37 +
38 + // Call site:
39 + if primary_button(ui, "Install").clicked() { install(); }
40 + ```
41 +
42 + Use functions for one-shot widgets that take few arguments and don't need configuration.
43 +
44 + ### Builders for configurable widgets
45 +
46 + For widgets with optional configuration:
47 +
48 + ```rust
49 + pub struct Card<'a> {
50 + title: &'a str,
51 + body: Option<&'a str>,
52 + primary: Option<(&'a str, Box<dyn FnOnce() + 'a>)>,
53 + secondary: Option<(&'a str, Box<dyn FnOnce() + 'a>)>,
54 + }
55 +
56 + impl<'a> Card<'a> {
57 + pub fn new(title: &'a str) -> Self { /* ... */ }
58 + pub fn body(mut self, body: &'a str) -> Self { /* ... */ }
59 + pub fn primary(mut self, label: &'a str, on_click: impl FnOnce() + 'a) -> Self { /* ... */ }
60 + pub fn secondary(mut self, label: &'a str, on_click: impl FnOnce() + 'a) -> Self { /* ... */ }
61 + pub fn show(self, ui: &mut Ui) -> Response { /* ... */ }
62 + }
63 +
64 + // Call site reads DSL-like:
65 + Card::new("Update available")
66 + .body("A layered package is ready.")
67 + .primary("Install", || install())
68 + .secondary("Skip", || skip())
69 + .show(ui);
70 + ```
71 +
72 + ### HOFs for layout and scope
73 +
74 + egui's layout primitives are already HOFs taking closures. Alloy extends with themed wrappers:
75 +
76 + ```rust
77 + pub fn section<R>(ui: &mut Ui, title: &str, content: impl FnOnce(&mut Ui) -> R) -> R {
78 + ui.vertical(|ui| {
79 + ui.add_space(tokens::SPACING_LG);
80 + ui.label(RichText::new(title).font(tokens::FONT_SECTION_HEADER));
81 + ui.add_space(tokens::SPACING_SM);
82 + ui.scope(content).inner
83 + }).inner
84 + }
85 +
86 + // Composes naturally:
87 + alloy_ui::section(ui, "Network", |ui| {
88 + alloy_ui::field_row(ui, "SSID", |ui| {
89 + ui.text_edit_singleline(&mut self.ssid);
90 + });
91 + alloy_ui::field_row(ui, "Password", |ui| {
92 + ui.add(TextEdit::singleline(&mut self.pw).password(true));
93 + });
94 + });
95 + ```
96 +
97 + ### `impl Widget` for shared reusable types
98 +
99 + egui's canonical extension trait. Use for types that have state or that need to participate in `ui.add(...)` chains:
100 +
101 + ```rust
102 + pub struct UrgencyTag { kind: Urgency }
103 +
104 + impl UrgencyTag {
105 + pub fn new(kind: Urgency) -> Self { Self { kind } }
106 + }
107 +
108 + impl Widget for UrgencyTag {
109 + fn ui(self, ui: &mut Ui) -> Response {
110 + let color = match self.kind {
111 + Urgency::Low => tokens::INFO,
112 + Urgency::Medium => tokens::WARN,
113 + Urgency::High => tokens::ERROR,
114 + };
115 + let text = RichText::new(self.kind.label()).color(tokens::TEXT_PRIMARY);
116 + let bg = ui.painter().add(/* rounded rect at `color` */);
117 + let response = ui.add(/* text label */);
118 + ui.painter().set(bg, /* finalized rect */);
119 + response
120 + }
121 + }
122 +
123 + // Call site:
124 + ui.add(UrgencyTag::new(Urgency::High));
125 + ```
126 +
127 + ## Design tokens
128 +
129 + Tokens are the single source of truth. They live in a TOML file at the crate root and are compiled into Rust constants at build time via a `build.rs` step. This is deliberately a one-way pipeline — designers (or design tooling) author the TOML; Rust code consumes the constants.
130 +
131 + Canonical token values (light + dark ramp, accent palette, typography, geometry) are locked in [TOKENS.md](TOKENS.md). The TOML below is illustrative shape; the actual `tokens.toml` is generated from TOKENS.md when the crate is scaffolded.
132 +
133 + ```toml
134 + # alloy_ui/tokens.toml (shape; values per TOKENS.md)
135 + [palette.light]
136 + surface = "oklch(96% 0.012 80)"
137 + surface-raised = "oklch(98% 0.012 80)"
138 + surface-overlay = "oklch(99.5% 0.012 80)"
139 + text-primary = "oklch(18% 0.012 80)"
140 + text-muted = "oklch(55% 0.012 80)"
141 + border = "oklch(80% 0.012 80)"
142 +
143 + [palette.accents]
144 + error = "oklch(55% 0.18 25)"
145 + warn = "oklch(70% 0.15 85)"
146 + healthy = "oklch(62% 0.16 145)"
147 + info = "oklch(60% 0.16 240)"
148 + syntax = "oklch(55% 0.18 310)"
149 +
150 + [typography]
151 + mono = "JetBrains Mono Nerd Font"
152 + size-body = 14
153 + size-section-header = 16
154 + weight-body = 400
155 + weight-heading = 600
156 +
157 + [geometry]
158 + spacing-sm = 4
159 + spacing-md = 8
160 + spacing-lg = 16
161 + radius-control = 4
162 + border-width = 1
163 + ```
164 +
165 + The build step generates `tokens.rs`:
166 +
167 + ```rust
168 + // generated
169 + pub const SURFACE: Color32 = /* parsed OKLCH → sRGB */;
170 + pub const RADIUS_CONTROL: f32 = 4.0;
171 + // ...
172 + ```
173 +
174 + Dark mode is the polarity-flipped derivative of the light ramp — same hue, same chroma, L-stops repositioned to keep elevation ordering intact (raised reads lighter than base in both modes). See [TOKENS.md](TOKENS.md#the-ramp-dark-mode-derived) for the resolved derivation and the locked dark L values.
175 +
176 + ## Per-frame discipline
177 +
178 + The crate exposes a single visual-application function called at the top of every frame:
179 +
180 + ```rust
181 + pub fn apply_alloy_visuals(ctx: &Context, mode: Mode) {
182 + let mut style = (*ctx.style()).clone();
183 + style.visuals = match mode {
184 + Mode::Light => visuals_light(),
185 + Mode::Dark => visuals_dark(),
186 + };
187 + style.spacing = spacing();
188 + style.text_styles = text_styles();
189 + ctx.set_style(style);
190 + }
191 + ```
192 +
193 + Marquee apps call this once per frame at the top of their `update` loop. There is no other path by which Alloy visuals enter an app. The discipline keeps the theming centralized and prevents per-app drift.
194 +
195 + ## What this enforces
196 +
197 + - Every Alloy app looks coherent because they all consume the same tokens and the same primitives.
198 + - The non-reactive principle is enforced by not exposing any reactive primitives in the crate.
199 + - Mandatory state variants from [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md#affordance-depth-via-ramp-not-via-color) are baked into the themed primitives — `primary_button` cannot be called without producing all five states because egui's `Button` handles them and Alloy's wrapper themes all five.
200 + - The token TOML is the seam where design tools could plug in.
201 +
202 + ## Late-term: Figma → tokens (and maybe more)
203 +
204 + The token TOML is the deliberate seam where a Figma integration could live. Realistic shape, in order of feasibility:
205 +
206 + **Phase 1 — Token sync (realistic, high value).** A Figma plugin (TypeScript) or a Rust CLI hitting the Figma REST API that reads color styles, text styles, spacing variables, and corner-radius variables out of an Alloy design file in Figma and emits `tokens.toml`. Round-trips cleanly because tokens are flat key-value data. ~2-week scope if the Figma file is structured deliberately for export. Realistic v3+ candidate.
207 +
208 + **Phase 2 — Static skeleton generation (interesting, limited).** Read Figma frames that represent component layouts (cards, dialog templates, list rows) and emit `impl Widget` skeletons that lay out children using `alloy_ui::section` / `field_row` / etc. Useful for the "designer sketches the shape, dev fills in the behavior" workflow. Wrong shape for full UIs because Figma's absolute positioning and constraint model don't map cleanly to egui's flow-based layout — but for constrained component patterns it works. Maybe v4+, probably narrower scope than imagined.
209 +
210 + **Phase 3 — Full WYSIWYG transpilation (not the right shape).** Trying to make Figma the source of truth for entire app layouts fights both tools. egui is intentionally about authored layout in code; making it the consumer of a visual designer's pixel-positioned output loses egui's strengths and inherits Figma's weaknesses. Skip.
211 +
212 + The architectural commitment that keeps this door open: **tokens are a file, not Rust source.** As long as `tokens.toml` is the authority and Rust consumes generated constants, *anything* that emits a valid `tokens.toml` works as a design tool — Figma, Tokens Studio, Penpot, a future Alloy-built design app, or just a TOML in someone's editor. The Figma plugin becomes one possible producer, not a coupling.
213 +
214 + A speculative name for the Figma tool, if it ever exists: **`cast`** (alloys are cast; the tool casts Figma into Alloy tokens).
@@ -1,0 +1,31 @@
1 + # COSMIC adoption
2 +
3 + System76's COSMIC desktop is the deepest Rust + Linux investment outside Mozilla. GPLv3 — no longer a license-forcing function now that Alloy authors in egui (MIT/Apache), but still permissively-compatible. Project Alloy pulls on COSMIC's libraries and one app, with deliberate restraint to avoid ceding visual identity.
4 +
5 + Architectural note: libcosmic and iced are reactive, which conflicts with Alloy's non-reactive principle ([MANIFESTO.md](MANIFESTO.md) principle 3) for *authored* apps. Adopted COSMIC components are exempt — they're not our code, they're upstream's. The principle binds what Alloy writes, not what Alloy ships.
6 +
7 + ## Adopted
8 +
9 + - **cosmic-text** — text rendering library (font shaping, layout, BiDi). Pure library, no visual coupling. Dependency-grade adoption — just add the crate.
10 + - **cosmic-files** — GUI file manager (named in [STACK.md](STACK.md) as the graphical fallback). Accepts libcosmic visual flavor in those windows as a knowing trade.
11 +
12 + ## Considered, deferred
13 +
14 + - **cosmic-term** — third Rust terminal option to revisit when the terminal decision is reopened. Uses libcosmic widgets so visually COSMIC-flavored, but standalone-runnable.
15 + - **cosmic-edit** — only if Alloy ships a default GUI text editor. Open question whether the default should be helix/zed/vim in the terminal vs a graphical editor.
16 + - **cosmic-notifications** — potential more-Rust-aligned v0/v1 alternative to mako if it runs cleanly under Niri. Worth a few minutes of investigation when the time comes.
17 + - **cosmic-screenshot** — probably skip; Niri built-in is cleaner.
18 + - **cosmic-icons** — worth taking if Alloy doesn't build its own icon theme. Visually COSMIC-flavored.
19 + - **cosmic-bg** — wallpaper daemon. Revisit if Niri lacks a clean wallpaper story.
20 +
21 + ## Skipped — conflicts with picks or DE-coupled
22 +
23 + - **libcosmic** as an app framework — committed to egui, and libcosmic is reactive anyway.
24 + - **cosmic-panel** — picked Ironbar.
25 + - **cosmic-launcher** — picked anyrun.
26 + - **cosmic-comp** — picked Niri.
27 + - **cosmic-session, cosmic-settings, cosmic-randr, cosmic-workspaces, cosmic-store** — DE-coupled or overlap with Alloy-authored components (the package GUI replaces the store).
28 +
29 + ## Known tension
30 +
31 + Adopting cosmic-files means a libcosmic-flavored window sits alongside Alloy's egui marquee apps. Accepted as a knowing trade — building a Rust GUI file manager from scratch is wrong-scope vs the value of having one at all. Heterogeneity is the price.
@@ -1,0 +1,92 @@
1 + # Alloy Design Language
2 +
3 + The visual rules Alloy's authored apps follow, and that adopted apps are themed toward where possible.
4 +
5 + Reference imagery: [inspo/](inspo/) — a niri rice on Arch that demonstrates most of these principles in a non-Alloy stack.
6 +
7 + ## Core principle: tinted greyscale chrome, color as information
8 +
9 + The UI is monochrome in a single tinted greyscale ramp. "Tinted" is the load-bearing word: the ramp is biased toward a hue (warm beige in light mode, cool slate in dark), never neutral grey, never pure white or black at the extremes. Surfaces, text, borders, icons, scrollbars, focus rings, decorative elements — all live on this ramp.
10 +
11 + Color is reserved for information. A red value means something is wrong. A green bar means utilization. A syntax-highlighted token means it carries semantic weight worth the eye's attention. If a color does not encode information, it does not appear.
12 +
13 + This is the rule that organizes everything else.
14 +
15 + ## Light and dark are polarity flips of the same tint
16 +
17 + Dark mode is not a different palette. It is the light-mode ramp with its lightness inverted along the same hue axis. A warm-beige light mode flips to a warm-charcoal dark mode; the underlying tint hue is preserved. An app themed for one is themed for both, and switching is a single lightness inversion, not a recolor.
18 +
19 + Practical consequence: define the ramp once as a sequence of (hue, chroma, lightness) stops. The mode toggle inverts lightness only. Components reference ramp positions (`surface`, `surface-raised`, `text-primary`, `text-muted`, `border`) and never raw hex values.
20 +
21 + ## The information palette
22 +
23 + A small, fixed set of accent hues, used only when their meaning is the point:
24 +
25 + - **Red** — error, over-threshold, destructive action confirmed
26 + - **Yellow / amber** — warning, near-threshold, attention without alarm
27 + - **Green** — healthy, success, in-bounds utilization
28 + - **Blue** — informational, link, in-progress
29 + - **Magenta / violet** — categorical accent for syntax or data series where the other four are taken
30 +
31 + Saturation stays moderate. These accents sit on the tinted-greyscale surface; they do not become the surface. The reference btop-style screenshot ([inspo/...zwjh98...](inspo/light-mode-rice-for-a-light-laptop-niri-v0-zwjh98apqxig1.webp)) is the canonical example: dense data, fully colored where it encodes severity or series identity, every pixel of chrome remaining tinted grey.
32 +
33 + ## What this rules out
34 +
35 + - Branded accent colors on non-data chrome (no "Alloy purple" buttons, header bars, or focus rings).
36 + - Decorative gradients, glassmorphism, neon highlights, ambient color washes.
37 + - Per-app theming that introduces a new hue. An app picks a position on the existing ramp; it does not extend the palette.
38 + - Status communicated by emoji or icon-only. Color-as-information is paired with a label or shape, never color alone (accessibility floor).
39 +
40 + ## Typography
41 +
42 + Mono-only. Two monospace families with disjoint roles: a **working font** (Iosevka) for anything authored or read — terminal, code, body, labels, controls, settings descriptions — and a **display font** (Departure Mono) for readouts: clocks, dashboard numerics, status panel values, lockscreen, the *value on the instrument* as opposed to the chrome around it. No paired humanist sans; prose stays in the working mono.
43 +
44 + Sizes step on a small fixed scale. In the working font, **weight** (Regular ↔ SemiBold) is the primary hierarchy lever. In the display font, weight is unavailable by design (single-weight); hierarchy comes from **size + case + tracking** — `UPPERCASE` letter-spaced labels above large numerics, in the mil-spec placard tradition.
45 +
46 + The exact tokens (font names, sizes, weights, tracking, line-heights) live in [TOKENS.md](TOKENS.md#typography).
47 +
48 + ## Geometry
49 +
50 + Rectilinear. Thin one-pixel borders in a low-contrast ramp position. No shadows. Corners are square or have a single small radius applied uniformly. Padding is generous around tabular regions so the data — which carries the color — has room to breathe against the grey chrome.
51 +
52 + ## Affordance: depth via ramp, not via color
53 +
54 + The constraints above (monochrome chrome, no decorative shadows, color reserved for information) remove the standard vocabularies designers reach for to signal interactivity. The rice screenshots in [inspo/](inspo/) are honest about this — they're terminal dashboards where almost nothing is clickable, so they never had to solve the affordance problem. Alloy's authored apps do.
55 +
56 + The replacement vocabulary, in the Apple HIG tradition of *discoverable depth*:
57 +
58 + **Surface elevation is the depth language.** Define at minimum three ramp positions that read as elevation: `surface` (base), `surface-raised` (interactive containers, cards, controls), `surface-overlay` (popovers, menus, dialogs). The step between levels is tonal, not shadowed. A control announces itself as interactive by sitting on a raised surface; a data panel sits flush on `surface`. Elevation is the primary affordance cue.
59 +
60 + **State variants are mandatory, not optional.** Every interactive element defines `default`, `hover`, `pressed`, `focused`, and `disabled` at minimum. Hover shifts one ramp step toward the user (lighter in light mode, lighter in dark mode — toward the eye, not toward the mode's polarity). Pressed shifts one ramp step away. Disabled drops to a `text-muted`-adjacent position with the same surface. There is no such thing as an egui widget shipped with only a default state.
61 +
62 + **Functional tonal edges are permitted; decorative shadows are not.** A one-step tonal edge (a 1px border drawn at `surface-raised` + 1 ramp step, or an inset/outset highlight of the same magnitude) is a *functional* affordance cue — it announces a control's boundary. This is not a softening of the no-decorative-shadows rule; it is a clarification that the rule targets ambient drop shadows, glows, and glassmorphism, not the one-step edge cues the HIG tradition uses to define interactive boundaries.
63 +
64 + **Focus rings are obligatory and unambiguous.** Keyboard focus is shown by a ring at a ramp position with enough contrast against the focused element's surface that it is unmistakable at arm's length on a laptop screen. Focus rings use the ramp, not the information palette — they are chrome, not data. Skipping focus rings, or making them visually subtle as a "clean" choice, is a regression.
65 +
66 + **Square is for data; small-radius is for controls.** The "single small radius applied uniformly" from [Geometry](#geometry) is *uniform within controls*, not uniform across surface kinds. Data panels and tabular regions are square. Interactive controls (buttons, fields, switches, list rows that respond to click) carry the small radius. The shape difference is itself an affordance cue — corners communicate whether a region expects to be touched.
67 +
68 + **Cursor changes are part of the contract.** Pointer over interactive elements becomes the standard pointing cursor; over text regions becomes the I-beam; over draggable handles becomes the resize/move cursor. This is enforced at the egui widget level (in the Alloy design-system crate) so it cannot be forgotten per-app.
69 +
70 + These rules apply to every authored chrome element. They do not loosen the color-as-information principle — the entire affordance vocabulary above lives on the tinted greyscale ramp.
71 +
72 + ## Composition patterns
73 +
74 + Patterns that emerge from applying the affordance rules above to common layouts. These are binding wherever the layout applies.
75 +
76 + **Action hierarchy: three tiers, polarity-driven.** Primary actions invert polarity (the button's surface is `text-primary`, its text is `surface-raised`, its border is `text-primary`) — visually heavy without recruiting an accent color. Secondary actions sit on `surface` (one step down from `surface-raised`) with normal text. Disabled actions hold `surface-raised` with `text-muted` text and `border-subtle` borders. Three tiers, all chrome. A panel never shows more than one primary action.
77 +
78 + **List and sidebar selection: leading-edge stripe.** The current selection in a sidebar or list is marked with a 2px stripe at `border-strong` along the leading edge of the row, with the row's surface raised one step. This rhymes with the focus ring (also `border-strong`) but applied as an edge instead of a ring, so selection and focus are distinguishable when they coincide. Selection is chrome; do not color it with an accent.
79 +
80 + **Inline messages: accent only at the edge.** Color-as-information messages (error, warn, healthy, info) carry a 3px left border in the accent color on a `surface-raised` background. The message text and accompanying glyph use the accent; the message body text stays at `text-primary`. The accent never fills the message's surface — that would turn chrome into data.
81 +
82 + **Titlebars: one step above raised.** Window titlebars sit on `surface-overlay` to mark the window perimeter as distinct from its content (`surface-raised`). This is the only non-overlay use of `surface-overlay`; everything else at that level is a true popover.
83 +
84 + **Tabular numerics: always in display font with tabular-nums.** Any column of numeric values uses Departure Mono with `font-variant-numeric: tabular-nums`, regardless of whether it sits inside otherwise-Iosevka chrome. Column alignment is non-negotiable; the working font cannot reliably provide it.
85 +
86 + ## Iconography
87 +
88 + Two tiers with non-overlapping roles. Functional icons are Nerd Font glyphs from the typography stack, used inline at text size. Hero icons are isometric line illustrations drawn from a single thematic world (a mid-century electromechanical relay station). Full rules, subject map, and style guide live in [ICONOGRAPHY.md](ICONOGRAPHY.md).
89 +
90 + ## Scope
91 +
92 + These rules are binding for egui apps Alloy authors and for the ratatui helpers. Adopted apps (cosmic-files, ghostty, nvim, etc.) are themed toward the ramp where their theming system permits, and accepted as-is where it does not. Heterogeneity at the seam between authored and adopted is a known trade, called out in [MANIFESTO.md](MANIFESTO.md#what-we-author-vs-what-we-adopt).
@@ -1,0 +1,84 @@
1 + # Alloy Iconography
2 +
3 + Two icon tiers with non-overlapping roles. Functional icons identify; hero illustrations anchor.
4 +
5 + ## Functional tier — Nerd Font glyphs
6 +
7 + For small, identifying icons in chrome: toolbar buttons, list-item markers, status indicators in the bar, file-type glyphs in a list, error/warn/info glyphs paired with accent text.
8 +
9 + - **Source:** the nerd-patched glyph range already present in `IosevkaNerdFont` (working font) and `DepartureMonoNerdFontMono` (display font). No separate icon font.
10 + - **Rendering:** treated as text. Inherits the working-font weight and the surrounding text's ramp position. Never accent-colored unless paired with information (e.g. an error glyph beside an error message uses `accent-error`).
11 + - **Size:** the surrounding text size. No standalone sizing scale.
12 +
13 + This tier exists so the brand doesn't have to draw 400 icons. It is uncomplicated and not where the brand lives.
14 +
15 + ## Hero tier — isometric line illustrations
16 +
17 + For large, declarative iconography: lockscreen ornament, launcher app icons, settings category headers, marquee-app heros, empty states, splash. This is where Alloy's visual identity lives.
18 +
19 + ### Theme: a mid-century electromechanical relay station
20 +
21 + The illustrations are all subjects from a single fictional facility — a small Bell System / GE-era relay station — rendered as if they're plates from its service manual. Anyone looking at two illustrations should recognize they belong to the same body of work without having to think about it.
22 +
23 + The reason this is the right metaphor: a computer is in spirit an electromechanical relay system, and a tiling user shell is in spirit a control room. The mapping is unforced.
24 +
25 + ### Subject map
26 +
27 + Every Alloy surface that gets a hero illustration draws its subject from this facility.
28 +
29 + | Alloy surface | Facility subject |
30 + |---|---|
31 + | Lockscreen ornament | Master switch / sealed bulkhead / front gate |
32 + | Package GUI hero | Parts bay — crated equipment on a pallet |
33 + | Notification daemon | Annunciator panel (the labeled-lamp board) |
34 + | Settings → Network | Microwave relay tower |
35 + | Settings → Display | Oscilloscope / CRT bay |
36 + | Settings → Sound | Audio bay / signal generator rack |
37 + | Settings → Power | Generator + transformer + breaker panel |
38 + | Settings → Updates | Maintenance bench / parts cabinet |
39 + | Settings → Storage | Filing cabinet / archive room |
40 + | Settings → Privacy | Locked equipment cage |
41 + | Empty state | "Bay empty" labeled console with no equipment in it |
42 + | Splash / first boot | Establishing axonometric of the whole facility |
43 + | Marquee app icons | One distinct piece of facility equipment per app |
44 +
45 + When a new surface needs a hero illustration, pick a subject from the facility. Do not extend the world to a different setting; coherence is the point.
46 +
47 + ### Style rules
48 +
49 + - **Projection:** true isometric, 30° / 30° / 30°. No perspective. No exceptions.
50 + - **Stroke:** 1.5px line, drawn at `border-strong` on `surface-raised`. Slightly heavier than the 1px chrome borders so the illustration reads as *drawn* rather than as UI.
51 + - **Fills:** none. Pure line.
52 + - **Hatching is mandatory.** This is the single detail that separates engineering-manual iso from generic flat illustration.
53 + - Cross-hatch for metal (regular grid, 45°).
54 + - Parallel hatch for concrete or stone (single direction, evenly spaced).
55 + - Stippling for fill/ground/sand (dots, irregularly spaced).
56 + - **Doubled edges on solid objects.** An engineering-drawing convention for indicating mass — the visible silhouette edges are drawn twice with a small offset.
57 + - **Annotation callouts** on hero illustrations only (splash, marquee app heroes). Small letter or number labels with leader lines pointing to components. Settings category icons at 64px do not get callouts (would be too busy).
58 + - **Cropping is intentional.** Illustrations can run off the edge of their container as if they're a fragment of a larger plate. Reinforces the "this is one page from a manual" feeling.
59 + - **No color.** Even when illustrating something that would be colored in reality (a red warning light on the annunciator panel, copper busbars), the illustration stays on the ramp. Color is reserved for information per [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md#core-principle-tinted-greyscale-chrome-color-as-information).
60 +
61 + ### Sizes
62 +
63 + | Use | Size | Callouts |
64 + |---|---|---|
65 + | Settings category icon | 64px | no |
66 + | Marquee app icon (launcher / dock) | 96px | no |
67 + | Lockscreen ornament | 128–192px | optional |
68 + | Empty state | 200–280px | optional |
69 + | Marquee app hero (in header) | 240–320px | yes |
70 + | Splash / first boot | full surface | yes |
71 +
72 + ### Production
73 +
74 + For v0 mockup: rough placeholders drawn inline as SVG. These exist to demonstrate the style rules; they are not the real illustrations.
75 +
76 + For v1: 8–12 real illustrations covering the subjects above, drawn either by Max or commissioned from an illustrator who can match the register. Stock axonometric libraries (Streamline, Iconscout) will dilute the brand and are not acceptable — the whole point of the theme is that the illustrations feel *authored* for one specific system.
77 +
78 + Vendored under `alloy_ui/assets/icons/hero/` once the crate is scaffolded. SVG format, ramp colors as `currentColor` so light/dark mode polarity flips work without re-export.
79 +
80 + ## The boundary between tiers
81 +
82 + If you're tempted to make a functional icon into a small isometric illustration, don't. A 16px iso line drawing reads as noise, not as iconography. Functional icons stay as Nerd Font glyphs at text size. Isometric is reserved for surfaces large enough that the hatching and line work can be read at viewing distance — 64px floor.
83 +
84 + Conversely, if you're tempted to use a Nerd Font glyph for a hero spot to save illustration work, don't. The brand identity is the hero tier; cutting it makes Alloy look like every other minimalist Linux shell.
@@ -1,0 +1,61 @@
1 + # Project Alloy
2 +
3 + *An opinionated tiling user layer for Fedora Silverblue.*
4 +
5 + ## What Alloy is
6 +
7 + Project Alloy is to Silverblue what Omarchy is to Arch: a curated, beautifully-defaulted, keyboard-driven, tiling-first environment that fuses an immutable base, a Wayland compositor, an opinionated app/tool stack, and a project-authored design system into one coherent system. The name is the thesis — an alloy is stronger than its component metals.
8 +
9 + ## What Alloy is not
10 +
11 + - Not a from-scratch package manager. The previous `sap` design (typed configuration language, federated curator registry, content-addressed outputs) is shelved; we live on rpm-ostree.
12 + - Not a from-scratch distro. The previous `mountaineer` design (curated Alpine, apk-on-`/etc/apk/world`, s6 init) is shelved; we live on Fedora Silverblue.
13 + - Not a ublue spin. Alloy is **alongside** Universal Blue (Bluefin, Bazzite, Aurora), not downstream of it — the name was picked specifically to avoid the ublue "Blue\*" prefix convention.
14 + - Not a gaming distro. The audience overlaps with Omarchy and Omakub, not with Bazzite.
15 + - Not a GNOME spin. Alloy's design system is custom-drawn (egui) and does not pick up libadwaita theming.
16 +
17 + ## Audience
18 +
19 + Developers, keyboard-driven power users, Linux-native sensibility. People who would rather configure once than configure often, who prefer modern Rust tools over decades-old legacy ones, and who want the tiling-first immutable experience that no existing Fedora atomic variant currently delivers as a curated whole.
20 +
21 + The empty quadrant Alloy fills:
22 +
23 + | | Bare WM on immutable base | Curated user layer on top |
24 + |---|---|---|
25 + | **GNOME** | Silverblue | Bluefin |
26 + | **KDE** | Kinoite | (none) |
27 + | **Tiling (Sway)** | Sericea | **Alloy** |
28 + | **Gaming** | — | Bazzite |
29 +
30 + Sericea and Kinoite are bare windowing on an immutable base with no opinionated user layer. Bluefin is GNOME-flavored developer experience. Bazzite is gaming. Alloy is opinionated tiling.
31 +
32 + ## Guiding principles
33 +
34 + 1. **Modern, well-featured, Rust-written tools.** When competitive Rust-native options exist, pick them. Where they don't, name the gap honestly and consider filling it.
35 +
36 + 2. **Native to Alloy's design system, not native to GNOME.** egui is custom-drawn. We commit to maintaining an egui design-system crate — themed widgets and extension traits on `egui::Ui` — that Alloy's authored apps pull from. Heterogeneity with adopted apps (e.g. cosmic-files in libcosmic, Gram in gpui) is a knowing trade, not an accident.
37 +
38 + 3. **Non-reactive by principle.** Alloy avoids the reactive UI pattern in everything it authors. State → view binding, declarative property graphs, async data trickling into UI components — the cluster of patterns that produces staged appearance, animation creep, hover-everywhere, and state-divergence bugs — is the "web-shaped feel" Alloy refuses on principle. egui (immediate-mode) and ratatui (immediate-mode TUI) are the two toolkits Alloy authors in. Both render the whole frame from current state each cycle, making state divergence architecturally impossible.
39 +
40 + 4. **Backwards compatible with hardware, not with software.** Same principle as `_meta`'s cross-cutting rule. Operators are expected to be on the current Alloy release; hardware support is broad.
41 +
42 + 5. **Opinionated defaults; the configuration is the documentation.** Every default is a position we will defend in writing.
43 +
44 + 6. **The package GUI teaches the mental model.** The wedge product is a user-friendly graphical package manager that helps new Silverblue users understand the three-surface install model (rpm-ostree layered / Flatpak / distrobox). This is the hardest thing about Silverblue and the thing GNOME Software does not address well.
45 +
46 + ## What we author vs what we adopt
47 +
48 + **Alloy authors** (in Rust):
49 + - The package-management GUI (egui).
50 + - Sysop-style helper TUIs (ratatui) — wifi, services, image swaps, generation rollback. The mountaineer-sysop pattern carries over.
51 + - Marquee egui apps that anchor the design system — see [MARQUEE-APPS.md](MARQUEE-APPS.md).
52 +
53 + **Alloy curates** (from upstream):
54 + - Fedora Silverblue as the base.
55 + - Niri as the compositor.
56 + - The userland stack — see [STACK.md](STACK.md).
57 + - Selected COSMIC components — see [COSMIC.md](COSMIC.md).
58 +
59 + ## Status
60 +
61 + Pre-v0. This document is the project. Code follows.
@@ -1,0 +1,24 @@
1 + # Marquee egui app pipeline
2 +
3 + The user-facing apps Alloy authors in egui to anchor the design system. Each is small, high-visibility, and fills a gap where adopting an existing Rust app isn't the right answer.
4 +
5 + | Tier | App | Why it qualifies |
6 + |---|---|---|
7 + | Concurrent with v0 | **Package GUI** | The pedagogical wedge product. Teaches the rpm-ostree layered / Flatpak / distrobox decision. This is the hardest thing on Silverblue and the original first-tool framing. |
8 + | v1 | **Lockscreen** | Small, high-visibility (every wake), security-sensitive (simplicity helps), ext-session-lock-v1 is a clean protocol, no production-quality Rust lockscreen exists today. Better first-egui-app than the package GUI because it's smaller and more visible. |
9 + | v1 candidate | **Wallpaper picker** | Browse the curated impressionist collection ([STACK.md](STACK.md#wallpapers)) with painter / title / year / source metadata, preview, set-as-current. Small scope, distinct surface from the lockscreen, gives the collection a first-class home rather than treating it as filesystem chrome. Bumps to v1 if scoped tight. |
10 + | v1 candidate | **TextEdit-equivalent** | Small native-feeling graphical text editor for ordinary users (audience: the same people the package GUI serves — opened a config file from the file manager). Intentionally scoped down: open/edit/save, multi-tab, find/replace, tree-sitter highlighting, real OS file dialogs. No project tree, no LSP, no debugger, no plugin system. Power users install Helix. ~2–3 month scope. Pairs with the non-reactive principle as a concrete proof point. |
11 + | v2 | **Notification daemon** | High-visibility (every alert), bounded scope, real Rust ecosystem gap. More scope than the lockscreen — action invocation, persistent history, urgency, replace-id semantics, DND — but well-defined protocol (`org.freedesktop.Notifications` D-Bus + wlr-layer-shell). |
12 + | v3+ | **Bar** | Larger, less protocol-clean, but a major visual anchor. Ironbar gets us there in the interim — don't let its config become load-bearing. |
13 + | Later | **File manager** | Large surface area; cosmic-files already exists in Rust + iced. Not in the marquee tier unless cosmic-files becomes unacceptable. |
14 + | Never | **Terminal, launcher, screenshot** | Existing Rust options (or compositor built-ins) are the right shape. Re-authoring would be wrong-scope. |
15 +
16 + ## The design-system commitment
17 +
18 + Alloy authors an egui design-system crate — themed widgets, extension traits on `egui::Ui`, palette and typography constants — that all marquee apps pull from. The lockscreen is the first concrete consumer. Adding the package GUI as the second consumer is what proves the crate is reusable (rather than a one-app abstraction).
19 +
20 + Decisions like color palette, typography, motion language (or its absence — see the non-reactive principle), iconography style, and density should be made before the second app starts, even if they're refined later.
21 +
22 + ## The immediate-mode discipline
23 +
24 + Every marquee app renders its full UI each frame from current state — no retained widget state, no async updates trickling into components. This is what makes the "stable feel" property hold across the suite. See [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md) for the affordance vocabulary and [MANIFESTO.md](MANIFESTO.md) principle 3 for the architectural rationale.
@@ -1,0 +1,115 @@
1 + # Research: a design tool for immediate-mode UI
2 +
3 + *A late-term, research-shaped project. No commitment, no timeline. Captured here so the architectural decisions Alloy makes now don't accidentally close the door on it.*
4 +
5 + ## The question
6 +
7 + How do designers collaborate with engineers on immediate-mode UIs without the designers learning Rust? Figma exists because retained-mode reactive frameworks (React, SwiftUI, Flutter, Slint) accept pixel-positioned mockups as a meaningful artifact. Immediate-mode toolkits like egui don't, because immediate-mode UI is fundamentally not a tree of positioned visual elements — it is a *function* that takes state and produces frames.
8 +
9 + If immediate-mode is the right architectural choice (Alloy's principle 3 says it is), then the design-tool gap is real. Nobody has filled it because immediate-mode UI hasn't been mainstream enough to support a serious tool, and the existing design-tool paradigm doesn't fit. That's both the opportunity and the warning.
10 +
11 + ## Why Figma's model doesn't translate
12 +
13 + Figma's primitives:
14 +
15 + - **Artboard = screen.** The unit of work is a static frame representing one state at one viewport.
16 + - **Component variants = states.** Drawing the hover state means drawing another artboard.
17 + - **Auto-layout = retained-mode flow.** Children are positioned by an algorithm that runs once per layout pass and caches results.
18 + - **Output artifact = pixel-perfect mockup + a token system.** Engineers translate the mockup into a reactive component tree.
19 +
20 + The translation is lossy. Designs drawn this way routinely miss:
21 +
22 + - State transitions (Figma draws snapshots; the actual UX is the motion between them).
23 + - Edge cases (long text, empty data, error variants — not drawn means not designed).
24 + - Real data shapes (mockup data is always neat).
25 + - Viewport variance (pixel-perfect is meaningless when the window resizes).
26 +
27 + Engineers absorb the translation cost and the mismatches show up as bugs months later.
28 +
29 + ## What immediate-mode rewards instead
30 +
31 + Immediate-mode reframes the unit of design work. There is no screen — there is a *function rendered every frame from current state*. So the meaningful artifacts a designer produces are:
32 +
33 + 1. **Tokens** — palette, type scale, spacing, radii, motion (or its absence). Flat data, already covered by `tokens.toml` in [COMPONENT-LIBRARY.md](COMPONENT-LIBRARY.md).
34 + 2. **Themed primitives** — buttons, text fields, tags, focus rings. Visual specification of state variants.
35 + 3. **Composition vocabulary** — "this is a card with these slots," "this is a list row with this arrangement," "this section is dense; this one is breathy." A *grammar*, not a pixel layout.
36 + 4. **Data shapes the composition accepts.** A `PackageRow` accepts `(name, version, urgency, icon)`. The designer specifies what fields render in what arrangement; the engineer provides the data.
37 +
38 + The screen disappears as a unit of work. A "page" becomes a composition of components against a data source. The designer's contribution is upstream of any specific screen.
39 +
40 + ## Sketch: what the tool might be
41 +
42 + The hypothetical Alloy design tool (working name **`crucible`** — alloys are formed in crucibles; preserves the metallurgy frame) would:
43 +
44 + ### Component as unit, not screen as unit
45 +
46 + The primary view is a component you're editing, not a canvas of screens. You edit `PackageRow` once; the tool renders it in isolation against multiple sample data sets (`short name`, `extremely long unicode name`, `missing version`, `red urgency tag`, `disabled state`) — all visible at once. You do not draw four artboards; you specify variations of one component and the tool shows them live.
47 +
48 + ### Token-first authoring
49 +
50 + Most design work is the token graph. The tool's primary editing surface is the palette, the typography scale, the spacing scale, the radii, the elevation steps. Changes propagate instantly to every component preview. This is already most of Figma's value — and it round-trips cleanly to a `tokens.toml` file (the `cast` tool idea generalized).
51 +
52 + ### Composition grammar, not pixel layout
53 +
54 + When the designer composes a component, they're not positioning pixels — they're choosing layout primitives that map 1:1 to egui's call vocabulary: `horizontal(...)`, `vertical(...)`, `card(...)`, `field_row(...)`. The tool's output is a `.alloy.ron` (or `.alloy.toml`) describing the composition structurally:
55 +
56 + ```
57 + PackageRow = card(elevation = raised) {
58 + horizontal {
59 + icon(slot = "icon")
60 + vertical {
61 + text(slot = "name", style = body)
62 + text(slot = "version", style = muted)
63 + }
64 + spacer
65 + tag(slot = "urgency")
66 + button(action = "update", style = primary)
67 + }
68 + }
69 + ```
70 +
71 + The engineer's `impl Widget for PackageRow` reads this composition file (or has it compiled in via `build.rs`) and renders it against the actual data. The interaction logic — what "update" does — is engineer territory. The visual structure is designer territory. The seam between them is the composition file.
72 +
73 + ### Live render against sample data
74 +
75 + The tool embeds an actual egui render context. The designer's preview is not a static mockup; it is the same code path the production app uses, fed sample data the designer authors alongside the component. "What does this look like with the longest possible name?" becomes a typed-in test case, not an unsketched edge case.
76 +
77 + ### Engineer-facing output
78 +
79 + The artifacts produced are: `tokens.toml` (tokens), `<Component>.alloy.ron` files (compositions), and a small registry of which components exist. The engineer wires these into the marquee apps. There is no pixel-perfect mockup to translate; the composition file *is* the spec.
80 +
81 + ## Open research questions
82 +
83 + These are the things that need answering before this is a project worth starting:
84 +
85 + 1. **How rich does the composition vocabulary need to be?** Too thin and designers can't express enough; too rich and the tool reinvents Rust visually. The egui call vocabulary is a good first approximation but may not be sufficient.
86 + 2. **How are conditional renders specified?** "If this field is present, show the button; otherwise hide it" is a code-side concern in egui. Does the composition language need basic conditionals? If yes, where does it stop being design and start being programming?
87 + 3. **How are state variants specified?** Hover/pressed/focused/disabled are mandatory per the design language. Does the designer author state-specific variants of compositions, or only state-specific tokens (and the composition is state-neutral)?
88 + 4. **How is custom drawing handled?** A custom waveform widget for audio cannot be expressed in any composition vocabulary. The tool should explicitly cede those — they're engineer-authored egui code that consumes tokens but isn't designed in the tool.
89 + 5. **What's the minimum viable scope?** Probably: token editing + a fixed set of primitives + a fixed-shape `card` and `list` composition. Everything else escalates fast.
90 + 6. **Is the right output format RON, TOML, or a custom DSL?** RON is most expressive; TOML is most readable; a custom DSL is most controllable but most expensive to maintain.
91 +
92 + ## Prior art and adjacent things
93 +
94 + - **Storybook** (web) — component-first isolation and state preview. Closest existing parallel, but its primitives are React components, not a domain-independent grammar.
95 + - **Penpot** — open-source Figma alternative. Hackable; a better foundation than Figma for this kind of experiment if the tool went the "plugin to an existing design app" route instead of "standalone tool."
96 + - **Tokens Studio** (Figma plugin) — proves token-sync alone is valuable.
97 + - **Lottie** — a grammar for one specific concern (animation). Demonstrates that a constrained grammar can be a real design-tool output.
98 + - **rerun.io** — Rust + egui-based data visualization tool. Not a design tool, but a demonstration that immediate-mode UI can support sophisticated tooling.
99 + - **Hex / Retool** — visual programming over data. Wrong shape for design (they conflate design with logic) but their data-first ergonomic is correct.
100 +
101 + ## What this commits Alloy to right now
102 +
103 + Almost nothing. The architectural decisions already made in [COMPONENT-LIBRARY.md](COMPONENT-LIBRARY.md) keep the door open:
104 +
105 + - Tokens live in a TOML file, not in Rust source. Any tool that emits valid `tokens.toml` is a viable producer.
106 + - The crate exposes a small, stable set of layout combinators and themed primitives. These would be the vocabulary the composition grammar references.
107 +
108 + The further commitments Alloy *could* make to keep this even more open (small, low-cost, worth considering):
109 +
110 + - Define composition files (`<Component>.alloy.ron`) as a possible authoring surface for components, even if the v1 design system crate only consumes them via `include_str!`. This makes the surface real before any tool exists.
111 + - Keep all themed primitives' visual configuration token-driven and avoid hardcoded design decisions in widget code — so a future tool editing tokens has full reach.
112 +
113 + ## Status
114 +
115 + Research-only. v4+ at earliest. Captured here so the question doesn't get lost and so the design-system architecture continues to leave the door open. If pursued, it is its own project (sibling to Alloy, not part of it), with its own repo and probably its own license decision.
A docs/STACK.md +129
@@ -1,0 +1,129 @@
1 + # Alloy Stack
2 +
3 + Every pick with reasoning and what was rejected. Companion to [MANIFESTO.md](MANIFESTO.md).
4 +
5 + ## Base
6 +
7 + **Fedora Silverblue / rpm-ostree.** Atomic image-based base. The pivot point of the whole project — riding an existing immutable base instead of building a parallel ecosystem (the sap/mountaineer trap) is what makes Alloy a months-shaped project instead of a years-shaped one.
8 +
9 + **ublue relationship: alongside, not downstream.** Preserves naming and architectural independence. The "Alloy" name was picked specifically to avoid the ublue "Blue\*" prefix. Tradeoff: no shared image-building infrastructure — whatever Alloy ships for image composition is on Alloy to build/maintain. Upside: total architectural freedom and a clean brand.
10 +
11 + ## Compositor
12 +
13 + **Niri.** Modern, well-featured, Rust, KDL config, in Fedora repos. Scrollable-column tiling carries part of the "opinionated defaults" weight upstream — Niri's own opinion about windowing means Alloy doesn't have to invent a tiling model.
14 +
15 + Rejected: Hyprland (governance is contested), Sway (Sericea already ships it — lowest-risk but a smaller idea than Niri-plus-taste).
16 +
17 + ## GUI toolkit
18 +
19 + **egui.** Immediate-mode Rust GUI: every frame the UI code runs top to bottom from current state, no bindings, no observables, no retained UI state to diverge. Picked because **Alloy's principle is to avoid the reactive pattern** — staged appearance, async UI trickling, state-divergence bugs, the "web-shaped feel" — and immediate-mode rules those out by construction. egui is essentially TUIs-but-graphical, which is the stability property the project is reaching for.
20 +
21 + Practical model: a Rust function takes `&mut egui::Ui`, draws everything from current state each frame. The UI literally cannot show stale data because there is nothing retained to be stale. State divergence is architecturally impossible.
22 +
23 + Tradeoffs accepted:
24 + - **Designer-authorable DSL is gone.** The original Slint pitch was that designers could author UI without being Rust devs; that capability is forfeit. Alloy's design-system primitives live in a Rust crate as themed widgets and extension traits on `egui::Ui`.
25 + - **Aesthetic identity has to be hand-built.** egui defaults read as "debug overlay"; the Alloy look requires deliberate theming work in Rust against the patterns in [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md).
26 + - **Constant redraw cost.** egui throttles when nothing changes but the model is still per-frame; CPU/GPU usage is higher than retained toolkits on idle.
27 +
28 + Tradeoffs gained:
29 + - **License flexibility.** egui is MIT/Apache. Alloy is no longer forced into GPLv3 by its GUI toolkit — license choice is re-opened (see [todo.md](todo.md)).
30 + - **Conceptual coherence with ratatui.** Both are functions-over-state immediate-mode paradigms. Authoring across GUI and TUI becomes more uniform.
31 + - **Prior experience.** Audiofiles already runs on egui, so the project enters with working knowledge.
32 +
33 + Rejected: Slint (reactive at its core — `Text { text: my_property; }` is exactly the reactive pattern; the toolkit cannot satisfy the non-reactive principle even when used carefully), iced (reactive), gpui (reactive — what Zed/Gram use), Floem (reactive), Dioxus (React-shaped reactive), gtk4-rs (imperative retained-mode is non-reactive but couples to GNOME visual identity Alloy rejected), Dear ImGui via bindings (immediate-mode but C++ underneath), Tauri (JS frontend conflicts with Rust-first).
34 +
35 + ## TUI toolkit
36 +
37 + **ratatui.** For sysop-style helpers (wifi, services, image swaps, generation rollback). The mountaineer-sysop pattern carries over.
38 +
39 + ## Bar
40 +
41 + - **v0: Ironbar** (Rust, GTK-based, Polybar-inspired, TOML/JSON/Corn config). Rust-native, actively developed, good Niri compatibility.
42 + - **v1+: bespoke egui bar** as a possible later marquee design-system app. Don't let Ironbar config accrete to the point of becoming load-bearing — document migration intent.
43 +
44 + Rejected: eww (Rust but Lisp/yuck config clashes with the Alloy design system), waybar (C++, not Rust), yambar (YAML, ruled out).
45 +
46 + ## Lock
47 +
48 + - **v0: swaylock** (C, canonical, minimal, security-audited — ships fast).
49 + - **v1: bespoke egui lockscreen** as the first marquee design-system app. Small focused UI, security-sensitive (simplicity helps), maximum visibility (every wake), ext-session-lock-v1 is a clean protocol. Better first-egui-app than the package GUI because it's smaller and more visible.
50 +
51 + Rust gap noted honestly: no production-quality Rust lockscreen exists today; Alloy fills it with the v1 egui build rather than adopting one.
52 +
53 + ## Launcher
54 +
55 + **anyrun** (Rust, plugin-based with Lua + Rust plugins, GTK4-rendered).
56 +
57 + No custom egui launcher planned — anyrun's plugin model already covers what would be built, and launcher complexity (fuzzy search, app indexing, modes, history) is too large to re-author without strong reason.
58 +
59 + Rejected: fuzzel (C, canonical but not Rust), tofi (C, minimalist).
60 +
61 + ## Notification daemon
62 +
63 + - **v0/v1: mako** (C, by emersion, de facto Wayland notification daemon, lightweight).
64 + - **v2: bespoke egui notification daemon** as the third marquee design-system app (after lockscreen v1 and package GUI). Fills a real Rust ecosystem gap. High visibility (every alert), protocol is well-defined (`org.freedesktop.Notifications` D-Bus + wlr-layer-shell). More scope than the lockscreen — action invocation, persistent history, urgency, replace-id semantics, DND — but bounded.
65 +
66 + Rejected: swaync (C++), fnott (C). cosmic-notifications is worth evaluating as a more-Rust-aligned v0/v1 alternative to mako if it runs cleanly under Niri.
67 +
68 + ## Screenshot stack
69 +
70 + - **Niri built-in** for capture + region select (bound in `niri.kdl`). Compositor-native selection is smoother than slurp-as-overlay (knows about windows/workspaces).
71 + - **satty** for annotation when needed (Rust, modern, replaces swappy).
72 + - **wl-clipboard** for clipboard plumbing.
73 +
74 + No custom egui work — screenshot is composable by design.
75 +
76 + Rejected: grim + slurp + swappy (classic C stack, dated annotator); wayshot + slurp + satty (Rust replacement stack but adds two tools Niri's built-in already covers). Re-adopt wayshot+slurp only if compositor-independence or non-IPC scripted capture becomes a real constraint.
77 +
78 + ## File manager
79 +
80 + - **TUI primary: yazi** (Rust, async, plugin system, sixel/kitty/iTerm image preview). Where keyboard-driven Alloy users will live by default.
81 + - **GUI fallback: cosmic-files** (Rust + iced, by System76). For drag-drop, thumbnail browsing, and the cases TUI can't cover. Accepts libcosmic's visual flavor in those windows as a knowing trade — see [COSMIC.md](COSMIC.md).
82 +
83 + No custom egui file manager planned. Scope is too large (file ops, permissions, drag-drop, thumbnails, archives, mounts, trash, search, batch ops, associations) and cosmic-files already does this work in Rust.
84 +
85 + Rejected: broot (Rust TUI, useful as a complement but different paradigm), nautilus / dolphin (not Rust).
86 +
87 + ## Text editor
88 +
89 + **Gram** ([codeberg.org/GramEditor/gram](https://codeberg.org/GramEditor/gram)). A Zed fork that strips AI integration, telemetry, proprietary collaboration, and subscription nags. Rust, gpui rendering, GPLv3. Inherits Zed's batteries-included posture: DAP debugger, git integration, multi-language LSP, extension compatibility with Zed's ecosystem.
90 +
91 + **Power-user editor: Helix.** Pre-installed and pre-configured for terminal users. Helix is a TUI editor with the immediate-mode stability properties Alloy values; serving terminal-first users with their preferred editor while offering Gram (or eventually a custom egui editor — see [MARQUEE-APPS.md](MARQUEE-APPS.md)) for graphical users is a deliberate two-audience answer.
92 +
93 + Why Gram over Zed itself: the "no AI / no telemetry / no proprietary" stance matches Alloy's broader posture exactly. Why Gram over a terminal editor (helix / nvim / kakoune): Alloy ships a graphical editor by default; users who want terminal editors install them, but the default is GUI.
94 +
95 + Rejected: cosmic-edit (less mature than Gram, would still introduce libcosmic visuals — Gram's gpui at least carries Zed's design polish), Zed (telemetry / AI defaults conflict with Alloy posture), helix-only (terminal-only as default is the wrong choice for a graphical desktop).
96 +
97 + **Heterogeneity note:** Alloy now ships three distinct GUI visual systems — egui (authored marquee apps), iced/libcosmic (cosmic-files), gpui (Gram). Editors are conventionally their own visual world, so the additional trade is absorbable; called out in [MANIFESTO.md](MANIFESTO.md#what-we-author-vs-what-we-adopt).
98 +
99 + ## Wallpapers
100 +
101 + **Curated collection of public-domain impressionist paintings.** Reliably muted, atmospheric, never garish. Aligns with the design language on three axes: tonally restrained (no chrome-fighting saturation), atmospheric depth (mirrors the surface-elevation affordance vocabulary), and the impressionist obsession with *light as information* rhymes with the "color reserved for information" rule.
102 +
103 + All major impressionist works are clean PD (Monet, the latest, died 1926). Sourcing priority — institutions that explicitly waive reproduction-photo rights:
104 +
105 + - **Met Open Access** (CC0)
106 + - **Art Institute of Chicago** (CC0 — strong impressionist holdings)
107 + - **Rijksmuseum Rijksstudio** (free high-res)
108 + - **National Gallery of Art (Washington)** (open access)
109 +
110 + Avoid Google Arts & Culture as a *source* (mixed rights); use it for discovery only. The wallpaper picker shows painter + title + year + source institution.
111 +
112 + **Daemon: swww** (Rust, daemon + CLI, IPC-driven, soft-fade transitions, per-output). Daemon + CLI split is the right architecture for the v1 egui wallpaper picker — curation/metadata/UI in the picker, surface management in the daemon, picker drives the daemon via IPC. Soft fade on cycle is the tonally correct transition for impressionist art.
113 +
114 + Rejected: wpaperd (Rust, more structured cycling-as-daemon-concern — second pick if picker descopes), cosmic-bg (Rust, System76, Niri compatibility unverified — not worth the detour while swww exists), swaybg (C, no cycling/transitions — boring fallback only).
115 +
116 + Honest gap: none of these handle ICC color management; that's a Wayland compositor-level concern still being finalized.
117 +
118 + ## Terminal — deferred
119 +
120 + Three Rust candidates:
121 +
122 + - **alacritty** — "the terminal renders text fast." Minimal, GPU, TOML config, no multiplexing/tabs. Pair with zellij or tmux.
123 + - **wezterm** — "the terminal is a workstation." Multiplexing built in, Lua config, SSH client. Self-contained.
124 + - **rio** — "the terminal can be beautiful." Modern aesthetic, GPU, design-forward.
125 + - **cosmic-term** — third Rust option to consider when revisiting (libcosmic + cosmic-text).
126 +
127 + The unresolved axis is whether sixel image previews in yazi are a hard requirement (rio wins) or a nice-to-have (alacritty is fine, paired with Niri's tiling + zellij/tmux). User postponed because the choice matters to them; revisit deliberately.
128 +
129 + No custom egui terminal — terminals are among the most complex userland software (ANSI, terminfo, sixel/kitty graphics, IME, OSC, performance under load). Wrong scope.
@@ -1,0 +1,184 @@
1 + # Alloy Tokens
2 +
3 + The canonical, locked design tokens for Alloy. This file is the source of truth; `alloy_ui/tokens.toml` (when scaffolded) is generated from these decisions, and `tokens.rs` is generated from that. Changing a value here changes every authored Alloy surface.
4 +
5 + The rules these tokens implement live in [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md). This file is where rules become numbers.
6 +
7 + ## Tint hue
8 +
9 + **`H = 80`** — a warm yellow-orange. Reads as beige in light mode, warm charcoal in dark mode. Picked over alternatives (H=60 too yellow, H=40 too orange, H=90 drifts greenish at high lightness) because it stays unambiguously warm across the full L range.
10 +
11 + The tint hue is global. Every chrome ramp stop uses this hue. Accents do not.
12 +
13 + ## Tint chroma
14 +
15 + **`C = 0.012`** for chrome. Just above the perceptual threshold against a neutral grey reference at typical viewing distance, well below where the tint starts to read as "colored" rather than "warm." A neutral grey of equivalent L is visibly cooler when placed adjacent.
16 +
17 + ## The ramp (light mode, canonical)
18 +
19 + All values OKLCH. Hue 80, chroma 0.012 throughout.
20 +
21 + | Token | L | Use |
22 + |---|---|---|
23 + | `surface-sunken` | 92 | Recessed wells (search inputs, code blocks inside surface-raised) |
24 + | `surface` | 96 | Window background, base canvas |
25 + | `surface-raised` | 98 | Cards, panels, default control surface |
26 + | `surface-overlay` | 99.5 | Popovers, menus, dialogs, tooltips |
27 + | `border-subtle` | 88 | Internal dividers within a single surface tier |
28 + | `border` | 80 | Default control borders, panel edges |
29 + | `border-strong` | 65 | Focus rings, emphasized boundaries |
30 + | `text-muted` | 55 | Disabled text, secondary metadata, placeholder |
31 + | `text-secondary` | 38 | Labels, section headers, non-primary body |
32 + | `text-primary` | 18 | Default body, primary content |
33 +
34 + Eight L-stops covering chrome (top four), borders (middle three), and text (bottom three), with `text-muted` straddling the boundary because it must read as text against `surface` and as a border-adjacent disabled cue against `surface-raised`.
35 +
36 + ## The ramp (dark mode, derived)
37 +
38 + Dark mode preserves H and C and inverts L *polarity*, but does **not** strictly compute `L_dark = 100 − L_light`. Strict inversion would break the elevation rule from [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md#affordance-depth-via-ramp-not-via-color), which requires `surface-raised` to read as closer to the eye than `surface` in *both* modes — meaning lighter in both modes, not lighter-then-darker.
39 +
40 + The correct derivation: the chrome tier flips to low L with elevation increasing the L slightly per step (raised is brighter than base, as before). The text tier flips to high L. Borders span the middle. Same ordering semantics, opposite anchor.
41 +
42 + | Token | L | Use |
43 + |---|---|---|
44 + | `surface-sunken` | 8 | (recessed wells) |
45 + | `surface` | 12 | (window background) |
46 + | `surface-raised` | 15 | (cards, controls) |
47 + | `surface-overlay` | 19 | (popovers, dialogs) |
48 + | `border-subtle` | 22 | |
49 + | `border` | 30 | |
50 + | `border-strong` | 48 | |
51 + | `text-muted` | 60 | |
52 + | `text-secondary` | 78 | |
53 + | `text-primary` | 94 | |
54 +
55 + The exact L values are calibrated so contrast ratios between text-primary/surface, text-secondary/surface, and border/surface match within ±0.3 across modes when measured in WCAG 2.1 terms. Verify with a contrast checker on first implementation; adjust here if a stop drifts.
56 +
57 + ## Hover, pressed, focused, disabled
58 +
59 + Mandatory per [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md#affordance-depth-via-ramp-not-via-color). Computed from the ramp, not separate values.
60 +
61 + For a control at `surface-raised`:
62 +
63 + | State | Surface | Border | Text |
64 + |---|---|---|---|
65 + | default | `surface-raised` | `border` | `text-primary` |
66 + | hover | `surface-overlay` | `border` | `text-primary` |
67 + | pressed | `surface` | `border` | `text-primary` |
68 + | focused | `surface-raised` | `border-strong` (2px ring offset 1px outside the control's geometry) | `text-primary` |
69 + | disabled | `surface-raised` | `border-subtle` | `text-muted` |
70 +
71 + "One step toward the eye" = next-lighter ramp stop, both modes.
72 + "One step away" = next-darker ramp stop, both modes.
73 +
74 + Focus ring is `border-strong`, never an accent color. Focus is chrome, not data.
75 +
76 + ## The information palette
77 +
78 + Locked. Same OKLCH in both modes — accents are recognized by hue, and inverting them per mode would defeat that recognition. Their job is to be unmistakable on either surface, which is why they sit at moderate chroma in the mid-L range where they have adequate contrast against both `surface` (L=96) and `surface` (L=12).
79 +
80 + | Token | OKLCH | Hue family | Meaning |
81 + |---|---|---|---|
82 + | `accent-error` | `oklch(55% 0.18 25)` | red | Error, over-threshold, destructive-confirmed |
83 + | `accent-warn` | `oklch(70% 0.15 85)` | amber | Warning, near-threshold |
84 + | `accent-healthy` | `oklch(62% 0.16 145)` | green | Healthy, success, in-bounds |
85 + | `accent-info` | `oklch(60% 0.16 240)` | blue | Informational, link, in-progress |
86 + | `accent-syntax` | `oklch(55% 0.18 310)` | magenta | Categorical accent, syntax token, fifth-series data |
87 +
88 + Chroma sits between 0.15 and 0.18 — moderate, per design language. All five are in-gamut for sRGB at the stated L.
89 +
90 + Accents never appear on chrome — no accent-tinted backgrounds, no accent borders on inactive controls, no accent focus rings. They appear in data, on glyphs that encode severity, and in syntax highlighting.
91 +
92 + ### Accent-on-surface text rule
93 +
94 + When accent color is rendered as text directly on a surface (e.g. an error message), use the accent value as-is on `surface-raised` or higher. On `surface-sunken` in dark mode, accents at L≈55 can lose contrast; promote to L+5 for that specific pairing or move the message to a higher surface tier.
95 +
96 + ## Typography
97 +
98 + Two monospace fonts with distinct, non-overlapping roles. There is no prose-paired humanist sans; mono everywhere, by design.
99 +
100 + ### Working font: Iosevka (`font-mono-working`)
101 +
102 + The font for anything *authored or read* during work: terminal, code editor, body text, labels, controls, menus, settings descriptions, package-manager output, navigation chrome, section headers.
103 +
104 + - **License:** OFL.
105 + - **Build:** `IosevkaNerdFont` (nerd-patched upstream build for icon coverage).
106 + - **Weights available:** Thin / ExtraLight / Light / Regular / Medium / SemiBold / Bold / ExtraBold / Heavy. Alloy uses Regular (400) and SemiBold (600) only; the rest are unused but available for opt-in.
107 + - **Variant note:** standard Iosevka throughout. Inside terminal emulators where ligatures interfere with column alignment, fall back to `IosevkaTermNerdFont` — same metrics, ligatures off. This is the only sanctioned variant split.
108 + - **Hierarchy lever:** weight (400 → 600), per [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md#typography).
109 +
110 + ### Display font: Departure Mono (`font-mono-display`)
111 +
112 + The font for anything *displayed as a readout*: clocks, calendar dates, status panel numerics (CPU%, network throughput, battery), dashboard values, lockscreen primary surface, splash, big-number widgets. Used for the *value* on an instrument, not for the chrome around the instrument.
113 +
114 + - **License:** OFL.
115 + - **Build:** `DepartureMonoNerdFontMono` from Nerd Fonts v3.4.0 (Departure upstream v1.422). The `Mono` (NFM) variant fits icons inside a single character cell so leading status glyphs align vertically against numeric columns; the non-Mono NF variant lets icons run ~1.5× wide and breaks tabular readouts.
116 + - **Weights available:** Regular only. By design; single-weight is part of the aesthetic.
117 + - **Hierarchy lever:** size + case + tracking, not weight. `READOUT LABELS` are `UPPERCASE` with `tracking-display-caps`; large numerics rely on size alone.
118 + - **Coverage caveat:** Departure's unicode range is limited. Verify before any surface that may render arbitrary user-supplied strings; fall back to Iosevka where coverage is uncertain.
119 +
120 + ### The use-which test
121 +
122 + If you have to ask, ask one question: *is this text being authored/read, or is it being displayed as a value off an instrument?* Authored/read → Iosevka. Displayed-as-readout → Departure. Section headers in working chrome stay Iosevka (they're navigational, not displayed). Big-number values in a dashboard go Departure even when they sit inside a working surface.
123 +
124 + ### Tokens
125 +
126 + | Token | Value |
127 + |---|---|
128 + | `font-mono-working` | `IosevkaNerdFont` |
129 + | `font-mono-working-noligatures` | `IosevkaTermNerdFont` |
130 + | `font-mono-display` | `DepartureMonoNerdFontMono` |
131 + | `size-caption` | 12 |
132 + | `size-body` | 14 |
133 + | `size-section-header` | 16 |
134 + | `size-title` | 20 |
135 + | `size-readout-sm` | 16 |
136 + | `size-readout-md` | 24 |
137 + | `size-readout-lg` | 48 |
138 + | `size-readout-xl` | 72 |
139 + | `weight-body` | 400 |
140 + | `weight-emphasis` | 600 |
141 + | `tracking-body` | 0 |
142 + | `tracking-display` | 0.04em |
143 + | `tracking-display-caps` | 0.08em |
144 + | `line-height-body` | 1.4 |
145 + | `line-height-tabular` | 1.3 |
146 + | `line-height-display` | 1.0 |
147 +
148 + Sizes are integer points; egui consumes them as f32. `line-height-tabular` bumped from 1.2 to 1.3 to give pixel-grid display fonts and nerd-patched glyphs room without clipping.
149 +
150 + ## Geometry
151 +
152 + | Token | Value |
153 + |---|---|
154 + | `space-xs` | 2 |
155 + | `space-sm` | 4 |
156 + | `space-md` | 8 |
157 + | `space-lg` | 16 |
158 + | `space-xl` | 24 |
159 + | `radius-control` | 4 |
160 + | `radius-overlay` | 6 |
161 + | `radius-data` | 0 |
162 + | `border-width-default` | 1 |
163 + | `border-width-focus` | 2 |
164 + | `focus-ring-offset` | 1 |
165 +
166 + `radius-data = 0` makes the square-vs-rounded shape difference explicit per [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md#affordance-depth-via-ramp-not-via-color) — data panels are square, controls have the small radius. Overlays use a slightly larger radius (6) so popovers read as distinct surfaces rather than scaled controls.
167 +
168 + All numeric values are unitless points; egui consumes them as f32.
169 +
170 + ## What's deferred
171 +
172 + - Validating the dark-mode L stops against measured WCAG contrast on a calibrated display.
173 + - Verifying Departure's unicode coverage and documenting an explicit fallback chain (likely Iosevka) for code points outside its range.
174 + - Icon stroke weight, line-art rules — these belong with the icon-theme decision, also open per todo.
175 +
176 + ## How this file is consumed
177 +
178 + Until the egui design-system crate is scaffolded, this is markdown. When scaffolded:
179 +
180 + 1. These values are transcribed into `alloy_ui/tokens.toml` verbatim. The TOML is the build-time input.
181 + 2. `build.rs` parses the TOML, converts OKLCH→sRGB, emits `tokens.rs` with typed constants (`Color32`, `f32`, `&'static str`).
182 + 3. Rust code only ever imports from `tokens.rs`. No app or widget defines a color, size, or radius locally.
183 +
184 + Changes to tokens flow: edit this file → edit `tokens.toml` → rebuild → all surfaces update. This file stays canonical because the TOML can be regenerated from it but not vice versa (rationale lines, alternative considerations, and the dark-mode derivation argument don't survive a round-trip through TOML).
Binary file
@@ -1,0 +1,1240 @@
1 + <!doctype html>
2 + <html lang="en">
3 + <head>
4 + <meta charset="utf-8">
5 + <title>Alloy — UX mockup</title>
6 + <meta name="viewport" content="width=device-width, initial-scale=1">
7 + <style>
8 + /* ------- Fonts ------- */
9 + @font-face {
10 + font-family: "Departure Mono";
11 + src: url("fonts/DepartureMonoNerdFontMono-Regular.otf") format("opentype");
12 + font-weight: 400;
13 + font-display: block;
14 + }
15 + @font-face {
16 + font-family: "Iosevka";
17 + src: url("https://cdn.jsdelivr.net/npm/@fontsource/iosevka@5.2.6/files/iosevka-latin-400-normal.woff2") format("woff2");
18 + font-weight: 400;
19 + font-style: normal;
20 + font-display: swap;
21 + }
22 + @font-face {
23 + font-family: "Iosevka";
24 + src: url("https://cdn.jsdelivr.net/npm/@fontsource/iosevka@5.2.6/files/iosevka-latin-600-normal.woff2") format("woff2");
25 + font-weight: 600;
26 + font-style: normal;
27 + font-display: swap;
28 + }
29 +
30 + /* ------- Tokens (light mode canonical) ------- */
31 + :root {
32 + /* Ramp — H=80, C=0.012 throughout */
33 + --surface-sunken: oklch(92% 0.012 80);
34 + --surface: oklch(96% 0.012 80);
35 + --surface-raised: oklch(98% 0.012 80);
36 + --surface-overlay: oklch(99.5% 0.012 80);
37 + --border-subtle: oklch(88% 0.012 80);
38 + --border: oklch(80% 0.012 80);
39 + --border-strong: oklch(65% 0.012 80);
40 + --text-muted: oklch(55% 0.012 80);
41 + --text-secondary: oklch(38% 0.012 80);
42 + --text-primary: oklch(18% 0.012 80);
43 +
44 + /* Accents (mode-invariant) */
45 + --accent-error: oklch(55% 0.18 25);
46 + --accent-warn: oklch(70% 0.15 85);
47 + --accent-healthy: oklch(62% 0.16 145);
48 + --accent-info: oklch(60% 0.16 240);
49 + --accent-syntax: oklch(55% 0.18 310);
50 +
51 + /* Typography */
52 + --font-mono-working: "Iosevka", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
53 + --font-mono-display: "Departure Mono", "Iosevka", ui-monospace, monospace;
54 + --size-caption: 12px;
55 + --size-body: 14px;
56 + --size-section-header: 16px;
57 + --size-title: 20px;
58 + --size-readout-sm: 16px;
59 + --size-readout-md: 24px;
60 + --size-readout-lg: 48px;
61 + --size-readout-xl: 72px;
62 + --weight-body: 400;
63 + --weight-emphasis: 600;
64 + --tracking-body: 0;
65 + --tracking-display: 0.04em;
66 + --tracking-display-caps: 0.08em;
67 + --line-height-body: 1.4;
68 + --line-height-tabular: 1.3;
69 + --line-height-display: 1.0;
70 +
71 + /* Geometry */
72 + --space-xs: 2px;
73 + --space-sm: 4px;
74 + --space-md: 8px;
75 + --space-lg: 16px;
76 + --space-xl: 24px;
77 + --radius-control: 4px;
78 + --radius-overlay: 6px;
79 + --radius-data: 0;
80 + --border-width-default: 1px;
81 + --border-width-focus: 2px;
82 + --focus-ring-offset: 1px;
83 + }
84 +
85 + /* Dark-mode polarity flip — same H/C, repositioned L stops per TOKENS.md */
86 + body[data-mode="dark"] {
87 + --surface-sunken: oklch(8% 0.012 80);
88 + --surface: oklch(12% 0.012 80);
89 + --surface-raised: oklch(15% 0.012 80);
90 + --surface-overlay: oklch(19% 0.012 80);
91 + --border-subtle: oklch(22% 0.012 80);
92 + --border: oklch(30% 0.012 80);
93 + --border-strong: oklch(48% 0.012 80);
94 + --text-muted: oklch(60% 0.012 80);
95 + --text-secondary: oklch(78% 0.012 80);
96 + --text-primary: oklch(94% 0.012 80);
97 + }
98 +
99 + /* ------- Base ------- */
100 + * { box-sizing: border-box; }
101 + html, body {
102 + margin: 0;
103 + padding: 0;
104 + background: var(--surface);
105 + color: var(--text-primary);
106 + font-family: var(--font-mono-working);
107 + font-size: var(--size-body);
108 + line-height: var(--line-height-body);
109 + font-weight: var(--weight-body);
110 + }
111 +
112 + main {
113 + max-width: 1100px;
114 + margin: 0 auto;
115 + padding: var(--space-xl);
116 + }
117 +
118 + /* ------- Header strip ------- */
119 + .head {
120 + display: flex;
121 + align-items: baseline;
122 + justify-content: space-between;
123 + border-bottom: var(--border-width-default) solid var(--border);
124 + padding-bottom: var(--space-lg);
125 + margin-bottom: var(--space-xl);
126 + }
127 + .head h1 {
128 + font-family: var(--font-mono-display);
129 + font-size: var(--size-readout-md);
130 + font-weight: 400;
131 + letter-spacing: var(--tracking-display-caps);
132 + margin: 0;
133 + text-transform: uppercase;
134 + }
135 + .head .meta {
136 + font-size: var(--size-caption);
137 + color: var(--text-muted);
138 + }
139 + .head .meta strong { color: var(--text-secondary); font-weight: var(--weight-emphasis); }
140 +
141 + .mode-toggle {
142 + font-family: var(--font-mono-working);
143 + font-size: var(--size-caption);
144 + text-transform: uppercase;
145 + letter-spacing: var(--tracking-display-caps);
146 + background: var(--surface-raised);
147 + border: var(--border-width-default) solid var(--border);
148 + border-radius: var(--radius-control);
149 + padding: var(--space-sm) var(--space-md);
150 + color: var(--text-primary);
151 + cursor: pointer;
152 + }
153 + .mode-toggle:hover { background: var(--surface-overlay); }
154 + .mode-toggle:active { background: var(--surface); }
155 + .mode-toggle:focus-visible {
156 + outline: var(--border-width-focus) solid var(--border-strong);
157 + outline-offset: var(--focus-ring-offset);
158 + }
159 +
160 + /* ------- Section pattern ------- */
161 + section {
162 + margin-bottom: var(--space-xl);
163 + padding-bottom: var(--space-xl);
164 + border-bottom: var(--border-width-default) solid var(--border-subtle);
165 + }
166 + section:last-child { border-bottom: none; }
167 + section > h2 {
168 + font-family: var(--font-mono-working);
169 + font-size: var(--size-section-header);
170 + font-weight: var(--weight-emphasis);
171 + margin: 0 0 var(--space-md);
172 + color: var(--text-primary);
173 + }
174 + section > .desc {
175 + color: var(--text-secondary);
176 + margin: 0 0 var(--space-lg);
177 + font-size: var(--size-body);
178 + }
179 + section > .desc code {
180 + background: var(--surface-sunken);
181 + padding: 0 var(--space-xs);
182 + border-radius: var(--radius-control);
183 + font-size: 13px;
184 + }
185 +
186 + /* ------- Ramp swatches ------- */
187 + .ramps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
188 + .ramp-block {
189 + background: var(--surface-raised);
190 + border: var(--border-width-default) solid var(--border);
191 + border-radius: var(--radius-control);
192 + padding: var(--space-md);
193 + }
194 + .ramp-block h3 {
195 + font-family: var(--font-mono-display);
196 + font-size: var(--size-readout-sm);
197 + letter-spacing: var(--tracking-display-caps);
198 + text-transform: uppercase;
199 + font-weight: 400;
200 + margin: 0 0 var(--space-md);
201 + color: var(--text-secondary);
202 + }
203 + .swatch {
204 + display: grid;
205 + grid-template-columns: 28px 1fr auto;
206 + align-items: center;
207 + gap: var(--space-md);
208 + padding: var(--space-xs) 0;
209 + font-size: var(--size-caption);
210 + }
211 + .swatch .chip {
212 + width: 28px;
213 + height: 28px;
214 + border: var(--border-width-default) solid var(--border);
215 + border-radius: var(--radius-data);
216 + }
217 + .swatch .name { font-weight: var(--weight-emphasis); }
218 + .swatch .val { color: var(--text-muted); font-size: var(--size-caption); }
219 +
220 + /* ------- Accents ------- */
221 + .accents { display: flex; gap: var(--space-md); flex-wrap: wrap; }
222 + .accent-card {
223 + flex: 1 1 180px;
224 + border: var(--border-width-default) solid var(--border);
225 + border-radius: var(--radius-control);
226 + background: var(--surface-raised);
227 + padding: var(--space-md);
228 + }
229 + .accent-card .dot {
230 + width: 14px; height: 14px;
231 + border-radius: 50%;
232 + display: inline-block;
233 + vertical-align: middle;
234 + margin-right: var(--space-sm);
235 + }
236 + .accent-card .lbl {
237 + text-transform: uppercase;
238 + letter-spacing: var(--tracking-display-caps);
239 + font-size: var(--size-caption);
240 + color: var(--text-secondary);
241 + }
242 + .accent-card .val {
243 + display: block;
244 + margin-top: var(--space-sm);
245 + color: var(--text-muted);
246 + font-size: var(--size-caption);
247 + }
248 +
249 + /* ------- Typography samples ------- */
250 + .type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
251 + .type-block {
252 + border: var(--border-width-default) solid var(--border);
253 + background: var(--surface-raised);
254 + padding: var(--space-lg);
255 + border-radius: var(--radius-control);
256 + }
257 + .type-block .role {
258 + font-size: var(--size-caption);
259 + text-transform: uppercase;
260 + letter-spacing: var(--tracking-display-caps);
261 + color: var(--text-muted);
262 + margin-bottom: var(--space-md);
263 + }
264 + .type-block .working-line {
265 + font-family: var(--font-mono-working);
266 + margin: var(--space-xs) 0;
267 + }
268 + .type-block .display-line {
269 + font-family: var(--font-mono-display);
270 + margin: var(--space-xs) 0;
271 + letter-spacing: var(--tracking-display);
272 + line-height: var(--line-height-display);
273 + }
274 + .type-block .anno {
275 + display: inline-block;
276 + min-width: 7em;
277 + color: var(--text-muted);
278 + font-size: var(--size-caption);
279 + }
280 +
281 + /* ------- Button states grid ------- */
282 + .states-grid {
283 + display: grid;
284 + grid-template-columns: 7em repeat(5, 1fr);
285 + align-items: center;
286 + gap: var(--space-md);
287 + background: var(--surface-raised);
288 + padding: var(--space-lg);
289 + border: var(--border-width-default) solid var(--border);
290 + border-radius: var(--radius-control);
291 + }
292 + .states-grid > .col-head {
293 + font-size: var(--size-caption);
294 + text-transform: uppercase;
295 + letter-spacing: var(--tracking-display-caps);
296 + color: var(--text-muted);
297 + text-align: center;
298 + }
299 + .states-grid > .row-head {
300 + font-size: var(--size-caption);
301 + text-transform: uppercase;
302 + letter-spacing: var(--tracking-display-caps);
303 + color: var(--text-muted);
304 + }
305 +
306 + /* Button — base + states (statics; we render each forced state explicitly) */
307 + .btn {
308 + font-family: var(--font-mono-working);
309 + font-size: var(--size-body);
310 + font-weight: var(--weight-emphasis);
311 + border-radius: var(--radius-control);
312 + padding: var(--space-sm) var(--space-md);
313 + border: var(--border-width-default) solid var(--border);
314 + background: var(--surface-raised);
315 + color: var(--text-primary);
316 + cursor: pointer;
317 + text-align: center;
318 + display: inline-block;
319 + width: 100%;
320 + }
321 + .btn.state-hover { background: var(--surface-overlay); }
322 + .btn.state-pressed { background: var(--surface); }
323 + .btn.state-focused { outline: var(--border-width-focus) solid var(--border-strong); outline-offset: var(--focus-ring-offset); }
324 + .btn.state-disabled { background: var(--surface-raised); color: var(--text-muted); border-color: var(--border-subtle); cursor: not-allowed; }
325 +
326 + /* ------- Form elements ------- */
327 + .form-grid {
328 + display: grid;
329 + grid-template-columns: 1fr 1fr;
330 + gap: var(--space-lg);
331 + background: var(--surface-raised);
332 + padding: var(--space-lg);
333 + border: var(--border-width-default) solid var(--border);
334 + border-radius: var(--radius-control);
335 + }
336 + .field { display: block; }
337 + .field > label {
338 + display: block;
339 + font-size: var(--size-caption);
340 + text-transform: uppercase;
341 + letter-spacing: var(--tracking-display-caps);
342 + color: var(--text-muted);
343 + margin-bottom: var(--space-sm);
344 + }
345 + .field > input[type="text"],
346 + .field > select {
347 + width: 100%;
348 + font-family: var(--font-mono-working);
349 + font-size: var(--size-body);
350 + background: var(--surface-sunken);
351 + color: var(--text-primary);
352 + border: var(--border-width-default) solid var(--border);
353 + border-radius: var(--radius-control);
354 + padding: var(--space-sm) var(--space-md);
355 + }
356 + .field > input[type="text"]:focus,
357 + .field > select:focus {
358 + outline: var(--border-width-focus) solid var(--border-strong);
359 + outline-offset: var(--focus-ring-offset);
360 + }
361 +
362 + /* Custom checkbox */
363 + .check {
364 + display: inline-flex;
365 + align-items: center;
366 + gap: var(--space-md);
367 + cursor: pointer;
368 + user-select: none;
369 + }
370 + .check input { position: absolute; opacity: 0; pointer-events: none; }
371 + .check .box {
372 + width: 18px; height: 18px;
373 + border: var(--border-width-default) solid var(--border);
374 + background: var(--surface-sunken);
375 + border-radius: var(--radius-control);
376 + display: inline-flex;
377 + align-items: center;
378 + justify-content: center;
379 + }
380 + .check input:checked + .box::after {
381 + content: "";
382 + width: 10px; height: 10px;
383 + background: var(--text-primary);
384 + border-radius: 1px;
385 + }
386 + .check input:focus-visible + .box {
387 + outline: var(--border-width-focus) solid var(--border-strong);
388 + outline-offset: var(--focus-ring-offset);
389 + }
390 +
391 + /* Custom switch */
392 + .switch {
393 + display: inline-flex;
394 + align-items: center;
395 + gap: var(--space-md);
396 + cursor: pointer;
397 + user-select: none;
398 + }
399 + .switch input { position: absolute; opacity: 0; pointer-events: none; }
400 + .switch .track {
401 + width: 36px; height: 20px;
402 + background: var(--surface-sunken);
403 + border: var(--border-width-default) solid var(--border);
404 + border-radius: 10px;
405 + position: relative;
406 + transition: background 0.08s linear;
407 + }
408 + .switch .track::after {
409 + content: "";
410 + position: absolute;
411 + top: 2px; left: 2px;
412 + width: 14px; height: 14px;
413 + background: var(--text-secondary);
414 + border-radius: 50%;
415 + transition: transform 0.08s linear, background 0.08s linear;
416 + }
417 + .switch input:checked + .track { background: var(--border-strong); }
418 + .switch input:checked + .track::after { transform: translateX(16px); background: var(--surface-raised); }
419 + .switch input:focus-visible + .track {
420 + outline: var(--border-width-focus) solid var(--border-strong);
421 + outline-offset: var(--focus-ring-offset);
422 + }
423 +
424 + /* ------- Status readout panel (Departure showcase) ------- */
425 + .status {
426 + background: var(--surface-raised);
427 + border: var(--border-width-default) solid var(--border);
428 + border-radius: var(--radius-control);
429 + padding: var(--space-lg);
430 + display: grid;
431 + grid-template-columns: 1fr 1fr;
432 + gap: var(--space-lg);
433 + }
434 + .readout {
435 + display: flex;
436 + flex-direction: column;
437 + gap: var(--space-xs);
438 + border-left: var(--border-width-default) solid var(--border-subtle);
439 + padding-left: var(--space-md);
440 + }
441 + .readout .lbl {
442 + font-family: var(--font-mono-display);
443 + font-size: var(--size-caption);
444 + text-transform: uppercase;
445 + letter-spacing: var(--tracking-display-caps);
446 + color: var(--text-muted);
447 + }
448 + .readout .val {
449 + font-family: var(--font-mono-display);
450 + font-size: var(--size-readout-lg);
451 + line-height: var(--line-height-display);
452 + letter-spacing: var(--tracking-display);
453 + color: var(--text-primary);
454 + font-variant-numeric: tabular-nums;
455 + }
456 + .readout .val .unit {
457 + font-size: var(--size-readout-md);
458 + color: var(--text-muted);
459 + }
460 + .readout .sub {
461 + font-family: var(--font-mono-working);
462 + font-size: var(--size-caption);
463 + color: var(--text-muted);
464 + }
465 + .bigclock {
466 + grid-column: span 2;
467 + text-align: center;
468 + border-left: none;
469 + border-bottom: var(--border-width-default) solid var(--border-subtle);
470 + padding-bottom: var(--space-lg);
471 + padding-left: 0;
472 + }
473 + .bigclock .val {
474 + font-size: var(--size-readout-xl);
475 + letter-spacing: var(--tracking-display);
476 + }
477 +
478 + /* ------- Settings row pattern (composed example) ------- */
479 + .window {
480 + background: var(--surface-raised);
481 + border: var(--border-width-default) solid var(--border);
482 + border-radius: var(--radius-control);
483 + overflow: hidden;
484 + }
485 + .window > .titlebar {
486 + display: flex;
487 + align-items: center;
488 + justify-content: space-between;
489 + padding: var(--space-md) var(--space-lg);
490 + background: var(--surface-overlay);
491 + border-bottom: var(--border-width-default) solid var(--border-subtle);
492 + }
493 + .window > .titlebar .title {
494 + font-size: var(--size-caption);
495 + text-transform: uppercase;
496 + letter-spacing: var(--tracking-display-caps);
497 + color: var(--text-secondary);
498 + }
499 + .window > .body {
500 + display: grid;
Lines truncated
A docs/todo.md +64
@@ -1,0 +1,64 @@
1 + # Alloy todo
2 +
3 + ## Open questions to resolve
4 +
5 + - [ ] Terminal pick: alacritty / wezterm / rio / cosmic-term. Key axis: sixel image previews in yazi (hard requirement → rio; nice-to-have → alacritty fine).
6 + - [ ] XDG icon theme for *adopted* apps (cosmic-files, file managers, MIME-type icons): build, adopt cosmic-icons, or pull from a standard set? Authored apps already covered by [ICONOGRAPHY.md](ICONOGRAPHY.md) — this question is only about icons consumed by third-party Linux apps that read `XDG_ICON_THEME`.
7 + - [ ] cosmic-notifications under Niri: verify whether it runs cleanly enough to be the v0/v1 daemon (would be more Rust-aligned than mako).
8 +
9 + ## Pre-v0 work
10 +
11 + - [ ] Decide image composition strategy (alongside-ublue means Alloy owns this — what tool?).
12 + - [x] Define the ramp concretely per [DESIGN-LANGUAGE.md](DESIGN-LANGUAGE.md): a sequence of (H, C, L) stops in OKLCH (or equivalent perceptual space), named semantically (`surface`, `surface-raised`, `text-primary`, `text-muted`, `border`, focus, etc). Light-mode definition is canonical; dark mode is the lightness-inverted derivative. → [TOKENS.md](TOKENS.md)
13 + - [x] Lock the fixed accent set (red / yellow / green / blue / magenta) to concrete OKLCH values at moderate saturation. These are global and apply identically across authored apps. → [TOKENS.md](TOKENS.md#the-information-palette)
14 + - [ ] Validate the dark-mode L stops against measured WCAG contrast on a calibrated display (deferred from TOKENS.md).
15 + - [x] Pick the working monospace family for all authored chrome. → **Iosevka** (nerd-patched, six weights restore weight as the primary hierarchy lever). See [TOKENS.md#working-font-iosevka-font-mono-working](TOKENS.md#working-font-iosevka-font-mono-working).
16 + - [x] Pick the display monospace for readouts and instrument values. → **Departure Mono** (single-weight, pixel-derived; mil-spec/pip-boy register). See [TOKENS.md#display-font-departure-mono-font-mono-display](TOKENS.md#display-font-departure-mono-font-mono-display).
17 + - [x] Decide whether to pair a humanist sans for prose surfaces. → **No.** Prose stays in the working mono. Mono-only is part of the brand.
18 + - [x] Verify nerd-patched Departure exists upstream. → Yes, `DepartureMonoNerdFontMono` from Nerd Fonts v3.4.0 (Departure v1.422). Locked in TOKENS.md.
19 + - [ ] Audit Departure's unicode coverage; document the fallback chain (Iosevka) for out-of-range code points.
20 + - [x] Set up the repo: git init, license, contribution model. → **GPLv3-or-later** (deliberate pick; egui is MIT/Apache so the choice was open). [LICENSE](../LICENSE), [CONTRIBUTING.md](../CONTRIBUTING.md).
21 + - [ ] Branding assets: wordmark/logotype, repo social card, favicon. Deferred until first user-facing surface ships.
22 + - [ ] Scaffold the Alloy egui design-system crate (themed widgets, extension traits on `egui::Ui`, palette + typography constants).
23 + - [ ] Pick the first concrete deliverable to build (lockscreen v1 or package GUI — both are listed as egui apps; sequencing matters).
24 +
25 + ## v0 stack to package and document
26 +
27 + Curated install of the C/non-Alloy-authored picks, with default configs:
28 + - Niri (`niri.kdl` defaults including screenshot keybinds)
29 + - Ironbar (default modules + Alloy-flavored theme)
30 + - swaylock
31 + - anyrun (curated plugin set)
32 + - mako (default config)
33 + - satty (annotation defaults)
34 + - yazi (preview/plugin defaults)
35 + - cosmic-files (Flatpak or layered?)
36 + - Terminal (pending decision)
37 +
38 + ## v1 deliverables
39 +
40 + - [ ] egui design-system crate v1 (palette, type, themed widgets, extension traits).
41 + - [ ] Lockscreen (egui, ext-session-lock-v1, marquee app #1).
42 + - [ ] Package GUI (egui, marquee app #2 — pedagogical wedge).
43 +
44 + ## v2+
45 +
46 + - [ ] egui notification daemon (marquee app #3).
47 + - [ ] Bar in egui (eventual).
48 +
49 + ## v3+ candidates
50 +
51 + - [ ] **`cast`** — Figma plugin / Rust CLI that reads color styles, text styles, spacing, and radii from an Alloy design file in Figma and emits `tokens.toml`. ~2-week scope if the Figma file is structured for export. See [COMPONENT-LIBRARY.md](COMPONENT-LIBRARY.md#late-term-figma--tokens-and-maybe-more). Only meaningful once a designer is actually in the loop.
52 + - [ ] Possible follow-on: static `impl Widget` skeleton generation from Figma frames (narrower than imagined; only works for constrained component patterns).
53 +
54 + ## Late-term research
55 +
56 + - [ ] **`crucible`** (working name) — a design tool native to immediate-mode UI. Component as unit of work, token-first authoring, live render against sample data, composition grammar as the engineer-facing artifact. See [RESEARCH-IMMEDIATE-MODE-DESIGN.md](RESEARCH-IMMEDIATE-MODE-DESIGN.md). v4+ at earliest; its own sibling project if pursued. The architectural prereqs for keeping this door open are already in [COMPONENT-LIBRARY.md](COMPONENT-LIBRARY.md).
57 +
58 + ## v0 mockup
59 +
60 + - [x] HTML mockup of basic UX elements covering ramps, typography, control states, form elements, status readouts, hero iconography, dock, and a composed settings window. → [mockups/index.html](mockups/index.html). Placeholders for iso illustrations; v1 needs real drawings.
61 +
62 + ## Decisions log
63 +
64 + See [STACK.md](STACK.md) and [COSMIC.md](COSMIC.md). When a decision changes, update the doc and note the change in commit history rather than maintaining a separate changelog.