Skip to content

Commit

Permalink
refactor: clean up whiskers build process (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
uncenter authored Jun 4, 2024
1 parent 16dcbfc commit 21a25af
Show file tree
Hide file tree
Showing 116 changed files with 128 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
if: ${{ steps.release.outputs.release_created }}

- run: |
curl -fsSL https://github.com/catppuccin/toolbox/releases/download/whiskers-v2.1.0/whiskers-x86_64-unknown-linux-gnu -o $RUNNER_TEMP/whiskers
curl -fsSL https://github.com/catppuccin/toolbox/releases/download/whiskers-v2.3.0/whiskers-x86_64-unknown-linux-gnu -o $RUNNER_TEMP/whiskers
chmod +x $RUNNER_TEMP/whiskers
echo $RUNNER_TEMP >> $GITHUB_PATH
if: ${{ steps.release.outputs.release_created }}
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 2 additions & 29 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
# Default help menu
_default:
@just --list

whiskers_cmd := "whiskers"
template_path := "lazygit.tera"

output_base := "themes"
other_output_base := "themes-mergable"

# Setup the output location
setup:
mkdir -p {{output_base}}
mkdir -p {{output_base}}/mocha
mkdir -p {{output_base}}/macchiato
mkdir -p {{output_base}}/latte
mkdir -p {{output_base}}/frappe

mkdir -p {{other_output_base}}
mkdir -p {{other_output_base}}/mocha
mkdir -p {{other_output_base}}/macchiato
mkdir -p {{other_output_base}}/latte
mkdir -p {{other_output_base}}/frappe

# Teardown the output location
clean:
rm -r {{output_base}}
rm -r {{other_output_base}}

# Generate all flavors with their accents
all: setup
whiskers {{template_path}}
build:
whiskers lazygit.tera
37 changes: 10 additions & 27 deletions lazygit.tera
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
whiskers:
version: 2.0.0
version: 2.3.0
matrix:
- variant: ["themes", "themes-mergable"]
- flavor
- accent
filename: "{{variant}}/{{flavor.identifier}}/{{accent}}.yml"
---

{%- macro theme() %}
{%- set palette = flavor.colors -%}
{%- if variant == "themes" -%} {#- Variant for copy/pasting into user config -#}
theme:
activeBorderColor:
- '#{{ palette[accent].hex }}'
Expand All @@ -32,29 +33,11 @@ theme:

authorColors:
'*': '#{{ palette.lavender.hex }}'
{%- else -%} {#- Variant for merging configs together -#}
gui:
theme:
activeBorderColor:
- '#{{ palette[accent].hex }}'
- bold
inactiveBorderColor:
- '#{{ palette.subtext0.hex }}'
optionsTextColor:
- '#{{ palette.blue.hex }}'
selectedLineBgColor:
- '#{{ palette.surface0.hex }}'
cherryPickedCommitBgColor:
- '#{{ palette.surface1.hex }}'
cherryPickedCommitFgColor:
- '#{{ palette[accent].hex }}'
unstagedChangesColor:
- '#{{ palette.red.hex }}'
defaultFgColor:
- '#{{ palette.text.hex }}'
searchingActiveBorderColor:
- '#{{ palette.yellow.hex }}'
{%- endmacro %}

authorColors:
'*': '#{{ palette.lavender.hex }}'
{%- endif %}
{%- if variant == "themes" -%}
{{ self::theme() }}
{%- else -%}
gui:
{{ self::theme() | indent(prefix=" ") }}
{%- endif %}
2 changes: 1 addition & 1 deletion themes-mergable/frappe/blue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/flamingo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/green.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/lavender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/maroon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/mauve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/peach.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/pink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/red.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/rosewater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/sapphire.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/sky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/teal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/frappe/yellow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#e5c890'

authorColors:
'*': '#babbf1'
'*': '#babbf1'
2 changes: 1 addition & 1 deletion themes-mergable/latte/blue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/flamingo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/green.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/lavender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/maroon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/mauve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/peach.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/pink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/red.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/rosewater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/sapphire.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/sky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/teal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/latte/yellow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#df8e1d'

authorColors:
'*': '#7287fd'
'*': '#7287fd'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/blue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/flamingo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/green.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/lavender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/maroon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/mauve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/peach.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/pink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/red.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/rosewater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/sapphire.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
2 changes: 1 addition & 1 deletion themes-mergable/macchiato/sky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ gui:
- '#eed49f'

authorColors:
'*': '#b7bdf8'
'*': '#b7bdf8'
Loading

0 comments on commit 21a25af

Please sign in to comment.