mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2026-07-21 16:58:40 +00:00
Compare commits
36 Commits
master
..
e151c2e7c3
| Author | SHA1 | Date | |
|---|---|---|---|
| e151c2e7c3 | |||
| 9ec8007f55 | |||
| 9f5802f51a | |||
| 86359dcba6 | |||
| 0d4c49a6d3 | |||
| 3f4809b16a | |||
| 0c55be8e71 | |||
| faef8da677 | |||
| 7a59efb6b0 | |||
| b23d347e26 | |||
| 2649688ef4 | |||
| 97e7ed3e53 | |||
| 9d821052d5 | |||
| 5bb978bd20 | |||
| ab6a2dd0a3 | |||
| 03fe12a280 | |||
| 0ab0cc9827 | |||
| 96f2fde330 | |||
| f5fb2a8c51 | |||
| 2f9ecf7571 | |||
| 32ff6cb136 | |||
| 5ba6a04786 | |||
| a5bc31398f | |||
| d9be0f4e18 | |||
| a7319f7d7f | |||
| c5a369985b | |||
| 64111551bd | |||
| 2d44c01586 | |||
| a4a0596b5e | |||
| 80a25470b3 | |||
| 11b9d48c24 | |||
| c66b1209a8 | |||
| 2b00d85cfb | |||
| 126504d5f9 | |||
| d9c5dcbea4 | |||
| 932a969e97 |
@@ -0,0 +1 @@
|
|||||||
|
home
|
||||||
-142
@@ -1,142 +0,0 @@
|
|||||||
i3/.config/i3/config
|
|
||||||
settings.conf
|
|
||||||
systemd/user/*/*
|
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
*$py.class
|
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Distribution / packaging
|
|
||||||
.Python
|
|
||||||
build/
|
|
||||||
develop-eggs/
|
|
||||||
dist/
|
|
||||||
downloads/
|
|
||||||
eggs/
|
|
||||||
.eggs/
|
|
||||||
lib/
|
|
||||||
lib64/
|
|
||||||
parts/
|
|
||||||
sdist/
|
|
||||||
var/
|
|
||||||
wheels/
|
|
||||||
share/python-wheels/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
MANIFEST
|
|
||||||
|
|
||||||
# PyInstaller
|
|
||||||
# Usually these files are written by a python script from a template
|
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
||||||
*.manifest
|
|
||||||
*.spec
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
pip-delete-this-directory.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
htmlcov/
|
|
||||||
.tox/
|
|
||||||
.nox/
|
|
||||||
.coverage
|
|
||||||
.coverage.*
|
|
||||||
.cache
|
|
||||||
nosetests.xml
|
|
||||||
coverage.xml
|
|
||||||
*.cover
|
|
||||||
*.py,cover
|
|
||||||
.hypothesis/
|
|
||||||
.pytest_cache/
|
|
||||||
cover/
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
*.pot
|
|
||||||
|
|
||||||
# Django stuff:
|
|
||||||
*.log
|
|
||||||
local_settings.py
|
|
||||||
db.sqlite3
|
|
||||||
db.sqlite3-journal
|
|
||||||
|
|
||||||
# Flask stuff:
|
|
||||||
instance/
|
|
||||||
.webassets-cache
|
|
||||||
|
|
||||||
# Scrapy stuff:
|
|
||||||
.scrapy
|
|
||||||
|
|
||||||
# Sphinx documentation
|
|
||||||
docs/_build/
|
|
||||||
|
|
||||||
# PyBuilder
|
|
||||||
.pybuilder/
|
|
||||||
target/
|
|
||||||
|
|
||||||
# Jupyter Notebook
|
|
||||||
.ipynb_checkpoints
|
|
||||||
|
|
||||||
# IPython
|
|
||||||
profile_default/
|
|
||||||
ipython_config.py
|
|
||||||
|
|
||||||
# pyenv
|
|
||||||
# For a library or package, you might want to ignore these files since the code is
|
|
||||||
# intended to run in multiple environments; otherwise, check them in:
|
|
||||||
# .python-version
|
|
||||||
|
|
||||||
# pipenv
|
|
||||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
||||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
||||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
||||||
# install all needed dependencies.
|
|
||||||
#Pipfile.lock
|
|
||||||
|
|
||||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
||||||
__pypackages__/
|
|
||||||
|
|
||||||
# Celery stuff
|
|
||||||
celerybeat-schedule
|
|
||||||
celerybeat.pid
|
|
||||||
|
|
||||||
# SageMath parsed files
|
|
||||||
*.sage.py
|
|
||||||
|
|
||||||
# Environments
|
|
||||||
.env
|
|
||||||
.venv
|
|
||||||
env/
|
|
||||||
venv/
|
|
||||||
ENV/
|
|
||||||
env.bak/
|
|
||||||
venv.bak/
|
|
||||||
|
|
||||||
# Spyder project settings
|
|
||||||
.spyderproject
|
|
||||||
.spyproject
|
|
||||||
|
|
||||||
# Rope project settings
|
|
||||||
.ropeproject
|
|
||||||
|
|
||||||
# mkdocs documentation
|
|
||||||
/site
|
|
||||||
|
|
||||||
# mypy
|
|
||||||
.mypy_cache/
|
|
||||||
.dmypy.json
|
|
||||||
dmypy.json
|
|
||||||
|
|
||||||
# Pyre type checker
|
|
||||||
.pyre/
|
|
||||||
|
|
||||||
# pytype static type analyzer
|
|
||||||
.pytype/
|
|
||||||
|
|
||||||
# Cython debug symbols
|
|
||||||
cython_debug/
|
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
#### 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`
|
||||||
|
|
||||||
|
### 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
|
||||||
@@ -2,20 +2,9 @@
|
|||||||
|
|
||||||
A collection of config files and scripts for Fedora GNU/Linux.
|
A collection of config files and scripts for Fedora GNU/Linux.
|
||||||
|
|
||||||
## Install
|
## Installation
|
||||||
|
|
||||||
Run the following command to install
|
```bash
|
||||||
|
chezmoi init --apply git@github.com:AquaMorph/dotfiles.git
|
||||||
```sh
|
|
||||||
cd ~ && git clone git@github.com:AquaMorph/dotfiles.git && sh ~/dotfiles/install.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Scripts
|
|
||||||
|
|
||||||
### frc-photo-checklist.py
|
|
||||||
|
|
||||||
Python script to generate a Todoist checklist for taking photos at an FRC event.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
python frc-photo-checklist.py [Event Key]
|
|
||||||
```
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
|||||||
|
# Scripts
|
||||||
|
|
||||||
|
## AquaAI
|
||||||
|
|
||||||
|
AquaAI is bash script that interacts with OpenAI and Ollama APIs to enable terminal based interaction with LLMs.
|
||||||
|
|
||||||
|
## connect-nas.sh
|
||||||
|
|
||||||
|
Connect to long storage NAS.
|
||||||
|
|
||||||
|
## convert-mp4-to-resolve.sh
|
||||||
|
|
||||||
|
Converts mp4 video files to a video format where the audio works with the linux version of Davinci Resolve.
|
||||||
|
|
||||||
|
## frc-photo-checklist.py
|
||||||
|
|
||||||
|
Python script to generate a Todoist checklist for taking photos at an FRC event.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python frc-photo-checklist.py [Event Key]
|
||||||
|
```
|
||||||
|
|
||||||
|
## get-mouse-battery.sh
|
||||||
|
|
||||||
|
Prints out the battery percentage of a mouse and if it is charging.
|
||||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+7
-4
@@ -74,7 +74,7 @@
|
|||||||
#
|
#
|
||||||
# export AQUAAI_OLLAMA_URL='192.168.1.156:11434'
|
# export AQUAAI_OLLAMA_URL='192.168.1.156:11434'
|
||||||
#
|
#
|
||||||
ollama_url=${AQUAAI_OLLAMA_URL:='https://ai.aquamorph.com'}
|
ollama_url=${AQUAAI_OLLAMA_URL:='https://ai.aquamorph.com/api'}
|
||||||
#
|
#
|
||||||
# Set the default model.
|
# Set the default model.
|
||||||
#
|
#
|
||||||
@@ -178,6 +178,9 @@ function set_better_conversions() {
|
|||||||
system_prompt+=" For personal matters ${AGENT_NAME} is encouraging"
|
system_prompt+=" For personal matters ${AGENT_NAME} is encouraging"
|
||||||
system_prompt+=' but brutally honest.'
|
system_prompt+=' but brutally honest.'
|
||||||
system_prompt+=' Never sycophantic.'
|
system_prompt+=' Never sycophantic.'
|
||||||
|
system_prompt+=' Do not use em dashes. If an em dash would normally appear,'
|
||||||
|
system_prompt+=' use a comma for continuing thoughts or a period if it'
|
||||||
|
system_prompt+=' should be a separate sentence.'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the formatting for all reponses.
|
# Set the formatting for all reponses.
|
||||||
@@ -369,9 +372,9 @@ function check_requirements() {
|
|||||||
function get_models() {
|
function get_models() {
|
||||||
local model_path=''
|
local model_path=''
|
||||||
if [ "${openai_api}" == true ]; then
|
if [ "${openai_api}" == true ]; then
|
||||||
model_path='/api/models'
|
model_path='/models'
|
||||||
else
|
else
|
||||||
model_path='/api/tags'
|
model_path='/tags'
|
||||||
fi
|
fi
|
||||||
curl "${CURL_FLAGS[@]}" "${OLLAMA_URL}${model_path}"
|
curl "${CURL_FLAGS[@]}" "${OLLAMA_URL}${model_path}"
|
||||||
}
|
}
|
||||||
@@ -801,7 +804,7 @@ function chat() {
|
|||||||
local filter=''
|
local filter=''
|
||||||
if [ "${openai_api}" == true ]; then
|
if [ "${openai_api}" == true ]; then
|
||||||
flags+=(-H "Content-Type: application/json")
|
flags+=(-H "Content-Type: application/json")
|
||||||
chat_path='/api/chat/completions'
|
chat_path='/chat/completions'
|
||||||
filter='.choices[].delta.content // empty'
|
filter='.choices[].delta.content // empty'
|
||||||
else
|
else
|
||||||
chat_path='/api/chat'
|
chat_path='/api/chat'
|
||||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user