mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2026-03-02 07:19:59 +00:00
Compare commits
33 Commits
0c55be8e71
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 02c86e53e9 | |||
| 719ccb83a2 | |||
| 09f26252f3 | |||
| d19c28941d | |||
| c887881732 | |||
| 6cb9cc1489 | |||
| 5a219ab7df | |||
| 09bb4a172d | |||
| 81fd52a8f7 | |||
| 7f684f98f1 | |||
| f5f8cda9f6 | |||
| 542f97f865 | |||
| 757b6a4b13 | |||
| 8612259d65 | |||
| 69dee58e8b | |||
| 2ebcd74c56 | |||
| 67f43a8916 | |||
| fb976708d5 | |||
| 6d94e57f6b | |||
| 55f99a40d7 | |||
| e0be3d5684 | |||
| 07e96633cc | |||
| c9c93f30fb | |||
| bf34de3dc6 | |||
| d624a55769 | |||
| 3081b00255 | |||
| 3e712774d7 | |||
| e151c2e7c3 | |||
| 9ec8007f55 | |||
| 9f5802f51a | |||
| 86359dcba6 | |||
| 0d4c49a6d3 | |||
| 3f4809b16a |
147
AGENTS.md
Normal file
147
AGENTS.md
Normal file
@@ -0,0 +1,147 @@
|
||||
# AGENTS.md - Coding Guidelines for Agentic Operations
|
||||
|
||||
This repository is a personal dotfiles collection managed with [chezmoi](https://www.chezmoi.io). It contains configuration files, shell scripts, and Python utilities for system management.
|
||||
|
||||
## Build, Lint & Test Commands
|
||||
|
||||
### Running Scripts
|
||||
- **Shell scripts**: `bash ./home/bin/executable_<script_name>.sh` or run directly if executable
|
||||
- **Python scripts**: `python3 ./home/bin/<script_name>.py`
|
||||
- **Install dependencies**: `pip install -r requirements.txt`
|
||||
|
||||
### Testing
|
||||
No formal test framework is present. Validation is done by:
|
||||
- Running scripts manually with test inputs
|
||||
- Checking for runtime errors (e.g., `python3 -m py_compile <file>` for syntax)
|
||||
- Verifying command outputs match expected behavior
|
||||
|
||||
### Single Test/Script Execution
|
||||
```bash
|
||||
# Run a single Python script
|
||||
python3 ./home/bin/i3-mouse.py
|
||||
|
||||
# Run a single shell script
|
||||
bash ./home/bin/executable_update.sh
|
||||
|
||||
# Check Python syntax without running
|
||||
python3 -m py_compile ./home/bin/homeassistant.py
|
||||
```
|
||||
|
||||
## Code Style Guidelines
|
||||
|
||||
### Python
|
||||
|
||||
#### Imports
|
||||
- Use standard library imports first, then third-party imports, then local imports
|
||||
- Import order: `os`, `sys`, `time` → `requests`, `i3ipc`, `pyautogui` → local modules
|
||||
- Each import on its own line (avoid `import x, y, z`)
|
||||
- Example:
|
||||
```python
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import datetime
|
||||
from requests import get, post
|
||||
import json
|
||||
```
|
||||
|
||||
#### Naming Conventions
|
||||
- **Functions**: `snake_case` (e.g., `getPoints()`, `pointsToDirection()`)
|
||||
- **Classes**: `PascalCase` (e.g., `HomeAssistant`, `Direction`)
|
||||
- **Constants**: `UPPER_SNAKE_CASE`
|
||||
- **Private members**: prefix with underscore `_privateVar`
|
||||
- Enums use `PascalCase` for class and `UPPER_SNAKE_CASE` for members
|
||||
|
||||
#### Formatting
|
||||
- Use 4-space indentation (not tabs)
|
||||
- Line length: Keep to reasonable length (~80-100 chars) where practical
|
||||
- Shebang for executable scripts: `#!/usr/bin/env python3`
|
||||
- Blank lines: 2 between top-level definitions, 1 between method definitions
|
||||
|
||||
#### Types & Documentation
|
||||
- No type hints required (not present in codebase)
|
||||
- Add docstring comments for classes and non-obvious functions
|
||||
- Comment format: `# description` (no colons at end unless explaining)
|
||||
- Example: `# Enum for mouse direction`
|
||||
|
||||
#### Error Handling
|
||||
- Use `raise` for exceptions in API wrappers (e.g., `response.raise_for_status()`)
|
||||
- Return `None` for optional/conditional operations
|
||||
- Handle command availability checks: `if command -v <cmd> &> /dev/null`
|
||||
|
||||
### Shell Scripts
|
||||
|
||||
#### Shebang & Headers
|
||||
- Start with: `#!/bin/bash`
|
||||
- Add brief comment: `# Script purpose description`
|
||||
|
||||
#### Formatting
|
||||
- Use 2-space indentation
|
||||
- Quote variables: `"${variable}"` or `"$variable"`
|
||||
- Use `function name { ... }` syntax for functions
|
||||
|
||||
#### Naming & Structure
|
||||
- Function names: `snake_case`
|
||||
- Variables: lowercase with underscores for clarity
|
||||
- Check for command availability before use:
|
||||
```bash
|
||||
if command -v <cmd> &> /dev/null; then
|
||||
<cmd> <args>
|
||||
fi
|
||||
```
|
||||
|
||||
#### Error Handling
|
||||
- Use `set -e` to exit on error when appropriate
|
||||
- Check command exit status: `if <command>; then ... fi`
|
||||
- Redirect stderr appropriately: `2>/dev/null` or `2>&1`
|
||||
|
||||
### Configuration Files
|
||||
- Before generating a commit, always consult `agents/COMMITS.md` for the required style.
|
||||
|
||||
#### chezmoi Templates
|
||||
- Dotfiles use chezmoi's templating system
|
||||
- Template syntax: `{{ }}` for variables (Chezmoi specific)
|
||||
- File naming: `dot_` prefix for dotfiles (e.g., `dot_zshrc`)
|
||||
- Executable scripts: `executable_` prefix
|
||||
|
||||
#### Comments
|
||||
- Use `#` for all config file comments
|
||||
- Keep comments concise and descriptive
|
||||
|
||||
## Repository Patterns
|
||||
|
||||
### Commit Message Format
|
||||
Follow conventional commits style (all lowercase).
|
||||
- `feat(scope): description` - New feature
|
||||
- `fix(scope): description` - Bug fix
|
||||
- `refactor(scope): description` - Code refactoring
|
||||
- `docs(scope): description` - Documentation changes
|
||||
- Example: `feat(zsh): update dotfiles` or `fix(scripts): use correct pass entry`
|
||||
|
||||
#### Pushing Remotes
|
||||
- **Do not push git repositories to remote unless explicitly instructed.**
|
||||
|
||||
### File Organization
|
||||
- Shell scripts: `home/bin/executable_<name>.sh`
|
||||
- Python scripts: `home/bin/<name>.py`
|
||||
- Config files: `home/dot_config/<app>/` (following XDG spec)
|
||||
- Dependencies: List in `requirements.txt`
|
||||
|
||||
## Key Dependencies
|
||||
|
||||
- **configparser** - Config file parsing
|
||||
- **todoist-python** - Todoist API
|
||||
- **tbapy** - TBA API for robotics
|
||||
- **holidays** - Holiday detection
|
||||
- **i3ipc** - i3 window manager control
|
||||
- **pyautogui** - Mouse control
|
||||
- **requests** - HTTP library
|
||||
- **dateutil** - Date utilities
|
||||
|
||||
## Development Notes
|
||||
|
||||
- This is a personal configuration repository, not a library
|
||||
- Scripts are system-level utilities and automation scripts
|
||||
- No CI/CD pipeline present (manual validation)
|
||||
- Target OS: Linux (Ubuntu/Fedora compatible)
|
||||
- Python version: Python 3.x minimum
|
||||
@@ -1 +1,10 @@
|
||||
# Dotfiles
|
||||
|
||||
A collection of config files and scripts for Fedora GNU/Linux.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
chezmoi init --apply git@github.com:AquaMorph/dotfiles.git
|
||||
```
|
||||
|
||||
|
||||
8
agents/COMMITS.md
Normal file
8
agents/COMMITS.md
Normal file
@@ -0,0 +1,8 @@
|
||||
Commits
|
||||
## Commit Message Format
|
||||
Follow conventional commits style (all lowercase).
|
||||
- `feat(scope): description` - New feature
|
||||
- `fix(scope): description` - Bug fix
|
||||
- `refactor(scope): description` - Code refactoring
|
||||
- `docs(scope): description` - Documentation changes
|
||||
- Example: `feat(zsh): update dotfiles` or `fix(scripts): use correct pass entry`
|
||||
1
home/.chezmoitemplates/models/big-brain
Normal file
1
home/.chezmoitemplates/models/big-brain
Normal file
@@ -0,0 +1 @@
|
||||
AquaAI/glm-4.7-flash
|
||||
1
home/.chezmoitemplates/prompts/agent-name
Normal file
1
home/.chezmoitemplates/prompts/agent-name
Normal file
@@ -0,0 +1 @@
|
||||
AquaAI
|
||||
7
home/.chezmoitemplates/prompts/better-conversations
Normal file
7
home/.chezmoitemplates/prompts/better-conversations
Normal file
@@ -0,0 +1,7 @@
|
||||
Be as concise as possible.
|
||||
Be extremely accurate.
|
||||
Recommend things I would not realize I would benefit from.
|
||||
Call out my misconceptions and tell me when I am wrong.
|
||||
For personal matters {{ template "prompts/agent-name" . }} is encouraging but brutally honest.
|
||||
Never sycophantic.
|
||||
Do not use em dashes. If an em dash would normally appear, use a comma for continuing thoughts or a period if it should be a separate sentence.
|
||||
1
home/.chezmoitemplates/prompts/name
Normal file
1
home/.chezmoitemplates/prompts/name
Normal file
@@ -0,0 +1 @@
|
||||
You are an AI assistant named {{ template "prompts/agent-name" . }}.
|
||||
@@ -2,6 +2,14 @@
|
||||
|
||||
# This script is a catch all program updater.
|
||||
|
||||
# Chezmoi Updater
|
||||
function chezmoiUpdate {
|
||||
if command -v chezmoi &> /dev/null; then
|
||||
echo Updating chezmoi dotfiles...
|
||||
chezmoi update
|
||||
fi
|
||||
}
|
||||
|
||||
# DNF Updater
|
||||
function dnfUpdate {
|
||||
if command -v dnf &> /dev/null; then
|
||||
@@ -33,6 +41,15 @@ function appimageUpdate {
|
||||
am update
|
||||
}
|
||||
|
||||
# Pass Repository Updater
|
||||
function passUpdate {
|
||||
if [ -d "$HOME/.password-store/.git" ] && [ -d "$HOME/.password-store" ]; then
|
||||
echo Updating pass repository...
|
||||
cd "$HOME/.password-store"
|
||||
git pull
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a program is installed and if it is runs an updater script
|
||||
function updateProgram {
|
||||
if command -v $1 &> /dev/null; then
|
||||
@@ -55,6 +72,8 @@ function manualUpdate {
|
||||
fi
|
||||
}
|
||||
|
||||
chezmoiUpdate
|
||||
echo ''
|
||||
dnfUpdate
|
||||
aptUpdate
|
||||
echo ''
|
||||
@@ -63,4 +82,6 @@ echo ''
|
||||
appimageUpdate
|
||||
echo ''
|
||||
manualUpdate
|
||||
echo ''
|
||||
passUpdate
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ $mainMod = SUPER
|
||||
# Keybindings
|
||||
bind = $mainMod, return, exec, $terminal
|
||||
bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod, C, exit,
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, D, exec, $menu
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
$terminal = alacritty
|
||||
$fileManager = dolphin
|
||||
$menu = rofi -show combi
|
||||
$browser = brave-browser
|
||||
@@ -1,2 +1,3 @@
|
||||
exec-once = [workspace 1 silent] brave-browser
|
||||
exec-once = [workspace 1 silent] $browser
|
||||
exec-once = [workspace 2 silent] $terminal
|
||||
exec-once = [workspace 10 silent] flatpak run org.signal.Signal
|
||||
31
home/dot_config/opencode/agents/commit.md.tmpl
Normal file
31
home/dot_config/opencode/agents/commit.md.tmpl
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
description: Commit currently staged code in git
|
||||
mode: all
|
||||
model: {{ template "models/big-brain" . }}
|
||||
temperature: 0.1
|
||||
tools:
|
||||
write: false
|
||||
edit: false
|
||||
bash: true
|
||||
---
|
||||
|
||||
{{ template "prompts/name" . }}
|
||||
|
||||
{{ template "prompts/agent-name" . }} is a senior software engineer committing code to a large and professional project.
|
||||
|
||||
Focus on:
|
||||
- Writing a clear and simple commit message.
|
||||
- Describe what the changes do at a high level.
|
||||
- Always mention only the changes, never any file names.
|
||||
- Follow the project formatting for commits.
|
||||
- Only commit files that are currently staged in git.
|
||||
- Only use the word add if strictly necessary.
|
||||
|
||||
Never:
|
||||
- Never mention specific files or what files changed.
|
||||
- Never add files to the staging.
|
||||
|
||||
Use the following command to look at the changes:
|
||||
```sh
|
||||
git diff --cached
|
||||
```
|
||||
29
home/dot_config/opencode/agents/review.md.tmpl
Normal file
29
home/dot_config/opencode/agents/review.md.tmpl
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
description: Review code changes
|
||||
mode: all
|
||||
model: AquaAI/gpt-oss:20b
|
||||
temperature: 0.1
|
||||
tools:
|
||||
write: false
|
||||
edit: false
|
||||
bash: true
|
||||
---
|
||||
|
||||
{{ template "prompts/name" . }}
|
||||
|
||||
{{ template "prompts/agent-name" . }} is a senior software engineer performing a code review for a colleague.
|
||||
|
||||
{{ template "prompts/better-conversations" . }}
|
||||
|
||||
Show code snipets when helpful.
|
||||
{{ template "prompts/agent-name" . }}'s reports should have the following format:
|
||||
```
|
||||
# Typos
|
||||
List of all typos you find.
|
||||
# Formatting and Readability Issues
|
||||
List of all formatting and readability issues you find.
|
||||
# Security Issues
|
||||
List of all security issues you find.
|
||||
# Other
|
||||
List of all other issues you find.
|
||||
```
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"disabled_providers": ["opencode"],
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"share": "disabled",
|
||||
"provider": {
|
||||
"ollama": {
|
||||
"AquaAI": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "AquaAI",
|
||||
"options": {
|
||||
@@ -12,8 +13,20 @@
|
||||
"gpt-oss:20b": {
|
||||
"name": "GPT OSS 20b"
|
||||
},
|
||||
"gpt-oss:120b": {
|
||||
"name": "GPT OSS 120b"
|
||||
},
|
||||
"hf.co/unsloth/Qwen3-4B-Instruct-2507-GGUF:Q3_K_M": {
|
||||
"name": "Qwen3 4b"
|
||||
},
|
||||
"glm-4.7-flash": {
|
||||
"name": "GLM 4.7 Flash"
|
||||
},
|
||||
"qwen3-coder-next": {
|
||||
"name": "Qwen3 Coder Next"
|
||||
},
|
||||
"hf.co/unsloth/GLM-4.7-Flash-GGUF:Q4_K_M": {
|
||||
"name": "Test"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
computer={{ .chezmoi.hostname }}
|
||||
activation_bytes={{ pass "self-host/token/audible-activation-bytes" }}
|
||||
AQUAAI_KEY={{ pass "self-host/token/aquaai" }}
|
||||
TodoistToken={{ pass "self-host/token/todoist" }}
|
||||
@@ -84,8 +84,8 @@
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-alt": "{icon} {time}",
|
||||
"format-good": "", // An empty format will hide the module
|
||||
"format-full": "",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = Christian Colglazier
|
||||
email = christian@cacolglazier.com
|
||||
[core]
|
||||
editor = emacs
|
||||
editor = emacs -nw
|
||||
excludesFile = ~/.gitignore
|
||||
[rerere]
|
||||
enabled = true
|
||||
|
||||
@@ -41,7 +41,16 @@ alias d='sudo dnf'
|
||||
alias u='sh ~/bin/update.sh'
|
||||
alias h='cd ~/git/cacolglazier.com/ && hugo server'
|
||||
|
||||
# OpenCode
|
||||
export PATH="$HOME/.opencode/bin:$PATH"
|
||||
OPENCODE='opencode'
|
||||
alias o="${OPENCODE}"
|
||||
alias oc="${OPENCODE} --agent commit run 'Create a commit.'"
|
||||
alias ocr="${OPENCODE} --agent review --prompt 'Code review staged changes.'"
|
||||
alias or="${OPENCODE} --continue"
|
||||
|
||||
# Git
|
||||
gr() { git rebase -i HEAD~$1; }
|
||||
alias c='git commit -m'
|
||||
alias a='git add'
|
||||
alias ga='git add -A'
|
||||
|
||||
Reference in New Issue
Block a user