Skip to content

Commit e19dd7f

Browse files
committed
initial commit - Confitty Kitty Config Editor
0 parents  commit e19dd7f

71 files changed

Lines changed: 13556 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cloudflare-pages.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"build": {
3+
"command": "bun run build",
4+
"output": "dist/confitty/browser",
5+
"node_version": "20"
6+
}
7+
}

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Bun
17+
uses: oven-sh/setup-bun@v1
18+
with:
19+
bun-version: latest
20+
21+
- name: Install dependencies
22+
run: bun install
23+
24+
- name: Build
25+
run: bun run build
26+
27+
- name: Type check
28+
run: bun run typecheck

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Angular
2+
.angular
3+
dist
4+
5+
# Dependencies
6+
node_modules
7+
bun.lockb
8+
9+
# Environment variables
10+
.env
11+
.env.local
12+
.env.production
13+
14+
# IDE and editor files
15+
.vscode/
16+
.idea/
17+
*.swp
18+
*.swo
19+
*~
20+
21+
# OS generated files
22+
.DS_Store
23+
.DS_Store?
24+
._*
25+
.Spotlight-V100
26+
.Trashes
27+
ehthumbs.db
28+
Thumbs.db
29+
30+
# Logs
31+
*.log
32+
npm-debug.log*
33+
yarn-debug.log*
34+
yarn-error.log*
35+
bun.log
36+
37+
# Runtime data
38+
pids
39+
*.pid
40+
*.seed
41+
*.pid.lock
42+
43+
# Coverage directory used by tools like istanbul
44+
coverage
45+
*.lcov
46+
47+
# Temporary folders
48+
tmp/
49+
temp/
50+
51+
# Personal deployment notes
52+
DEPLOYMENT.md

CONTRIBUTING.md

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# Contributing to Confitty
2+
3+
Thanks for wanting to help. Here's what you need to know.
4+
5+
<div align="center">
6+
7+
## 📁 Project Structure
8+
9+
</div>
10+
11+
```text
12+
src/
13+
├── app/
14+
│ └── app.component.ts # Root shell - layout, header, footer, about modal
15+
├── components/
16+
│ ├── about-modal/ # About dialog (mascot, Ko-fi, GitHub)
17+
│ ├── category-navigation/ # Left sidebar with config categories
18+
│ ├── config-editor/ # Center panel - form switcher + preset selector
19+
│ ├── forms/
20+
│ │ ├── fonts-form/
21+
│ │ ├── cursor-form/
22+
│ │ ├── scrollback-form/
23+
│ │ ├── mouse-form/
24+
│ │ ├── performance-form/
25+
│ │ ├── bell-form/
26+
│ │ ├── window-layout-form/
27+
│ │ ├── tab-bar-form/
28+
│ │ ├── colors-form/
29+
│ │ ├── advanced-form/
30+
│ │ └── os-specific-form/
31+
│ ├── header/ # Top bar - search, import, export, mode toggle
32+
│ ├── live-preview/ # Right panel - terminal preview + config text view
33+
│ ├── preset-selector/ # Preset browser with category tabs
34+
│ ├── search-bar/ # Global search component
35+
│ └── shared/ # Shared UI components
36+
├── models/
37+
│ ├── kitty-types.ts # TypeScript interfaces for Kitty config
38+
│ └── kitty-defaults.ts # Default values matching Kitty's defaults
39+
└── services/
40+
├── config-store.service.ts # Central state (Angular signals)
41+
├── kitty-parser.service.ts # Parses .conf files into KittyConfigAST
42+
├── kitty-generator.service.ts # Generates .conf text from KittyConfigAST
43+
├── color-themes.service.ts # Quick-apply color themes
44+
├── presets.service.ts # Full config presets
45+
├── font-presets.service.ts # Font database with metadata
46+
├── search.service.ts # Global search index and result routing
47+
└── theme.service.ts # Theme management
48+
```
49+
50+
<div align="center">
51+
52+
## 🚀 Getting Started
53+
54+
</div>
55+
56+
```bash
57+
git clone https://github.com/xcutiboo/Confitty.git
58+
cd Confitty
59+
bun install
60+
bun start
61+
```
62+
63+
The app runs at `http://localhost:4200` with hot reload.
64+
65+
<div align="center">
66+
67+
## 📝 Coding Conventions
68+
69+
</div>
70+
71+
This is an Angular 21 project using standalone components and signals.
72+
73+
### Components
74+
75+
- **Standalone only** — no NgModule
76+
- **Inline templates** — no separate `.html` files
77+
- **Angular signals** — use `signal()`, `computed()`, `effect()` for state, not RxJS
78+
- **New control flow** — use `@if`, `@for`, `@switch`, not `*ngIf` / `*ngFor`
79+
80+
### TypeScript
81+
82+
- **Strict mode** — don't use `any` unless absolutely necessary
83+
- **Central types** — all Kitty config types live in `kitty-types.ts`
84+
- **Dependency injection** — use `inject()`, not constructor injection
85+
86+
### Styling
87+
88+
- **Tailwind only** — no separate CSS files for components
89+
- **Color palette** — use `kitty-*` colors from `tailwind.config.js`
90+
- **Branding** — pink (`pink-*`) colors reserved for Confitty accents
91+
92+
### Naming
93+
94+
| Type | Convention | Example |
95+
| ---- | ---------- | ------- |
96+
| Components | kebab-case folder, PascalCase class | `fonts-form/FontsFormComponent` |
97+
| Services | camelCase with `Service` suffix | `configStoreService` |
98+
| Files | kebab-case | `kitty-types.ts` |
99+
100+
<div align="center">
101+
102+
## ➕ Adding a New Config Option
103+
104+
</div>
105+
106+
When Kitty adds a new config setting:
107+
108+
1. **Add the type** — add the property to the right interface in `kitty-types.ts`
109+
2. **Add the default** — add the default value in `kitty-defaults.ts` (check [Kitty docs](https://sw.kovidgoyal.net/kitty/conf/))
110+
3. **Add the parser** — handle the new key in `kitty-parser.service.ts`
111+
4. **Add the form field** — add UI control in the relevant form component
112+
5. **Verify the generator** — check `kitty-generator.service.ts` for special formatting needs
113+
114+
**Note:** The generator only outputs settings that differ from defaults. Make sure your default value matches Kitty's actual default.
115+
116+
<div align="center">
117+
118+
## 🎨 Adding a New Preset
119+
120+
</div>
121+
122+
Presets live in `src/services/presets.service.ts`:
123+
124+
```ts
125+
{
126+
id: 'my-preset', // unique, kebab-case
127+
name: 'My Preset',
128+
description: 'One sentence about what this is for.',
129+
category: 'theme', // 'theme' | 'performance' | 'minimal' | 'feature-rich' | 'gaming'
130+
author: 'author name', // optional
131+
tags: ['tag1', 'tag2'], // optional, for display only
132+
config: {
133+
// flat key-value pairs matching kitty config keys
134+
// only include what differs from default
135+
foreground: '#f8f8f2',
136+
background: '#282a36',
137+
// ...
138+
}
139+
}
140+
```
141+
142+
For color themes, also add to `src/services/color-themes.service.ts` with the 16-color palette so it appears in the Colors form quick-apply buttons.
143+
144+
<div align="center">
145+
146+
## 🔀 Pull Requests
147+
148+
</div>
149+
150+
- One logical change per PR — no unrelated fixes bundled together
151+
- Test in the browser before opening — including live preview and export
152+
- Ensure `bun run build` passes with no errors
153+
- For color themes, verify hex values against official theme sources
154+
- Use imperative commit messages: "Add Rosé Pine theme", "Fix opacity slider"
155+
156+
<div align="center">
157+
158+
## 🐛 Reporting Issues
159+
160+
</div>
161+
162+
Open an issue on GitHub with:
163+
164+
- What you expected to happen
165+
- What actually happened
166+
- Your browser and OS
167+
- Sample `.conf` file if it's a config export issue

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 xcutiboo
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)