Skip to content

Commit

Permalink
feat: generate configs, fix out of date config options (#10)
Browse files Browse the repository at this point in the history
* feat: generate configs, fix out of date config options

* fix: use yml instead of yaml, merge

* fix: implement searchingActiveBorderColor

* fix: numbering typo

Co-authored-by: Isabel <71222764+isabelroses@users.noreply.github.com>

* feat: allow mergable configs

* doc: correct readme

---------

Co-authored-by: Isabel <71222764+isabelroses@users.noreply.github.com>
  • Loading branch information
nullishamy and isabelroses authored Sep 9, 2023
1 parent 231e265 commit 65c3b60
Show file tree
Hide file tree
Showing 170 changed files with 3,845 additions and 6 deletions.
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,19 @@

1. Clone this repository locally
2. Ensure `~/.config/lazygit` exists. If it doesn't, you can run `lazygit` to launch and setup the directory.
3. Choose the flavor you want (located [in the `themes` directory of this repository](./themes))
4. Choose the accent you want from within the flavor directory.
5. Replace the `theme` section of `~/.config/lazygit/config.yml` with the theme you want to activate (from `themes`).
For example, if you want to use the catppuccin **mocha** theme, with the **blue** accent, then copy the contents of [`themes/mocha/blue.yml`](./themes/mocha/blue.ymlb) and paste them directly into your lazygit `config.yml` as follows:

At this point, you will have to decide how you want to load the theme.

You can either copy it straight into your `~/.config/lazygit/config.yml` file, or
add flags to lazygit which will merge it from our presets.


### If you want to merge with your own config:
1. Choose the flavor you want (from `./themes`)
2. Choose the accent you want from within the flavor directory.
3. Replace the `theme` section of `~/.config/lazygit/config.yml` with the theme you want to use (from `themes`).

For example, if you want to use the catppuccin **mocha** theme, with the **blue** accent, then copy the contents of [`themes/mocha/mocha-blue.yml`](./themes/mocha/mocha-blue.yml) and paste them directly into your lazygit `config.yml` as follows:
<details>
<summary>config.yml</summary>

Expand Down Expand Up @@ -72,8 +80,22 @@
searchingActiveBorderColor:
- '#f9e2af'
```
</details>
4. Close and re-open lazygit to see your new theme!
### If you want to use our preset:
1. Choose the flavor you want (from `./themes-mergable/`)
2. Choose the accent you want from within the flavor directory.
3. Copy your chosen theme file into `~/.config/lazygit`
4. Change your lazygit startup command (you may want to set a shell alias) to the following:
```bash
# Replacing <your-theme> with the relevant theme file
lazygit --use-config-file="$HOME/.config/lazygit/config.yml,<your-theme>.yml"
# or
LG_CONFIG_FILE="$HOME/.config/lazygit/config.yml,<your-theme>.yml" lazygit
```

5. Close and re-open lazygit to see your new theme!

## 🙋 FAQ

Expand Down
11 changes: 10 additions & 1 deletion build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const accents = [
"lavender",
] as const;

const start = performance.now()
let count = 0

Object.entries(variants)
.forEach(([name, palette]) => {
for (const accent of accents) {
Expand All @@ -38,6 +41,12 @@ Object.entries(variants)
},
};

Deno.writeTextFileSync(`./themes/${name}/${accent}.yml`, stringifyYaml(theme));
Deno.writeTextFileSync(`./themes/${name}/${name}-${accent}.yml`, stringifyYaml(theme));
Deno.writeTextFileSync(`./themes-mergable/${name}/${name}-${accent}.yml`, stringifyYaml({
gui: theme
}));
count += 2
}
});

console.log('Built', count, 'files in', performance.now() - start, 'ms');
23 changes: 23 additions & 0 deletions themes-mergable/frappe/blue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#8caaee'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#8caaee'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/flamingo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#eebebe'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#eebebe'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-blue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#8caaee'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#8caaee'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-flamingo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#eebebe'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#eebebe'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-green.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#a6d189'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#a6d189'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-lavender.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#babbf1'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#babbf1'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-maroon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#ea999c'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#ea999c'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-mauve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#ca9ee6'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#ca9ee6'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-peach.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#ef9f76'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#ef9f76'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-pink.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#f4b8e4'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#f4b8e4'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-red.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#e78284'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#e78284'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-rosewater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#f2d5cf'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#f2d5cf'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
23 changes: 23 additions & 0 deletions themes-mergable/frappe/frappe-sapphire.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gui:
theme:
activeBorderColor:
- '#85c1dc'
- bold
inactiveBorderColor:
- '#a5adce'
optionsTextColor:
- '#8caaee'
selectedLineBgColor:
- '#414559'
selectedRangeBgColor:
- '#414559'
cherryPickedCommitBgColor:
- '#51576d'
cherryPickedCommitFgColor:
- '#85c1dc'
unstagedChangesColor:
- '#e78284'
defaultFgColor:
- '#c6d0f5'
searchingActiveBorderColor:
- '#e5c890'
Loading

0 comments on commit 65c3b60

Please sign in to comment.