catppuccin icon indicating copy to clipboard operation
catppuccin copied to clipboard

Marta File Manager

Open grokdesigns opened this issue 1 year ago • 6 comments

Link to repository

https://github.com/grokdesigns/marta-catppuccin.git

Screenshots

Image

https://marta.sh/

Any additional comments?

No response

Submission Guidelines

  • [x] I have read and followed Catppuccin's submission guidelines.

grokdesigns avatar Mar 23 '25 21:03 grokdesigns

  1. For the Whiskers template, you don't need to do {%- set palette = flavor.colors -%} and access colors under palette like palette.red. Because you are using a matrix of flavors, colors are available globally under just red or <insert-name-of-color>. So you can remove that {%- set palette = flavor.colors -%} line and you can remove the palette. before each color name.
  2. Instead of using | upper on every hex color, you should use whiskers.hex_format: https://github.com/catppuccin/whiskers#hex-format.
---
whiskers:
  version: 2.5.1
  matrix:
    - variant: ["generated-themes"]
    - flavor
  filename: "catppuccin-marta-{{flavor.identifier}}.theme"
+ hex_format: "{{R}}{{G}}{{B}}{{Z}}"
---

You can also prefix colors with # by default:

---
whiskers:
  version: 2.5.1
  matrix:
    - variant: ["generated-themes"]
    - flavor
  filename: "catppuccin-marta-{{flavor.identifier}}.theme"
- hex_format: "{{R}}{{G}}{{B}}{{Z}}"
+ hex_format: "#{{R}}{{G}}{{B}}{{Z}}"
---
  1. What's the point of the variant variant in the matrix? variant: ["generated-themes"]
  2. It looks like you are manually moving the template output to output/? Instead we should use the themes/ directory for output themes, and this can be done automatically:
- filename: "catppuccin-marta-{{flavor.identifier}}.theme"
+ filename: "themes/catppuccin-marta-{{flavor.identifier}}.theme"

While we are at it, we can remove the "marta-" text from the filename:

- filename: "themes/catppuccin-marta-{{flavor.identifier}}.theme"
+ filename: "themes/catppuccin-{{flavor.identifier}}.theme"

uncenter avatar Mar 23 '25 22:03 uncenter

@uncenter Thanks for the advice! Fairly new to these templates. I've made the changes you recommended.

grokdesigns avatar Mar 23 '25 22:03 grokdesigns

Sweet!.

  1. You still need to remove the | upper filters from every color code; that is no longer needed because of the hex_format setting we configured.
  2. In {% if flavor.identifier=='latte'%}light{% else %}dark{% endif %}, instead of checking if the flavor is latte with flavor.identifier=='latte' we should use the flavor.light boolean.
  3. Since there is only one template, we can move it out of templates/ and into the root of the repository. It should be called marta.tera (not marta-catppuccin.tera).
  4. You might want to remove the blank line between the end of the front matter and the line with name "Catppuccin - {{flavor.identifier}}" - this is causing that extra line at the top of the generated theme files.
  5. In the line with name "Catppuccin - {{flavor.identifier}}", you could try:
-name "Catppuccin - {{flavor.identifier}}"
+name "Catppuccin {{flavor.name}}"

Please test the Frappé flavor specifically in Marta, because the name field for the flavor has an accent mark that may or may not work with Marta (it most likely will be fine but it can't hurt to be extra careful!).

uncenter avatar Mar 23 '25 23:03 uncenter

@uncenter Don't know how I missed the upper thing, sorry! I think I got everything this time.

Frappé worked without any issues: Image

grokdesigns avatar Mar 24 '25 00:03 grokdesigns

@uncenter Don't know how I missed the upper thing, sorry! I think I got everything this time.

No worries, nice work. You don't need to check flavor.light==true since that equality expression is redundant; if flavor.light is true, it will evaluate as true, so you don't need to doubly check if it is true with ==true - does that make sense?

-    appearance "{% if flavor.light==true %}light{% else %}dark{% endif %}"
+    appearance "{% if flavor.light %}light{% else %}dark{% endif %}"

Frappé worked without any issues: Image

Sweet! I think we can drop the dash (-) between "Catppuccin" and the name of the flavor, as we normally do with other ports.

uncenter avatar Mar 24 '25 00:03 uncenter

Done and done!

grokdesigns avatar Mar 24 '25 00:03 grokdesigns