cheatsheets: port cheatsheets-parser and add qs-cheatsheets; add SUPER+CTRL+C...

This commit is contained in:
Don Williams 2025-12-03 13:51:53 -05:00
commit caf6e00bea
45 changed files with 4689 additions and 86 deletions

66
cheatsheets/README.es.md Normal file
View file

@ -0,0 +1,66 @@
[English](./README.md) | Español
# Índice de Cheatsheets (ZaneyOS)
Estos documentos cubren tanto el uso general como la configuración específica definida en la configuración de NixOS "ZaneyOS".
- Uso general: Consejos prácticos centrados en tareas y los principales flujos de trabajo.
- Específicos de ZaneyOS: Notas que reflejan cómo se configuran las herramientas en este repositorio (modules/home/*) para que el comportamiento coincida con su sistema.
## 🔗 Enlaces Rápidos
- Emacs
- [Los 10 mejores consejos para empezar](emacs/emacs.getting-started.top10.md)
- [Explorador de archivos](emacs/emacs.file-explorer.cheatsheet.md)
- [Autocompletado de código](emacs/emacs.code-completion.cheatsheet.md)
- [Magit (Git)](emacs/emacs.magit.cheatsheet.md)
- [Markdown](emacs/emacs.markdown.cheatsheet.md)
- Ghostty
- [Cheatsheet de Ghostty](ghostty/ghostty.cheatsheet.md)
- Tmux
- [Cheatsheet de Tmux](tmux/tmux.cheatsheet.md)
- Alacritty
- [Cheatsheet de Alacritty](alacritty/alacritty.cheatsheet.md)
- Kitty
- [Cheatsheet de Kitty](kitty/kitty.cheatsheet.md)
- WezTerm
- [Cheatsheet de WezTerm](wezterm/wezterm.cheatsheet.md)
- Hyprland
- [Atajos de teclado](hyprland/hyprland.binds.cheatsheet.md)
- [Reglas de ventana](hyprland/hyprland.windowrules.cheatsheet.md)
- Yazi
- [Mapa de teclas](yazi/yazi.keymap.cheatsheet.md)
## 📚 Cómo usar
- Navegue por el área que le interese (por ejemplo, Emacs, Ghostty).
- Comience con los documentos de "primeros pasos" o "consejos principales" para obtener resultados rápidos.
- Consulte las cheatsheets específicas de cada herramienta para los comandos diarios y luego verifique cualquier configuración específica de ZaneyOS.
## 📂 Árbol de Directorios
```
cheatsheets/
├── emacs/
│ ├── emacs.code-completion.cheatsheet.md
│ ├── emacs.file-explorer.cheatsheet.md
│ ├── emacs.getting-started.top10.md
│ ├── emacs.magit.cheatsheet.md
│ └── emacs.markdown.cheatsheet.md
├── ghostty/
│ └── ghostty.cheatsheet.md
├── tmux/
│ └── tmux.cheatsheet.md
├── alacritty/
│ └── alacritty.cheatsheet.md
├── kitty/
│ └── kitty.cheatsheet.md
├── wezterm/
│ └── wezterm.cheatsheet.md
├── hyprland/
│ ├── hyprland.binds.cheatsheet.md
│ └── hyprland.windowrules.cheatsheet.md
└── yazi/
└── yazi.keymap.cheatsheet.md
```
## 🛠️ Notas
- El cheatsheet de Ghostty refleja los atajos de teclado de modules/home/terminals/ghostty.nix (ZaneyOS).
- Los documentos de Emacs siguen el mismo estilo de markdown para mayor consistencia y una lectura rápida.

View file

@ -1,9 +1,10 @@
# Cheatsheets Index (ddubsOS)
English | [Español](./README.es.md)
These documents cover both general usage and the specific configuration as defined in the NixOS configuration "ddubsOS".
# Cheatsheets Index (ZaneyOS)
These documents cover both general usage and the specific configuration as defined in the NixOS configuration "ZaneyOS".
- General use: Practical, task-focused tips and top workflows.
- ddubsOS specifics: Notes reflecting how tools are configured in this repository (modules/home/*) so behavior matches your system.
- ZaneyOS specifics: Notes reflecting how tools are configured in this repository (modules/home/*) so behavior matches your system.
## 🔗 Quick Links
- Emacs
@ -31,7 +32,7 @@ These documents cover both general usage and the specific configuration as defin
## 📚 How to use
- Browse the area you care about (e.g., Emacs, Ghostty).
- Start with the “getting started” or “top tips” docs for quick wins.
- Refer to tool-specific cheatsheets for day-to-day commands, then cross-check any ddubsOS-specific settings.
- Refer to tool-specific cheatsheets for day-to-day commands, then cross-check any ZaneyOS-specific settings.
## 📂 Directory Tree
@ -61,6 +62,5 @@ cheatsheets/
```
## 🛠️ Notes
- Ghostty cheatsheet reflects bindings from modules/home/terminals/ghostty.nix (ddubsOS).
- Ghostty cheatsheet reflects bindings from modules/home/terminals/ghostty.nix (ZaneyOS).
- Emacs docs follow the same markdown style for consistency and quick scanning.

View file

@ -0,0 +1,23 @@
[English](./alacritty.cheatsheet.md) | Español
# Alacritty en ZaneyOS — Resumen y Cheatsheet
## 🚀 Resumen de modules/home/terminals/alacritty.nix
- Programa
- Alacritty habilitado.
- Familia de fuentes (predeterminada): Maple NF; tamaño: 15.
- Estilos configurados: Regular, Negrita, Cursiva, Negrita Cursiva.
---
## ⚙️ Opciones Predeterminadas (según configuración)
Fuente
- normal: Maple NF Regular
- bold: Maple NF Negrita
- italic: Maple NF Cursiva
- bold_italic: Maple NF Negrita Cursiva
- size: 15
Notas
- Usa lib.mkDefault para la familia de fuentes, por lo que otros módulos pueden anularla.

View file

@ -1,5 +1,6 @@
# Alacritty on ddubsOS — Summary & Cheatsheet
English | [Español](./alacritty.cheatsheet.es.md)
# Alacritty on ZaneyOS — Summary & Cheatsheet
## 🚀 Summary of modules/home/terminals/alacritty.nix
- Program

View file

@ -0,0 +1,129 @@
[English](./emacs.code-completion.cheatsheet.md) | Español
# Cheatsheet de Autocompletado y Búsqueda de Código en Doom Emacs
## 🚀 **Lo que Tienes (Como nvim-cmp + blink.cmp)**
Si tu configuración de Doom incluye:
- **Company Mode** - Framework de autocompletado
- **LSP Mode** - Soporte para el Protocolo de Servidor de Lenguaje
- **Tree-sitter** - Análisis de sintaxis avanzado
- **Herramientas de búsqueda** - Búsqueda de documentación y definiciones
## ⌨️ **Autocompletado de Código (Company)**
### **Controles de Autocompletado:**
- `TAB` o `C-SPC` - **Aceptar autocompletado**
- `C-n` / `j` - **Siguiente autocompletado** (modo evil)
- `C-p` / `k` - **Anterior autocompletado** (modo evil)
- `C-w` - **Mostrar documentación** para el autocompletado
- `C-s` - **Buscar/filtrar autocompletados**
- `ESC` o `C-g` - **Cancelar autocompletado**
### **Autocompletado Manual:**
- `M-/` - **Completar en el punto** (disparador manual)
- `C-M-/` - **Expandir abreviatura**
## 🔍 **Búsqueda y Navegación de Código**
### **Ir a Definición/Referencias:**
- `gd` - **Ir a la definición** (modo evil)
- `gD` - **Ir a la declaración**
- `gr` - **Ir a las referencias**
- `SPC c d` - **Buscar definición**
- `SPC c D` - **Buscar referencias**
- `SPC c i` - **Buscar implementaciones**
### **Búsqueda de Documentación:**
- `K` - **Buscar documentación** (modo evil)
- `SPC c k` - **Buscar documentación**
- `SPC c K` - **Buscar en conjuntos de documentos**
- `C-h f` - **Describir función**
- `C-h v` - **Describir variable**
### **Navegación de Símbolos:**
- `SPC c j` - **Saltar a símbolo en el búfer**
- `SPC c J` - **Saltar a símbolo en el proyecto**
- `SPC s i` - **Buscar símbolo**
## 🛠️ **Características de LSP (Servidor de Lenguaje)**
### **Acciones de LSP:**
- `SPC c a` - **Acciones de código** (refactorizar, arreglar, etc.)
- `SPC c r` - **Renombrar símbolo**
- `SPC c f` - **Formatear búfer/región**
- `SPC c o` - **Organizar importaciones**
### **Navegación de Errores:**
- `]e` - **Siguiente error**
- `[e` - **Error anterior**
- `SPC c x` - **Listar errores**
### **Información de LSP:**
- `SPC c l` - **Menú de LSP**
- `SPC c h` - **Mostrar información al pasar el ratón**
- `SPC c s` - **Mostrar firma**
## 🎯 **Características Específicas del Lenguaje**
### **C/C++ (clang-tools)**
- Autocompletado completo para funciones, variables, tipos
- Ir a la definición a través de archivos
- Comprobación de errores y diagnósticos
- Formateo de código con clang-format
### **Nix (nil LSP)**
- Autocompletado del lenguaje Nix
- Documentación de funciones
- Comprobación de sintaxis
- Ir a la definición para expresiones de Nix
### **JSON (vscode-json-languageserver)**
- Autocompletado basado en esquemas
- Validación y comprobación de errores
- Ir a la definición en archivos JSON
## ⚡ **Consejos Profesionales**
### **Búsqueda Difusa en Todo:**
- `SPC f f` - **Buscar archivos**
- `SPC /` - **Buscar en el proyecto**
- `SPC s s` - **Buscar en el búfer**
- `SPC p p` - **Cambiar de proyecto**
### **Mejor Navegación:**
- `C-o` - **Retroceder** (después de saltar a la definición)
- `C-i` - **Avanzar**
- `SPC j j` - **Saltar a un carácter** (como easymotion)
### **Ajustes de Autocompletado:**
- Los autocompletados aparecen después de 0.2 segundos de escribir
- Mínimo 1 carácter para activarse
- Muestra la documentación en una ventana emergente
- Funciona tanto con Company como con LSP
## 🔧 **Solución de Problemas**
### **Si el autocompletado no funciona:**
1. Comprueba si el servidor LSP se está ejecutando: `SPC c l`
2. Reinicia LSP: `SPC c l r`
3. Comprueba si hay errores de sintaxis: `SPC c x`
### **Rendimiento:**
- Los servidores LSP se inician automáticamente cuando abres archivos compatibles
- El autocompletado está optimizado para una respuesta rápida
- Usa `SPC h r r` para recargar la configuración de Doom después de los cambios
## 🚀 **Flujo de Trabajo de Inicio Rápido**
1. **Abre un archivo de código** (`.c`, `.nix`, `.json`)
2. **Empieza a escribir** - los autocompletados aparecen automáticamente
3. **Navega con `j/k`** y **acepta con `TAB`**
4. **Usa `gd`** para saltar a las definiciones
5. **Usa `K`** para ver la documentación
6. **Usa `SPC c a`** para acciones de código
## 📚 **Servidores de Lenguaje Incluidos**
- **C/C++**: `clang-tools` (clangd)
- **Nix**: `nil`
- **JSON**: `vscode-json-languageserver`
- ¡Se pueden añadir más por lenguaje según sea necesario!

View file

@ -1,5 +1,6 @@
# Doom Emacs Code Completion & Lookup Cheatsheet
English | [Español](./emacs.code-completion.cheatsheet.es.md)
# Doom Emacs Code Completion & Lookup Cheatsheet
## 🚀 **What You Have (Like nvim-cmp + blink.cmp)**
If your Doom config includes:

View file

@ -0,0 +1,306 @@
[English](./emacs.file-explorer.cheatsheet.md) | Español
# Cheatsheet del Explorador de Archivos de Doom Emacs
## 🗂️ **¿Qué es Dired?**
Dired (Directory Editor) es el gestor de archivos incorporado de Emacs que te permite navegar, gestionar y manipular archivos y directorios de manera eficiente.
- Navega por los directorios con el teclado
- Marca, copia, mueve y elimina archivos
- Ejecuta comandos en múltiples archivos a la vez
- Se integra con otras herramientas y búferes de Emacs
## 📋 **Requisitos**
- Doom Emacs (Dired está incorporado)
- **Treemacs**: Debe estar habilitado en `~/.doom.d/init.el` (descomenta la línea `treemacs`)
- Herramientas opcionales para una funcionalidad mejorada:
- `rsync` - Sincronización y copia rápida de archivos
- `fd` o `find` - Búsqueda de archivos mejorada
- `rg` (ripgrep) o `ag` (the_silver_searcher) - Búsqueda rápida de texto
- `exa` o `lsd` - Listados de directorios mejorados
- `trash-cli` - Eliminación segura de archivos a la papelera
- `zip`/`unzip`, `tar`, `gzip` - Manejo de archivos comprimidos
## ⌨️ **Abriendo Exploradores de Archivos**
### **Dired (Gestor de Archivos Incorporado):**
- `SPC .` - **Abrir Dired** en el directorio actual
- `SPC f d` - **Buscar directorio** (abrir Dired en una ruta específica)
- `C-x d` - **Abrir Dired** (atajo clásico de Emacs)
### **Navegación de Archivos del Proyecto:**
- `SPC SPC` - **Buscar archivo** en el proyecto
- `SPC f f` - **Buscar archivo** en cualquier lugar
- `SPC f r` - **Archivos recientes**
- `SPC p f` - **Buscar archivo** en el proyecto
### **Exploradores en Estilo de Árbol:**
- `SPC o p` - **Alternar barra lateral del proyecto** (Treemacs)
- `SPC f t` - **Buscar archivo** en el árbol
## 🧭 **Navegación en Dired**
### **Movimiento Básico:**
- `j/k` o `n/p` - **Moverse arriba/abajo** entre archivos
- `h` - **Subir** un directorio (padre)
- `l` o `RET` - **Entrar en el directorio** o abrir archivo
- `^` - **Ir al directorio padre**
- `g` - **Refrescar** el listado del directorio
### **Saltando:**
- `gg` - **Ir al principio** del listado
- `G` - **Ir al final** del listado
- `/` - **Buscar** por nombre de archivo/directorio
- `SPC s s` - **Buscar dentro** del directorio
### **Información del Archivo:**
- `(` - **Alternar detalles** (mostrar/ocultar información del archivo)
- `s` - **Ordenar** archivos (por nombre, fecha, tamaño)
- `C-h m` - **Mostrar ayuda** para el modo actual
## 📁 **Operaciones con Archivos**
### **Abriendo Archivos:**
- `RET` - **Abrir archivo** en la ventana actual
- `o` - **Abrir archivo** en otra ventana
- `C-o` - **Abrir archivo** en otra ventana (mantener el cursor en Dired)
- `v` - **Ver archivo** (solo lectura)
- `f` - **Buscar archivo** (igual que RET)
### **Creando Archivos y Directorios:**
- `+` - **Crear directorio**
- `SPC f c` - **Crear archivo** (cuando estás en el búfer de Dired)
- `C-x C-f` - **Buscar/crear archivo** (desde Dired)
## 🏷️ **Marcando Archivos**
### **Marcado Básico:**
- `m` - **Marcar archivo** para operaciones
- `u` - **Desmarcar archivo**
- `U` - **Desmarcar todos** los archivos
- `t` - **Alternar marcas** (marcar los no marcados, desmarcar los marcados)
- `* %` - **Marcar por patrón** de expresión regular
### **Marcado Rápido:**
- `* .` - **Marcar por extensión** (ej., *.txt)
- `* /` - **Marcar directorios**
- `* @` - **Marcar enlaces simbólicos**
- `* *` - **Marcar ejecutables**
### **Marcado Avanzado:**
- `% m` - **Marcar archivos** que coincidan con una expresión regular
- `% d` - **Marcar para eliminar** archivos que coincidan con una expresión regular
- `* c` - **Cambiar marcas** (cambiar una marca por otra)
## ✂️ **Operaciones de Gestión de Archivos**
### **Copiar, Mover, Eliminar:**
- `C` - **Copiar** archivos marcados (o el archivo bajo el cursor)
- `R` - **Renombrar/Mover** archivos marcados
- `D` - **Eliminar** archivos marcados inmediatamente
- `d` - **Marcar para eliminar** (usa `x` para ejecutar)
- `x` - **Ejecutar eliminaciones** (eliminar archivos marcados con `d`)
### **Opciones de Eliminación:**
- `d` y luego `x` - **Eliminación segura** (marcar primero, luego ejecutar)
- `D` - **Eliminación inmediata** (omite el paso de marcar)
- **Integración con la papelera**: Si `trash-cli` está instalado, los archivos van a la papelera en lugar de ser eliminados permanentemente
### **Operaciones Avanzadas:**
- `Z` - **Comprimir/descomprimir** archivos (usa `gzip`, `zip`, `tar` automáticamente)
- `A` - **Buscar** en archivos marcados (usa `grep` o `rg` si está disponible)
- `Q` - **Consultar y reemplazar** en archivos marcados
- `!` - **Ejecutar comando de shell** en archivos marcados
- `&` - **Ejecutar comando de shell asíncrono** en archivos marcados
## 📋 **Copiando y Moviendo**
### **Operaciones de Copia:**
- `C` - **Copiar archivos** (solicita el destino)
- Funciona con archivos marcados o un solo archivo bajo el cursor
- Usa `rsync` si está disponible para una copia más rápida y reanudable
- Admite la copia a diferentes unidades/particiones
### **Operaciones de Mover/Renombrar:**
- `R` - **Renombrar/Mover** archivos
- Puede renombrar archivos individuales o mover múltiples archivos marcados
- Admite el movimiento entre directorios
### **Consejos para Copiar/Mover:**
- Marca múltiples archivos primero, luego usa `C` o `R`
- El autocompletado con Tab funciona para las rutas de destino
- Usa rutas relativas (`.`, `..`) para una navegación rápida
## 🔍 **Búsqueda y Filtro**
### **Encontrando Archivos:**
- `/` - **Buscar** nombres de archivo en el listado actual
- `n/N` - **Siguiente/anterior** coincidencia de búsqueda
### **Búsqueda Mejorada (con herramientas externas):**
- `A` - **Buscar dentro de los archivos** (usa `rg` > `ag` > `grep` en orden de prioridad)
- Mucho más rápido con `ripgrep` o `the_silver_searcher`
- Admite patrones de expresiones regulares y filtrado por tipo de archivo
### **Filtrando la Visualización:**
- `(` - **Alternar** vista detallada
- `s` - **Ordenar** por diferentes criterios
- `C-u s` - **Ordenar** con opciones personalizadas
### **Búsqueda de Contenido:**
- `A` - **Buscar dentro** de los archivos marcados
- `Q` - **Consultar y reemplazar** en los archivos marcados
## 🔧 **Características Avanzadas**
### **Wdired (Dired Editable):**
- `C-x C-q` - **Editar nombres de archivo** directamente (como renombrar)
- Edita los nombres de archivo como texto, luego `C-c C-c` para aplicar los cambios
- `C-c C-k` para cancelar las ediciones
### **Múltiples Ventanas:**
- `o` - **Abrir en otra ventana**
- `C-o` - **Mostrar en otra ventana** (permanecer en Dired)
- `2` - **Dividir la ventana** verticalmente para dos vistas de Dired
### **Subdirectorios:**
- `i` - **Insertar subdirectorio** en el mismo búfer
- `$` - **Ocultar/mostrar** el contenido del subdirectorio
- `M-$` - **Ocultar todos** los subdirectorios
## 📊 **Comparación de Archivos**
### **Operaciones de Diferencias:**
- `=` - **Comparar archivo** con otro
- `M-=` - **Comparar** archivos marcados entre sí
- Funciona con herramientas de diferencias externas
## 🗜️ **Operaciones con Archivos Comprimidos**
### **Compresión y Archivos:**
- `Z` - **Comprimir/descomprimir** detecta automáticamente el formato
- Admite: `.gz`, `.zip`, `.tar`, `.tar.gz`, `.tar.xz`, `.7z`
- Usa las herramientas apropiadas: `gzip`, `zip`, `tar`, `7z`
### **Visualización de Archivos Comprimidos:**
- Abre archivos `.zip`, `.tar`, etc. directamente para navegar por su contenido
- Extrae archivos específicos de los archivos comprimidos
## 🎛️ **Personalización y Ajustes**
### **Opciones de Vista:**
- `(` - **Alternar** entre vista simple y detallada
- `s` - **Ciclar** entre los órdenes de clasificación (nombre, fecha, tamaño)
- Listados mejorados con `exa` o `lsd` si están disponibles
### **Ajustes Útiles:**
- Dired reutiliza los búferes por defecto en Doom
- Actualización automática al cambiar los archivos
- Integración con los atajos de teclado del modo Evil
## ⚡ **Treemacs (Explorador en Árbol)**
### **Treemacs Básico:**
- `SPC o p` - **Alternar** la barra lateral de Treemacs
- `j/k` - **Navegar** arriba/abajo en el árbol
- `RET` - **Abrir archivo** o expandir/contraer directorio
- `TAB` - **Expandir/contraer** directorio
### **Operaciones de Archivo en Treemacs:**
- `cf` - **Crear archivo**
- `cd` - **Crear directorio**
- `R` - **Renombrar**
- `d` - **Eliminar**
- `yy` - **Copiar** la ruta al portapapeles
## 🚀 **Flujo de Trabajo de Inicio Rápido**
### **Gestión Básica de Archivos:**
1. **Presiona `SPC .`** - Abre Dired en el directorio actual
2. **Navega con `j/k`** - Muévete entre los archivos
3. **Marca archivos con `m`** - Selecciona múltiples archivos
4. **Usa `C` para copiar** o `R` para mover/renombrar
5. **Presiona `g`** para refrescar cuando termines
### **Operaciones de Archivo Eficientes:**
1. **Marca múltiples archivos** con `m`
2. **Ejecuta operaciones por lotes** (`C` para copiar, `R` para mover)
3. **Usa `!`** para ejecutar comandos de shell en los archivos marcados
4. **Alterna los detalles con `(`** para más/menos información
## 📚 **Resumen de Atajos Esenciales**
| Acción | Tecla | Descripción |
|--------|-----|-------------|
| Abrir Dired | `SPC .` | Abrir explorador de archivos |
| Navegar | `j/k` | Moverse arriba/abajo |
| Entrar/Abrir | `RET` o `l` | Abrir archivo/directorio |
| Directorio Padre | `h` o `^` | Subir un directorio |
| Marcar | `m` | Marcar archivo para operaciones |
| Copiar | `C` | Copiar archivos marcados |
| Mover/Renombrar | `R` | Mover o renombrar archivos |
| Eliminar | `d` y luego `x` | Marcar para eliminar, ejecutar |
| Crear Directorio | `+` | Crear nuevo directorio |
| Comprimir | `Z` | Comprimir/descomprimir |
| Buscar en Archivos | `A` | Buscar dentro de los archivos |
| Refrescar | `g` | Refrescar el listado del directorio |
| Ayuda | `?` | Mostrar comandos disponibles |
## 🔧 **Solución de Problemas**
### **Problemas Comunes:**
- **¿El búfer de Dired no se actualiza?** Presiona `g` para refrescar
- **¿No puedes ver los detalles del archivo?** Presiona `(` para alternar la vista detallada
- **¿Las operaciones son lentas?** Usa el marcado (`m`) para operaciones por lotes
- **¿Orden de clasificación incorrecto?** Presiona `s` para ciclar entre las opciones de clasificación
### **Consejos de Rendimiento:**
- Instala `fd` para una búsqueda de archivos más rápida
- Instala `rg` (ripgrep) para una búsqueda de texto más rápida
- Usa `rsync` para una copia de archivos eficiente
- Considera `exa` o `lsd` para listados de directorios mejorados
### **Obteniendo Ayuda:**
- `?` - **Ayuda contextual** en cualquier búfer de Dired
- `C-h m` - **Ayuda específica del modo**
- `SPC h d f dired` - **Documentación completa de Dired**
## 📋 **Comparación: Dired vs Treemacs**
### **Usa Dired cuando:**
- Gestionas múltiples archivos a la vez
- Necesitas información detallada de los archivos
- Realizas operaciones por lotes
- Trabajas con permisos/propiedad de archivos
### **Usa Treemacs cuando:**
- Necesitas una vista rápida del proyecto
- Navegación de archivos simple
- Prefieres una estructura de árbol visual
- Necesitas una barra lateral persistente
## 🛠️ **Integración con Herramientas Externas**
### **Herramientas Recomendadas:**
- **`rsync`** - Copia de archivos rápida y fiable con capacidad de reanudación
- **`ripgrep` (rg)** - Búsqueda de texto extremadamente rápida, mucho más rápida que grep
- **`fd`** - Alternativa rápida a find con mejores valores predeterminados
- **`exa`** - Reemplazo moderno de ls con colores e integración con git
- **`trash-cli`** - Eliminación segura a la papelera en lugar de eliminación permanente
- **`7z`** - Maneja archivos 7zip y otros formatos de compresión
### **Instalación (Debian/Ubuntu):**
```bash
sudo apt install rsync ripgrep fd-find exa trash-cli p7zip-full
```
## 🎯 **Consejos Profesionales**
- **Operaciones por lotes**: Marca los archivos primero (`m`), luego ejecuta las operaciones
- **Navegación rápida**: Usa `/` para buscar archivos por nombre
- **Editar nombres de archivo**: Usa `C-x C-q` para el modo Wdired para renombrar múltiples archivos
- **Integración con la shell**: Usa `!` para ejecutar comandos de shell en los archivos
- **Múltiples directorios**: Usa `i` para mostrar subdirectorios en el mismo búfer
- **Eliminación segura**: Instala `trash-cli` para enviar archivos a la papelera en lugar de eliminarlos permanentemente
- **Búsqueda rápida**: Instala `ripgrep` para una búsqueda de texto ultrarrápida en los archivos
Dired proporciona una experiencia completa de gestión de archivos que se integra bien con herramientas externas de Linux, haciendo que las operaciones con archivos sean eficientes y potentes.

View file

@ -1,5 +1,6 @@
# Doom Emacs File Explorer Cheatsheet
English | [Español](./emacs.file-explorer.cheatsheet.es.md)
# Doom Emacs File Explorer Cheatsheet
## 🗂️ **What is Dired?**
Dired (Directory Editor) is Emacs' built-in file manager that allows you to navigate, manage, and manipulate files and directories efficiently.

View file

@ -0,0 +1,276 @@
[English](./emacs.getting-started.top10.md) | Español
# Las 10 Cosas Principales que los Nuevos Usuarios de Doom Emacs Deberían Saber
## 🚀 **Primeros Pasos con Doom Emacs**
¡Bienvenido a Doom Emacs! Aquí están las 10 cosas más esenciales que todo nuevo usuario debería dominar para ser productivo rápidamente.
---
## 1. 🗝️ **Domina la Tecla Líder: `SPC`**
**La tecla Espacio es tu puerta de entrada a todo en Doom Emacs.**
- `SPC` se llama la "tecla líder" - abre menús para casi todas las acciones
- Después de presionar `SPC`, verás sugerencias útiles que muestran los comandos disponibles
- Los comandos están organizados lógicamente: `SPC f` para archivos, `SPC g` para git, `SPC p` para proyectos
**Comandos esenciales para empezar:**
- `SPC f f` - Buscar/abrir archivos
- `SPC f s` - Guardar archivo actual
- `SPC q q` - Salir de Emacs
- `SPC h` - Menú de ayuda (¡muy importante!)
**Consejo Profesional:** Si olvidas lo que sigue, simplemente presiona `SPC` y espera - ¡Doom te mostrará las opciones!
---
## 2. 📁 **Navega por los Archivos como un Profesional**
**La navegación de archivos es fundamental para la productividad.**
- `SPC .` - **Abrir explorador de archivos** (Dired) en el directorio actual
- `SPC f f` - **Buscar archivo** en cualquier parte de tu sistema
- `SPC f r` - **Archivos recientes** en los que has trabajado
- `SPC SPC` - **Buscar archivo en el proyecto actual** (¡súper útil!)
📋 _Consulta la guía completa: `emacs.file-explorer.cheatsheet.md`_
**Flujo de trabajo rápido:**
1. Abre el directorio de tu proyecto en la terminal
2. Inicia Emacs: `emacs` (o `emacsclient -c` para GUI, `et` para TTY)
3. Usa `SPC .` para explorar archivos o `SPC SPC` para encontrar archivos rápidamente
---
## 3. ⌨️ **Entiende el Modo Evil (Atajos de Teclado de Vim)**
**Doom Emacs usa atajos de teclado al estilo de Vim por defecto.**
**Movimiento básico (en modo Normal):**
- `h j k l` - Izquierda, abajo, arriba, derecha
- `w` - Saltar a la siguiente palabra
- `b` - Saltar una palabra hacia atrás
- `gg` - Ir al principio del archivo
- `G` - Ir al final del archivo
**Cambio de modo:**
- `i` - Entrar en modo de Inserción (para escribir texto)
- `ESC` - Volver al modo Normal
- `v` - Modo Visual (para seleccionar texto)
**Si no estás familiarizado con Vim:** ¡No te asustes! Puedes aprender gradualmente. Lo básico anterior te ayudará a empezar.
---
## 4. 🔍 **Busca y Reemplaza Eficientemente**
**Encontrar y cambiar texto es una tarea diaria.**
- `/` - Buscar hacia adelante en el búfer actual
- `?` - Buscar hacia atrás en el búfer actual
- `n/N` - Resultado de búsqueda siguiente/anterior
- `SPC s s` - Buscar en el búfer actual (interactivo)
- `SPC s p` - Buscar en todo el proyecto
- `SPC s r` - Buscar y reemplazar en el búfer actual
**Para búsquedas en todo el proyecto:** `SPC s p` es increíblemente poderoso para encontrar código en todo tu proyecto.
---
## 5. 🗂️ **Trabaja con Búferes y Ventanas**
**Los búferes son archivos abiertos, las ventanas son cómo los ves.**
**Gestión de búferes:**
- `SPC b b` - Cambiar entre búferes abiertos
- `SPC b k` - Matar (cerrar) el búfer actual
- `SPC b s` - Guardar el búfer actual
**Gestión de ventanas:**
- `SPC w v` - Dividir la ventana verticalmente
- `SPC w s` - Dividir la ventana horizontalmente
- `SPC w c` - Cerrar la ventana actual
- `SPC w w` - Cambiar entre ventanas
- `C-h j/k/h/l` - Navegar entre ventanas (estilo Vim)
**Piénsalo de esta manera:** Puedes tener muchos archivos abiertos (búferes) pero solo ver algunos de ellos a la vez (ventanas).
---
## 6. 🛠️ **Configura y Personaliza Doom**
**Doom es altamente configurable, pero empieza de forma sencilla.**
**Archivos clave que debes conocer:**
- `~/.doom.d/config.el` - Tu configuración personal
- `~/.doom.d/init.el` - Habilitar/deshabilitar módulos de Doom
- `~/.doom.d/packages.el` - Añadir paquetes adicionales
**Comandos esenciales:**
- `SPC h r r` - Recargar la configuración de Doom
- `SPC h d h` - Ayuda y documentación de Doom
- `doom doctor` - Comprobar si hay problemas de configuración (ejecutar en la terminal)
- `doom upgrade` - Actualizar Doom (ejecutar en la terminal)
**Empieza poco a poco:** No intentes personalizar todo de una vez. Usa primero los valores predeterminados de Doom y luego ajusta las cosas gradualmente.
---
## 7. 📝 **Domina los Conceptos Básicos de Edición de Texto**
**Comandos de edición esenciales que funcionan en cualquier modo.**
**En modo Normal (Evil):**
- `x` - Eliminar el carácter bajo el cursor
- `dd` - Eliminar la línea entera
- `yy` - Copiar (yank) la línea entera
- `p` - Pegar después del cursor
- `u` - Deshacer
- `C-r` - Rehacer
**En modo de Inserción:**
- `C-w` - Eliminar palabra hacia atrás
- `C-u` - Eliminar hasta el principio de la línea
**Selección y manipulación:**
- `v` - Iniciar selección visual
- `V` - Seleccionar la línea entera
- `d` - Eliminar el texto seleccionado
- `y` - Copiar el texto seleccionado
---
## 8. 💻 **Usa la Autocompletación de Código y las Funciones del Lenguaje**
**Doom viene con un excelente soporte de código de fábrica.**
**Autocompletación:**
- Simplemente empieza a escribir - las terminaciones aparecen automáticamente
- `TAB` - Aceptar la terminación
- `C-n/C-p` o `j/k` - Navegar por las opciones de terminación
**Navegación de código:**
- `gd` - Ir a la definición
- `gr` - Encontrar referencias
- `K` - Mostrar documentación
- `SPC c a` - Acciones de código (refactorizar, arreglar, etc.)
📋 _Consulta la guía completa: `emacs.code-completion.cheatsheet.md`_
**Lenguajes soportados:** La mayoría de los lenguajes populares funcionan de fábrica (Python, JavaScript, C/C++, Rust, Go, etc.)
---
## 9. 📚 **Usa el Sistema de Ayuda Incorporado**
**Doom tiene una excelente documentación incorporada.**
- `SPC h` - **Menú principal de ayuda**
- `SPC h d h` - **Ayuda específica de Doom**
- `SPC h k` - **Describir tecla** (¿qué hace esta tecla?)
- `SPC h f` - **Describir función**
- `SPC h v` - **Describir variable**
- `C-h m` - **Mostrar ayuda para el modo actual**
**Cuando estés perdido:** Presiona `SPC h` y explora. El sistema de ayuda es completo y siempre está disponible.
**Consejo Profesional:** Si presionas una combinación de teclas y no sabes qué pasó, usa `SPC h l` para ver los comandos recientes.
---
## 10. 🔧 **Aprende la Integración con Git (Magit)**
**Magit es una de las mejores interfaces de Git disponibles en cualquier lugar.**
- `SPC g g` - Abrir el estado de Magit (¡tu comando principal de Git!)
- `s` - Preparar archivos o fragmentos
- `c c` - Confirmar cambios
- `P P` - Empujar al remoto
- `F F` - Traer del remoto
📋 _Consulta la guía completa: `emacs.magit.cheatsheet.md`_
**Flujo de trabajo básico:**
1. `SPC g g` - Ver qué ha cambiado
2. `s` en los archivos para prepararlos
3. `c c` para confirmar (escribe el mensaje, luego `C-c C-c`)
4. `P P` para empujar
**Por qué es esencial:** Si trabajas con Git, Magit transformará tu flujo de trabajo. Es visual, rápido e increíblemente poderoso.
---
## 🎯 **Lista de Verificación de Inicio Rápido**
Una vez que hayas leído lo anterior, prueba este flujo de trabajo de 5 minutos:
1. ✅ **Abre Doom:** `emacs` en la terminal
2. ✅ **Encuentra un archivo:** `SPC f f` y abre cualquier archivo de texto
3. ✅ **Edita algo:** Presiona `i`, escribe texto, presiona `ESC`
4. ✅ **Guarda:** `SPC f s`
5. ✅ **Abre el explorador de archivos:** `SPC .`
6. ✅ **Obtén ayuda:** `SPC h`
7. ✅ **Divide la ventana:** `SPC w v`
8. ✅ **Cambia de búfer:** `SPC b b`
9. ✅ **Busca en el proyecto:** `SPC s p` (si estás en un proyecto)
10. ✅ **Sal:** `SPC q q`
---
## 📖 **Próximos Pasos: Profundiza**
Una vez que te sientas cómodo con lo básico anterior:
1. **Lee las hojas de trucos específicas:**
- `emacs.file-explorer.cheatsheet.md` - Gestión de archivos
- `emacs.code-completion.cheatsheet.md` - Funciones de codificación
- `emacs.magit.cheatsheet.md` - Integración con Git
- `emacs.markdown.cheatsheet.md` - Edición de Markdown
2. **Personaliza gradualmente:** Empieza a ajustar tu `config.el`
3. **Aprende tu lenguaje:** Explora las funciones específicas del lenguaje
4. **Únete a la comunidad:** Discord de Doom, Reddit, discusiones de GitHub
---
## 🆘 **Cuando Estés Atascado**
**Comandos de emergencia:**
- `C-g` - Cancelar el comando actual (como presionar ESC)
- `SPC q q` - Salir de Emacs
- `SPC h d h` - Ayuda de Doom
- `:q` - Salir del búfer actual (comando de Vim)
**Recuerda:** Todo experto fue una vez un principiante. No intentes aprender todo de una vez. Domina estas 10 cosas primero, luego explora gradualmente funciones más avanzadas.
**El consejo más importante:** Usa `SPC` y explora los menús. ¡Doom está diseñado para ser descubrible - deja que te guíe!
---
## 🎓 **Filosofía de Aprendizaje**
**Empieza con flujos de trabajo, no con funciones:** En lugar de memorizar cada atajo de teclado, aprende flujos de trabajo completos para las tareas que haces a diario (editar archivos, confirmar código, buscar en proyectos).
**Usa primero los valores predeterminados:** Los valores predeterminados de Doom son excelentes. Resiste la tentación de personalizar todo de inmediato.
**Una cosa a la vez:** Domina la navegación de archivos antes de sumergirte en funciones de código avanzadas. Construye tus habilidades de forma incremental.
**Practica a diario:** Usa Doom para el trabajo real, incluso si al principio eres más lento. La memoria muscular se desarrolla con la práctica.
¡Bienvenido a Doom Emacs! 🚀

View file

@ -1,5 +1,6 @@
# Top 10 Things New Doom Emacs Users Should Know
English | [Español](./emacs.getting-started.top10.es.md)
# Top 10 Things New Doom Emacs Users Should Know
## 🚀 **Getting Started with Doom Emacs**
Welcome to Doom Emacs! Here are the 10 most essential things every new user
@ -42,7 +43,7 @@ will show you the options!
**Quick workflow:**
1. Open your project directory in terminal
2. Start Emacs: `emacs` or `doom run`
2. Start Emacs: `emacs` (or `emacsclient -c` for GUI, `et` for TTY)
3. Use `SPC .` to browse files or `SPC SPC` to quickly find files
---

View file

@ -0,0 +1,276 @@
[English](./emacs.magit.cheatsheet.md) | Español
# Cheatsheet de Magit para Doom Emacs
## 🚀 **¿Qué es Magit?**
Magit es una herramienta extremadamente poderosa para gestionar tu proyecto de Git.
- Flujos de trabajo de Git visuales e interactivos
- Prepara para confirmación (stage) fragmentos (hunks), líneas o archivos completos con facilidad
- Confirma (commit), empuja (push), trae (pull), fusiona (merge), reorganiza (rebase) - todo desde menús intuitivos
- Ve el estado de tu repositorio de un vistazo
## 📋 **Requisitos**
- Git instalado en tu sistema
- Doom Emacs con Magit habilitado (incluido por defecto)
- Estar trabajando dentro de un repositorio de Git
## ⌨️ **Abriendo Magit**
### **Interfaz Principal de Magit:**
- `SPC g g` - **Estado de Magit** (¡tu comando principal!)
- `SPC g d` - **Despacho de archivos de Magit**
- `SPC g f` - **Comandos de archivo de Magit**
- `SPC g l` - **Registro (log) de Magit**
- `SPC g b` - **Culpar (blame) de Magit**
## 🎯 **El Búfer de Estado de Magit** (Tu Centro de Mando)
### **Navegación:**
- `j/k` o `n/p` - **Moverse arriba/abajo** entre secciones
- `TAB` - **Expandir/contraer** la sección bajo el cursor
- `M-TAB` - **Expandir/contraer** todas las secciones
- `g` - **Refrescar** el búfer de estado
### **Resumen de Secciones:**
```
Archivos sin seguimiento - Archivos que no están en Git
Cambios sin preparar - Archivos modificados no preparados para confirmación
Cambios preparados - Archivos listos para confirmar
Confirmaciones recientes - Tu historial de confirmaciones
Aliijos (Stashes) - Tu trabajo en progreso guardado
```
## 📝 **Preparando y Despreparando (Staging & Unstaging)**
### **Preparar Archivos:**
- `s` - **Preparar** archivo/fragmento bajo el cursor
- `S` - **Preparar todos** los cambios sin preparar
- `i` - **Ignorar** archivo (añadir a .gitignore)
### **Despreparar Archivos:**
- `u` - **Despreparar** archivo/fragmento bajo el cursor
- `U` - **Despreparar todos** los cambios preparados
### **Descartar Cambios:**
- `k` - **Descartar** cambios en el archivo/fragmento bajo el cursor
- `K` - **Descartar todos** los cambios en el directorio de trabajo
### **Preparando Fragmentos y Líneas:**
- `RET` o `SPC` - **Mostrar diferencias (diff)** del archivo bajo el cursor
- En la vista de diferencias:
- `s` - **Preparar fragmento** bajo el cursor
- `u` - **Despreparar fragmento** bajo el cursor
- `k` - **Descartar fragmento** bajo el cursor
- `+/-` - **Mostrar más/menos** líneas de contexto
## 💾 **Confirmando (Committing)**
### **Crear Confirmaciones:**
- `c c` - **Confirmar** (abre el búfer de mensaje de confirmación)
- `c a` - **Enmendar** la última confirmación
- `c e` - **Extender** la última confirmación (sin cambio de mensaje)
- `c w` - **Reescribir** el mensaje de la última confirmación
- `c f` - **Arreglar (fixup)** una confirmación
- `c s` - **Aplastar (squash)** una confirmación
### **En el Búfer de Mensaje de Confirmación:**
- `C-c C-c` - **Finalizar confirmación**
- `C-c C-k` - **Cancelar confirmación**
- `M-p/M-n` - **Mensaje de confirmación anterior/siguiente** del historial
## 🌿 **Ramas y Cambio (Branching & Switching)**
### **Operaciones con Ramas:**
- `b b` - **Cambiar de rama** (checkout)
- `b c` - **Crear nueva rama**
- `b n` - **Crear rama** desde el HEAD actual
- `b s` - **Crear rama** y cambiar a ella
- `b r` - **Renombrar rama**
- `b k` - **Eliminar rama**
### **Ramas Remotas:**
- `b a` - **Establecer rama de seguimiento (upstream)** para la rama actual
- `b u` - **Establecer rama de seguimiento** y empujar
## 🔄 **Operaciones Remotas**
### **Traer y Actualizar (Fetch & Pull):**
- `f f` - **Traer** desde el remoto predeterminado
- `f a` - **Traer desde todos** los remotos
- `F F` - **Actualizar** desde la rama de seguimiento
- `F u` - **Actualizar desde la rama de seguimiento** (rebase)
### **Empujar (Push):**
- `P P` - **Empujar** a la rama de seguimiento
- `P u` - **Empujar y establecer rama de seguimiento**
- `P f` - **Forzar empuje** (¡úsalo con cuidado!)
- `P t` - **Empujar etiquetas**
## 📚 **Viendo Historial y Registros**
### **Vistas de Registro:**
- `l l` - **Mostrar registro** para la rama actual
- `l o` - **Mostrar registro** para otras ramas
- `l h` - **Mostrar registro** para HEAD
- `l a` - **Mostrar registro** para todas las ramas
- `l f` - **Mostrar registro** para el archivo bajo el cursor
### **En la Vista de Registro:**
- `RET` - **Mostrar detalles** de la confirmación
- `d d` - **Mostrar diferencias** para la confirmación
- `c c` - **Crear nueva confirmación**
- `r r` - **Revertir confirmación**
## 🔍 **Diferencias y Comparaciones**
### **Comandos de Diferencias:**
- `d d` - **Diferencias del directorio de trabajo** vs preparado
- `d s` - **Diferencias de lo preparado** vs HEAD
- `d u` - **Diferencias de los cambios sin preparar**
- `d r` - **Diferencias de un rango** entre confirmaciones
### **En las Vistas de Diferencias:**
- `j/k` - **Navegar** entre fragmentos
- `n/p` - **Archivo siguiente/anterior**
- `TAB` - **Alternar** visibilidad de la sección de diferencias
- `+/-` - **Aumentar/disminuir** líneas de contexto
## 🔧 **Reorganizando y Fusionando (Rebasing & Merging)**
### **Fusionar:**
- `m m` - **Fusionar** rama
- `m a` - **Abortar fusión**
- `m c` - **Continuar fusión**
### **Reorganizar:**
- `r i` - **Reorganización interactiva**
- `r r` - **Reorganizar** rama
- `r a` - **Abortar reorganización**
- `r c` - **Continuar reorganización**
### **Durante la Reorganización Interactiva:**
- `j/k` - **Moverse** entre confirmaciones
- `p` - **Elegir (pick)** confirmación (predeterminado)
- `r` - **Reescribir (reword)** mensaje de confirmación
- `e` - **Editar (edit)** confirmación
- `s` - **Aplastar (squash)** confirmación
- `f` - **Arreglar (fixup)** confirmación
- `d` - **Descartar (drop)** confirmación
## 📦 **Aliijos (Stashing)**
### **Operaciones con Aliijos:**
- `z z` - **Alijar** los cambios actuales
- `z i` - **Alijar** con mensaje
- `z a` - **Aplicar alijo**
- `z p` - **Sacar alijo** (aplicar y eliminar)
- `z k` - **Descartar alijo**
- `z l` - **Listar alijos**
## 🏷️ **Etiquetas (Tags)**
### **Operaciones con Etiquetas:**
- `t t` - **Crear etiqueta**
- `t a` - **Crear etiqueta anotada**
- `t k` - **Eliminar etiqueta**
- `t p` - **Empujar etiqueta**
## ⚡ **Consejos Profesionales y Flujos de Trabajo**
### **Flujo de Trabajo Diario de Git:**
1. `SPC g g` - **Abrir estado de Magit**
2. Revisar cambios, preparar con `s`
3. `c c` - **Confirmar cambios**
4. `P P` - **Empujar al remoto**
### **Trucos de Usuario Avanzado:**
- Usa `M-x magit-find-file` para abrir rápidamente archivos del historial de Git
- `SPC g f s` - **Preparar archivo actual** sin abrir Magit
- `SPC g f u` - **Despreparar archivo actual**
- `SPC g f d` - **Mostrar diferencias del archivo**
### **Granularidad de la Preparación:**
- Prepara archivos completos con `s` en el búfer de estado
- Prepara fragmentos individuales entrando en la vista de diferencias (`RET`) y luego `s`
- Prepara líneas individuales seleccionando una región en la diferencia y luego `s`
### **Buenas Prácticas de Confirmación:**
- Usa `c c` para confirmaciones normales
- Usa `c a` para arreglar tu última confirmación
- Usa `c f` para crear confirmaciones de arreglo para una reorganización interactiva posterior
## 🔧 **Solución de Problemas**
### **Problemas Comunes:**
- **¿Magit no se abre?** Asegúrate de estar en un repositorio de Git
- **¿Rendimiento lento?** Prueba `M-x magit-refresh` o reinicia Emacs
- **¿Conflictos de fusión?** Magit resalta los conflictos - resuélvelos y usa `m c`
### **Obteniendo Ayuda:**
- `?` - **Mostrar ayuda** en cualquier búfer de Magit
- `C-h m` - **Mostrar ayuda del modo**
- `SPC h d m magit` - **Documentación completa de Magit**
## 🚀 **Flujo de Trabajo de Inicio Rápido**
1. **Navega a tu repositorio de Git** en Doom Emacs
2. **Presiona `SPC g g`** - Abre el estado de Magit
3. **Prepara archivos** con `s`, revisa las diferencias con `RET`
4. **Confirma** con `c c`, escribe el mensaje, finaliza con `C-c C-c`
5. **Empuja** con `P P`
## 📚 **Resumen de Atajos Esenciales**
| Acción | Tecla | Descripción |
| --------- | --------- | -------------------- |
| Estado | `SPC g g` | Abrir estado de Magit|
| Preparar | `s` | Preparar archivo/fragmento |
| Despreparar| `u` | Despreparar archivo/fragmento |
| Confirmar | `c c` | Crear confirmación |
| Empujar | `P P` | Empujar a la rama de seguimiento |
| Actualizar| `F F` | Actualizar desde la rama de seguimiento |
| Rama | `b b` | Cambiar de rama |
| Registro | `l l` | Mostrar registro |
| Diferencias| `d d` | Mostrar diferencias |
| Alijar | `z z` | Alijar cambios |
| Ayuda | `?` | Mostrar ayuda contextual |
## 🎉 **Por Qué Magit es Increíble**
- **Visual**: Ve todo el estado de tu repositorio de un vistazo
- **Interactivo**: Prepara fragmentos, líneas o archivos con simples pulsaciones de teclas
- **Rápido**: Navega por las operaciones de Git más rápido que cualquier CLI
- **Potente**: Accede a todas las funciones de Git a través de menús intuitivos
- **Integrado**: Funciona perfectamente con Doom Emacs y el modo Evil
**Consejo Profesional**: Una vez que aprendas Magit, ¡nunca más querrás usar Git desde la línea de comandos! 🚀

View file

@ -1,5 +1,6 @@
# Doom Emacs Magit Cheatsheet
English | [Español](./emacs.magit.cheatsheet.es.md)
# Doom Emacs Magit Cheatsheet
## 🚀 **What is Magit?**
Magit is an extremely powerful tool for managing your Git project

View file

@ -0,0 +1,86 @@
[English](./emacs.markdown.cheatsheet.md) | Español
# Cheatsheet de Markdown para Doom Emacs
## 📝 **Primeros Pasos**
- Abre cualquier archivo `.md` - Doom habilita automáticamente `markdown-mode`
- Obtendrás resaltado de sintaxis, sangría adecuada y características específicas de markdown
## ⌨️ **Comandos Clave de Markdown** (con atajos de Evil/Vim)
### **Formato de Texto:**
- `SPC m b` - Texto en **negrita**
- `SPC m i` - Texto en *cursiva*
- `SPC m c` - `Código en línea`
- `SPC m C` - Bloque de código
- `SPC m s` - ~~Tachado~~
### **Encabezados:**
- `SPC m h` - Insertar encabezado (solicita el nivel 1-6)
- `SPC m H` - Insertar encabezado con estilo de subrayado
### **Listas:**
- `SPC m l` - Insertar elemento de lista no ordenada
- `SPC m L` - Insertar elemento de lista ordenada
### **Enlaces e Imágenes:**
- `SPC m l l` - Insertar enlace
- `SPC m l i` - Insertar imagen
- `SPC m l u` - Insertar URL
### **Navegación:**
- `]]` - Siguiente encabezado
- `[[` - Encabezado anterior
- `SPC m o` - Abrir esquema/tabla de contenidos
## 👁️ **Vista Previa en Vivo**
- `SPC m p` - Vista previa en el navegador
- `SPC m P` - Exportar a HTML
## 📊 **Tablas**
- `SPC m t` - Comandos de tabla
- `SPC m t t` - Insertar tabla
- `TAB` - Navegar entre celdas
- `S-TAB` - Navegar hacia atrás entre celdas
## 🎯 **Atajos Útiles de Evil en Markdown**
- `TAB` - Ciclar el plegado de encabezados
- `S-TAB` - Ciclar el plegado globalmente
- `RET` - Seguir enlaces
- `M-RET` - Insertar nuevo elemento de lista
## 🧪 **Ejemplos de Prueba**
### Formato de Muestra
Este es **texto en negrita** y este es *texto en cursiva*.
Aquí hay algo de `código en línea` y un bloque de código:
```bash
# Ejemplo de bloque de código
echo "¡Hola desde markdown!"
```
### Lista de Muestra
- [ ] Elemento de casilla de verificación 1
- [x] Casilla de verificación completada
- Punto de viñeta normal
### Tabla de Muestra
| Característica | Atajo | Descripción |
|----------------|---------|--------------------------|
| Negrita | SPC m b | Poner texto en negrita |
| Cursiva | SPC m i | Poner texto en cursiva |
| Vista Previa | SPC m p | Vista previa en el navegador |
## 🚀 **Consejos Profesionales**
1. Usa `SPC m o` para obtener una vista de esquema para la navegación
2. `TAB` en los encabezados para plegar/desplegar secciones
3. `RET` en los enlaces para seguirlos
4. Usa `SPC m p` para previsualizar tu markdown en un navegador
5. Crea listas de verificación con la sintaxis `- [ ]`
## 📚 **Referencia Rápida**
- Todos los comandos de markdown comienzan con `SPC m`
- Usa `SPC m ?` o `C-h m` para ver todos los comandos disponibles
- Navegación entre encabezados: `]]` (siguiente) y `[[` (anterior)
- Alternar plegado: `TAB` (local) y `S-TAB` (global)

View file

@ -1,5 +1,6 @@
# Doom Emacs Markdown Cheatsheet
English | [Español](./emacs.markdown.cheatsheet.es.md)
# Doom Emacs Markdown Cheatsheet
## 📝 **Getting Started**
- Open any `.md` file - Doom automatically enables `markdown-mode`
- You'll get syntax highlighting, proper indentation, and markdown-specific features

View file

@ -0,0 +1,45 @@
Español | [English](./emacs.nix.cheatsheet.md)
# Guía Rápida: Doom Emacs + Nix
Esta guía enumera los comandos de Nix y los atajos configurados en tu Doom Emacs.
## Requisitos
- Módulo de Doom habilitado: `(nix +tree-sitter +lsp)` en `~/.doom.d/init.el`
- Paquetes instalados (en `~/.doom.d/packages.el`): `nix`, `nix-update`, `nixos-options`
- Herramientas Nix disponibles en el sistema: `nix`, `nixfmt` (o tu formateador preferido)
- Opcional pero recomendado: `nil` (LSP de Nix)
## Convenciones de teclas (Leader)
- `SPC` = tecla líder de Doom
- `SPC m` = menú del modo mayor (contextual al buffer actual, p. ej., buffers Nix)
## Atajos para Nix
- `SPC m f` → `nix-format-buffer` — Formatea el buffer Nix actual (usa `nixfmt` por defecto)
- `SPC m b` → `nix-build` — Construye la derivación/expresión actual
- `SPC m s` → `nix-shell` — Abre un `nix-shell`
- `SPC m u` → `nix-unpack` — Desempaqueta una fuente de Nix
- `SPC m r` → `nix-repl-show` — Muestra información de símbolo en el REPL de Nix
- `SPC m U` → `nix-update-fetch` — Actualiza fetchers/hashes en expresiones Nix
- `SPC m o` → `+nix/lookup-option` — Busca una opción de NixOS (requiere `:tools lookup` y `nixos-options`)
## Referencia de comandos
- `nix-format-buffer`: Formatea el buffer usando `nixfmt`.
- Configuración: `(setq nix-nixfmt-bin "nixfmt")`.
- Consejo: ¿Prefieres otro formateador? Instálalo y ajusta `nix-nixfmt-bin` (p. ej., `"alejandra"` o `"nixpkgs-fmt"`).
- `nix-build`: Inicia una construcción para el archivo/contexto actual.
- `nix-shell`: Abre un shell de desarrollo derivado de la expresión Nix actual.
- `nix-unpack`: Desempaqueta la fuente de una derivación (útil para inspeccionar fuentes).
- `nix-repl-show`: Muestra información de símbolo desde una sesión del REPL de Nix.
- `nix-update-fetch`: Actualiza atributos de fetcher (rev, sha256, etc.).
- `+nix/lookup-option`: Salta a la documentación de una opción de NixOS usando la integración con `nixos-options`.
## Consejos
- Asegúrate de estar editando un archivo `.nix` para que `SPC m` (modo mayor) esté disponible.
- Para funciones LSP (documentación, autocompletado, diagnósticos), verifica que el servidor `nil` esté instalado y activo.
## Solución de problemas
- ¿Comandos no disponibles en Emacs? Ejecuta `~/.emacs.d/bin/doom sync` y reinicia Emacs.
- ¿El formateador no funciona? Verifica que `nixfmt` (u otro) esté en tu PATH y que `nix-nixfmt-bin` coincida con su nombre.
- ¿La búsqueda de opciones no funciona? Asegúrate de tener `nixos-options` instalado y que `:tools lookup` esté habilitado en Doom.

View file

@ -0,0 +1,45 @@
English | [Español](./emacs.nix.cheatsheet.es.md)
# Doom Emacs + Nix Cheatsheet
This guide lists the Nix commands and keybindings configured in your Doom Emacs.
## Requirements
- Doom module enabled: `(nix +tree-sitter +lsp)` in `~/.doom.d/init.el`
- Packages installed (via `~/.doom.d/packages.el`): `nix`, `nix-update`, `nixos-options`
- Nix tooling available on system: `nix`, `nixfmt` (or your preferred formatter)
- Optional but recommended: `nil` (Nix LSP)
## Leader key conventions
- `SPC` = Doom leader
- `SPC m` = Major mode menu (contextual to current buffer, e.g., Nix buffers)
## Nix keybindings
- `SPC m f` → `nix-format-buffer` — Format current Nix buffer (uses `nixfmt` by default)
- `SPC m b` → `nix-build` — Build the current derivation / expression
- `SPC m s` → `nix-shell` — Open a `nix-shell`
- `SPC m u` → `nix-unpack` — Unpack a Nix source
- `SPC m r` → `nix-repl-show` — Show symbol info in Nix REPL
- `SPC m U` → `nix-update-fetch` — Update fetchers/hashes in Nix expressions
- `SPC m o` → `+nix/lookup-option` — Lookup NixOS option (requires `:tools lookup` and `nixos-options`)
## Command reference
- `nix-format-buffer`: Formats the current buffer using `nixfmt`.
- Configured via `(setq nix-nixfmt-bin "nixfmt")`.
- Tip: Prefer a different formatter? Install it and set `nix-nixfmt-bin` accordingly (e.g., `"alejandra"` or `"nixpkgs-fmt"`).
- `nix-build`: Triggers a build for the current file/context.
- `nix-shell`: Opens a development shell derived from the current Nix expression.
- `nix-unpack`: Unpacks the source for a derivation (useful to inspect sources).
- `nix-repl-show`: Displays symbol info from a Nix REPL session.
- `nix-update-fetch`: Updates fetcher attributes (rev, sha256, etc.).
- `+nix/lookup-option`: Jumps to documentation for a NixOS option using `nixos-options` integration.
## Tips
- Ensure you are editing a `.nix` file so the `SPC m` (major mode) bindings are available.
- For LSP features (hover docs, completion, diagnostics), make sure the `nil` language server is installed and running.
## Troubleshooting
- Commands not found in Emacs? Run `~/.emacs.d/bin/doom sync`, then restart Emacs.
- Formatter not working? Verify `nixfmt` (or chosen formatter) is on your PATH and `nix-nixfmt-bin` matches its name.
- Option lookup not working? Ensure `nixos-options` is installed and Doom’s `:tools lookup` is enabled.

View file

@ -0,0 +1,123 @@
[English](./ghostty.cheatsheet.md) | Español
# Ghostty en ZaneyOS — Resumen y Cheatsheet
## 🚀 Resumen de modules/home/terminals/ghostty.nix
- Programa
- Ghostty habilitado con el paquete de Nix: pkgs.ghostty
- Integraciones de shell: Fish, Zsh, Bash
- clearDefaultKeybinds = true (todos los atajos se definen explícitamente a continuación)
- Apariencia
- Título: ZaneyOS-GhosTTY
- TERM: xterm-256color
- Tema: oscuro: catppuccin-mocha; claro: catppuccin-mocha
- Tema de la ventana: oscuro
- Fuente: Maple Mono NF, tamaño 12
- Ajuste de altura de celda: +10%
- Opacidad del fondo: 1.00 (opaco)
- Radio de desenfoque del fondo: 60
- Estilo del cursor: barra
- Colores de selección: fondo #2d3f76, frente #c8d3f5
- Opacidad de división sin foco: 0.5
- Posición de terminal rápida: centro
- Ventana y Comportamiento
- Tamaño de ventana predeterminado: 110x32 (columnas x filas)
- Confirmar cierre de superficie: false
- Esperar después del comando: false
- Integración de shell: detectar; características: cursor, sudo
- Estado de guardado de ventana: siempre
- Instancia única de GTK: true
- Ratón: ocultar al escribir: true
- Atajos de Teclado (esquema de prefijo Super/Alt)
- El acorde personalizado tipo líder usa Alt+s y luego la tecla, ej. alt+s>c
- Portapapeles estándar y tamaño de fuente con acordes Ctrl+Shift
- Pestañas, divisiones, navegación, zoom, ecualizar definidos a continuación
---
## 🗝️ Cheatsheet de Atajos de Teclado
Portapapeles
- Ctrl+Shift+C — copy_to_clipboard
- Ctrl+Shift+V — paste_from_clipboard
Tamaño de fuente
- Ctrl+Shift+= (más) — increase_font_size:1
- Ctrl+Shift+- (menos) — decrease_font_size:1
- Ctrl+Shift+0 — reset_font_size
Sesión
- Alt+s r — reload_config
- Alt+s x — close_surface
- Alt+s n — new_window
Pestañas
- Alt+s c — new_tab
- Alt+s Shift+L — next_tab
- Alt+s Shift+H — previous_tab
- Alt+s , — move_tab:-1
- Alt+s . — move_tab:+1
- Alt+s 1..9 — goto_tab:N
Divisiones
- Alt+s \ — new_split:right
- Alt+s - — new_split:down
- Alt+s j — goto_split:bottom
- Alt+s k — goto_split:top
- Alt+s h — goto_split:left
- Alt+s l — goto_split:right
- Alt+s z — toggle_split_zoom
- Alt+s e — equalize_splits
Notas
- clearDefaultKeybinds = true significa que solo los anteriores están activos.
- La notación Alt+s> denota un acorde de dos teclas: mantén presionado Alt, presiona s, luego la siguiente tecla.
---
## ⚙️ Referencia de Opciones Predeterminadas (según configuración)
Terminal y ventana
- term: xterm-256color
- window-width: 110
- window-height: 32
- window-theme: dark
- window-save-state: always
- gtk-single-instance: true
- quick-terminal-position: center
Apariencia
- theme: catppuccin-mocha (oscuro y claro mapeados a mocha)
- font-family: Maple Mono NF
- font-size: 12
- adjust-cell-height: 10%
- background-opacity: 1.00
- background-blur-radius: 60
- selection-background: #2d3f76
- selection-foreground: #c8d3f5
- cursor-style: bar
- unfocused-split-opacity: 0.5
Comportamiento
- confirm-close-surface: false
- mouse-hide-while-typing: true
- wait-after-command: false
- shell-integration: detect
- shell-integration-features: cursor,sudo
Integraciones
- Integraciones de Fish, Zsh, Bash habilitadas
---
## 📝 Notas de Estilo/Formato
Este cheatsheet refleja el estilo de tus cheatsheets de Emacs:
- Encabezados de sección claros con emoji
- Listas con viñetas con descripciones concisas
- Bloques cortos de "Notas" para comportamientos especiales
Si lo deseas, puedo enlazar esto desde un índice central o agregar más consejos de Ghostty (temas, indicadores de rendimiento, solución de problemas).

View file

@ -1,5 +1,6 @@
# Ghostty on ddubsOS — Summary & Cheatsheet
English | [Español](./ghostty.cheatsheet.es.md)
# Ghostty on ZaneyOS — Summary & Cheatsheet
## 🚀 Summary of modules/home/terminals/ghostty.nix
- Program
@ -8,7 +9,7 @@
- clearDefaultKeybinds = true (all bindings are explicitly defined below)
- Appearance
- Title: ddubsOS-GhosTTY
- Title: ZaneyOS-GhosTTY
- TERM: xterm-256color
- Theme: dark: catppuccin-mocha; light: catppuccin-mocha
- Window theme: dark

View file

@ -0,0 +1,213 @@
# Cómo tematizar o añadir Waybars en ZaneyOS
Esta guía muestra cómo ZaneyOS selecciona y configura Waybar, cómo añadir tu propio módulo de Waybar y cómo personalizar fuentes, tamaños, colores, iconos, widgets y layout. También indica dónde colocar scripts y una nota crítica sobre git add para evitar fallos de rebuild.
## Módulos Waybar disponibles
Guardados en modules/home/waybar/:
- waybar-tony.nix
- waybar-ddubs.nix
- waybar-ddubsos-v1.nix
- waybar-dwm.nix
- waybar-curved.nix
- waybar-simple.nix
- waybar-ddubs-2.nix
- waybar-mecha.nix
- waybar-dwm2.nix
- waybar-nekodyke.nix
- Jerry-waybar.nix
## Dónde seleccionas tu Waybar
Selecciona el módulo en hosts/default/variables.nix vía waybarChoice. Ejemplo (extracto real):
```nix path=/home/dwilliams/ZaneyOS/hosts/default/variables.nix start=73
# Set Waybar
# Includes alternates such as:
# Comment out the current choice and uncomment the one you want
#waybarChoice = ../../modules/home/waybar/waybar-curved.nix;
#waybarChoice = ../../modules/home/waybar/Jerry-waybars.nix;
#waybarChoice = ../../modules/home/waybar/waybar-simple.nix;
#waybarChoice = ../../modules/home/waybar/waybar-mecha.nix;
#waybarChoice = ../../modules/home/waybar/waybar-nekodyke.nix;
#waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix;
waybarChoice = ../../modules/home/waybar/waybar-tony.nix;
#waybarChoice = ../../modules/home/waybar/waybar-ddubs-2.nix;
```
Notas:
- Asegúrate de que la ruta coincide con un archivo real bajo modules/home/waybar/. Por ejemplo, la lista incluye Jerry-waybar.nix (singular) pero el comentario muestra Jerry-waybars.nix (plural). Usa el nombre correcto para evitar errores de build.
## CRÍTICO: usa git add o fallará el rebuild
Cuando añadas un archivo Waybar o scripts que use, debes prepararlos con git antes de reconstruir, o Nix no verá esas rutas y fallará la build.
- Ejemplo:
```bash path=null start=null
# Añade tu módulo y scripts
git add modules/home/waybar/my-waybar.nix modules/home/waybar/scripts/my-widget.sh
# Commit (opcional pero recomendado)
git commit -m "Add my Waybar module and widget script"
```
## Cómo están estructurados los módulos Waybar aquí
- Exponen un módulo de Home Manager que define programs.waybar.settings (config estilo JSON) y programs.waybar.style (CSS).
- Copian scripts auxiliares a ~/.config/waybar/scripts desde un directorio compartido scripts.
Ejemplo: waybar-tony.nix copia scripts y define config y CSS de Waybar:
```nix path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-tony.nix start=15
# Configure & Theme Waybar (Tony)
home.file = builtins.listToAttrs (map
(name: {
name = ".config/waybar/scripts/" + name;
value = {
source = "${scriptsDir}/${name}";
executable = true;
};
})
scripts);
programs.waybar = {
enable = true;
package = pkgs.waybar;
settings = [
{
layer = "top";
position = "top";
height = 30;
spacing = 4;
modules-left = [
"custom/startmenu" "hyprland/workspaces" "custom/sep" "tray" "custom/sep" "hyprland/window" "custom/sep"
];
modules-center = [ "custom/sep" "idle_inhibitor" "custom/notification" "custom/sep" ];
modules-right = [ "custom/sep" "pulseaudio" "network" "cpu" "memory" "clock" "custom/sep" "custom/power" ];
# ... component configs ...
}
];
style = concatStrings [
''
@define-color bg #1a1b26;
@define-color fg #a9b1d6;
* { font-family: "JetBrainsMono Nerd Font", monospace; font-size: 16px; font-weight: bold; }
window#waybar { background-color: @bg; color: @fg; }
#workspaces button { padding: 0 6px; color: @cyn; }
#clock { color: @cyn; border-bottom: 4px solid @cyn; }
#pulseaudio { color: @blu; border-bottom: 4px solid @blu; }
#idle_inhibitor.activated { color: @grn; border-bottom: 4px solid @grn; }
''
];
};
```
Puntos clave:
- El layout se controla con modules-left, modules-center y modules-right.
- La configuración de cada módulo (p. ej., hyprland/workspaces, pulseaudio) va en el mismo objeto.
- El CSS controla tipografías, tamaños, colores, bordes y espaciado.
- scriptsDir = ./scripts relativo al archivo; se instalan en ~/.config/waybar/scripts y se marcan como ejecutables.
## Añadir tu propio Waybar (paso a paso)
1) Copia un módulo como base:
```bash path=null start=null
cp modules/home/waybar/waybar-simple.nix modules/home/waybar/my-waybar.nix
```
2) (Opcional) Añade scripts auxiliares en modules/home/waybar/scripts/.
3) Apunta variables.nix a tu módulo:
```nix path=/home/dwilliams/ZaneyOS/hosts/default/variables.nix start=81
#waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix;
waybarChoice = ../../modules/home/waybar/waybar-tony.nix;
#waybarChoice = ../../modules/home/waybar/waybar-ddubs-2.nix;
```
Cámbialo a:
```nix path=null start=null
waybarChoice = ../../modules/home/waybar/my-waybar.nix;
```
4) Prepara los archivos antes de reconstruir (crítico):
```bash path=null start=null
git add modules/home/waybar/my-waybar.nix modules/home/waybar/scripts/*
```
5) Reconstruye como siempre.
## Ejemplos de personalización
1) Cambiar tipografía y tamaño (CSS)
```css path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-tony.nix start=207
* {
font-family: "JetBrainsMono Nerd Font", monospace;
font-size: 16px;
font-weight: bold;
}
```
2) Mover widgets izquierda/centro/derecha
```nix path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-simple.nix start=28
modules-center = [ "hyprland/workspaces" ];
modules-left = [ "custom/startmenu" "custom/arrow6" "pulseaudio" "cpu" "memory" "idle_inhibitor" "custom/arrow7" "hyprland/window" ];
modules-right = [ "custom/arrow4" "custom/hyprbindings" "custom/arrow3" "custom/notification" "custom/arrow3" "custom/power" "battery" "custom/arrow2" "tray" "custom/arrow1" "clock" ];
```
3) Cambiar colores y estilos de botones
```css path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-tony.nix start=218
#workspaces button {
padding: 0 6px;
color: @cyn;
background: transparent;
border-bottom: 3px solid @bg;
}
#workspaces button.active {
color: @cyn;
border-bottom: 3px solid @mag;
}
```
4) Añadir iconos o cambiar etiquetas
```nix path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-ddubs.nix start=104
"pulseaudio" = {
format = "{icon} {volume}% {format_source}";
format-icons = {
headphone = "";
default = [ "" "" "" ];
};
};
```
5) Añadir un widget que ejecute un script
```nix path=null start=null
"custom/mywidget" = {
exec = "~/.config/waybar/scripts/my-widget.sh";
return-type = "json";
interval = 5;
format = "{}";
on-click = "kitty -e my-tool";
};
```
6) Hacer la barra flotante o acoplada
```nix path=null start=null
settings = [
{
layer = "top";
position = "top";
mode = "overlay";
# ...
}
];
```
```css path=null start=null
window#waybar {
background: rgba(0, 0, 0, 0.6);
margin: 6px 10px;
border-radius: 12px;
}
```
## Dónde guardar scripts usados por widgets
```nix path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-ddubs.nix start=14
home.file = builtins.listToAttrs (map (name: {
name = ".config/waybar/scripts/" + name;
value = { source = "${scriptsDir}/${name}"; executable = true; };
}) scripts);
```
Copia todo desde ./scripts a ~/.config/waybar/scripts y marca ejecutable.
## Solución de problemas
- Fallo de ruta: asegúrate de hacer git add de los archivos nuevos.
- Nombre incorrecto en variables.nix: usa exactamente el nombre real.
- Iconos faltan: instala una Nerd Font (p. ej., JetBrainsMono Nerd Font) y selecciónala en CSS.
- Widgets faltan: confírmalos en modules-left/center/right y su bloque de config.
## Receta rápida
1) Crea modules/home/waybar/my-waybar.nix (copia uno y edítalo)
2) Añade scripts en modules/home/waybar/scripts/
3) En variables.nix:
```nix path=null start=null
waybarChoice = ../../modules/home/waybar/my-waybar.nix;
```
4) git add de los archivos
5) Reconstruye.

View file

@ -0,0 +1,254 @@
# How to theme or add Waybars in ZaneyOS
This guide shows how ZaneyOS selects and configures Waybar, how to add your own Waybar module, and how to customize fonts, sizes, colors, icons, widgets, and layout. It also calls out where to put scripts and a critical note about git add to avoid rebuild failures.
## Current Waybar modules available
Saved in modules/home/waybar/:
- waybar-tony.nix
- waybar-ddubs.nix
- waybar-ddubsos-v1.nix
- waybar-dwm.nix
- waybar-curved.nix
- waybar-simple.nix
- waybar-ddubs-2.nix
- waybar-mecha.nix
- waybar-dwm2.nix
- waybar-nekodyke.nix
- Jerry-waybar.nix
- waybar-TheBlackDon.nix
## Where you select your Waybar
Select the Waybar module in hosts/default/variables.nix via waybarChoice. Example (actual excerpt):
```nix path=/home/dwilliams/ZaneyOS/hosts/default/variables.nix start=73
# Set Waybar
# Includes alternates such as:
# Comment out the current choice and uncomment the one you want
#waybarChoice = ../../modules/home/waybar/waybar-curved.nix;
#waybarChoice = ../../modules/home/waybar/Jerry-waybars.nix;
#waybarChoice = ../../modules/home/waybar/waybar-simple.nix;
#waybarChoice = ../../modules/home/waybar/waybar-mecha.nix;
#waybarChoice = ../../modules/home/waybar/waybar-nekodyke.nix;
#waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix;
waybarChoice = ../../modules/home/waybar/waybar-tony.nix;
#waybarChoice = ../../modules/home/waybar/waybar-ddubs-2.nix;
```
Notes:
- Ensure the file path matches an actual file name under modules/home/waybar/. For example, the list includes Jerry-waybar.nix (singular), but the commented example shows Jerry-waybars.nix (plural). Use the actual filename to avoid build errors.
## CRITICAL: git add or rebuild will fail
When you add a new Waybar file or any scripts it uses, you must stage them in git before rebuilding, or Nix will not see those paths and the build will fail.
- Example:
```bash path=null start=null
# Add your new module and scripts
git add modules/home/waybar/my-waybar.nix modules/home/waybar/scripts/my-widget.sh
# Commit (optional but recommended)
git commit -m "Add my Waybar module and widget script"
```
## How Waybar modules are structured here
Most Waybar modules follow this pattern:
- They expose a Home Manager module that sets programs.waybar.settings (JSON-like config) and programs.waybar.style (CSS).
- They also copy any helper scripts to ~/.config/waybar/scripts via a shared scripts directory.
Example: waybar-tony.nix copies scripts and sets Waybar config and CSS:
```nix path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-tony.nix start=15
# Configure & Theme Waybar (Tony)
home.file = builtins.listToAttrs (map
(name: {
name = ".config/waybar/scripts/" + name;
value = {
source = "${scriptsDir}/${name}";
executable = true;
};
})
scripts);
programs.waybar = {
enable = true;
package = pkgs.waybar;
settings = [
{
layer = "top";
position = "top";
height = 30;
spacing = 4;
modules-left = [
"custom/startmenu" "hyprland/workspaces" "custom/sep" "tray" "custom/sep" "hyprland/window" "custom/sep"
];
modules-center = [ "custom/sep" "idle_inhibitor" "custom/notification" "custom/sep" ];
modules-right = [ "custom/sep" "pulseaudio" "network" "cpu" "memory" "clock" "custom/sep" "custom/power" ];
# ... component configs ...
}
];
style = concatStrings [
''
@define-color bg #1a1b26;
@define-color fg #a9b1d6;
* { font-family: "JetBrainsMono Nerd Font", monospace; font-size: 16px; font-weight: bold; }
window#waybar { background-color: @bg; color: @fg; }
#workspaces button { padding: 0 6px; color: @cyn; }
#clock { color: @cyn; border-bottom: 4px solid @cyn; }
#pulseaudio { color: @blu; border-bottom: 4px solid @blu; }
#idle_inhibitor.activated { color: @grn; border-bottom: 4px solid @grn; }
''
];
};
```
Key takeaways:
- Layout is controlled by modules-left, modules-center, and modules-right arrays.
- Individual module settings (e.g., hyprland/workspaces, pulseaudio) are configured under the same top-level object.
- CSS controls fonts, sizes, colors, borders, and spacing.
- scriptsDir = ./scripts relative to the module file; any files inside that directory are installed into ~/.config/waybar/scripts and made executable.
## Add your own Waybar module (step-by-step)
1) Copy an existing module as a starting point, e.g.:
```bash path=null start=null
cp modules/home/waybar/waybar-simple.nix modules/home/waybar/my-waybar.nix
```
2) (Optional) Add any helper scripts your widgets will use into modules/home/waybar/scripts/ (they will be installed to ~/.config/waybar/scripts automatically by modules using scriptsDir = ./scripts).
3) Point variables.nix to your new module:
```nix path=/home/dwilliams/ZaneyOS/hosts/default/variables.nix start=81
#waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix;
waybarChoice = ../../modules/home/waybar/waybar-tony.nix;
#waybarChoice = ../../modules/home/waybar/waybar-ddubs-2.nix;
```
Change the active line to:
```nix path=null start=null
waybarChoice = ../../modules/home/waybar/my-waybar.nix;
```
4) Stage your files before rebuilding (critical):
```bash path=null start=null
git add modules/home/waybar/my-waybar.nix modules/home/waybar/scripts/*
```
5) Rebuild as you normally do for ZaneyOS.
## Customization examples
Below are quick edits you can make, demonstrated using existing modules.
1) Change font family and size (CSS)
- In waybar-tony.nix:
```css path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-tony.nix start=207
* {
font-family: "JetBrainsMono Nerd Font", monospace;
font-size: 16px;
font-weight: bold;
}
```
Change font-family and font-size to your preference.
2) Move widgets left/center/right
- In any module, edit modules-left, modules-center, modules-right arrays. For example in waybar-simple.nix:
```nix path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-simple.nix start=28
modules-center = [ "hyprland/workspaces" ];
modules-left = [ "custom/startmenu" "custom/arrow6" "pulseaudio" "cpu" "memory" "idle_inhibitor" "custom/arrow7" "hyprland/window" ];
modules-right = [ "custom/arrow4" "custom/hyprbindings" "custom/arrow3" "custom/notification" "custom/arrow3" "custom/power" "battery" "custom/arrow2" "tray" "custom/arrow1" "clock" ];
```
Just reorder or move entries between arrays to place widgets where you want.
3) Change colors and button styles
- In waybar-tony.nix, CSS color variables and workspace button styling:
```css path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-tony.nix start=218
#workspaces button {
padding: 0 6px;
color: @cyn;
background: transparent;
border-bottom: 3px solid @bg;
}
#workspaces button.active {
color: @cyn;
border-bottom: 3px solid @mag;
}
```
Adjust colors (e.g., @cyn, @mag) or borders as desired. You can also define your own @define-color variables at the top of the CSS block.
4) Add icons or change labels
- Many modules set format and format-icons. Example (pulseaudio) in waybar-ddubs.nix:
```nix path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-ddubs.nix start=104
"pulseaudio" = {
format = "{icon} {volume}% {format_source}";
format-icons = {
headphone = "";
default = [ "" "" "" ];
};
};
```
Replace icons with Nerd Font glyphs you prefer.
5) Add a new widget that runs a script
- Waybar custom modules can execute scripts and display the output. Put your script in modules/home/waybar/scripts/ and configure a custom module:
```nix path=null start=null
"custom/mywidget" = {
exec = "~/.config/waybar/scripts/my-widget.sh";
return-type = "json"; # or "text" depending on your script
interval = 5; # seconds
format = "{}"; # how to render the output
on-click = "kitty -e my-tool";
};
```
- Scripts placed in modules/home/waybar/scripts/ are installed to ~/.config/waybar/scripts and marked executable by modules that include the home.file mapping.
6) Make the bar floating or docked
- Waybar supports a mode field; CSS margins/transparency give a floating look:
```nix path=null start=null
settings = [
{
layer = "top";
position = "top";
mode = "overlay"; # overlay (floats), or "dock" (reserves space), or "invisible"
# ...
}
];
```
- CSS for floating effect:
```css path=null start=null
window#waybar {
background: rgba(0, 0, 0, 0.6);
margin: 6px 10px; /* space from screen edges */
border-radius: 12px;
}
```
7) Known Waybar modules you’ll see in ZaneyOS configs
- Hyprland modules: hyprland/workspaces, hyprland/window, wlr/taskbar (wlroots taskbar)
- System modules: clock, tray, cpu, memory, network, disk, battery, bluetooth, backlight, idle_inhibitor, mpris, temperature, pulseaudio
- Custom modules: custom/* (e.g., custom/power, custom/notification, custom/startmenu, etc.)
## Where to store scripts that widgets call
- Place scripts under modules/home/waybar/scripts/.
- Many Waybar modules here include:
```nix path=/home/dwilliams/ZaneyOS/modules/home/waybar/waybar-ddubs.nix start=14
home.file = builtins.listToAttrs (map (name: {
name = ".config/waybar/scripts/" + name;
value = { source = "${scriptsDir}/${name}"; executable = true; };
}) scripts);
```
This copies all files from ./scripts (next to the module file) to ~/.config/waybar/scripts and makes them executable, so your Waybar configuration can reference them as ~/.config/waybar/scripts/<script>.
## Troubleshooting
- Build fails with a path error: make sure any new .nix files and scripts are tracked in git (git add). Nix requires the files to be present in the store; untracked files referenced in the config will cause errors.
- Wrong filename in variables.nix: ensure the chosen waybarChoice path exactly matches an existing file.
- Icons not showing: verify you have a Nerd Font installed (e.g., JetBrainsMono Nerd Font) and selected in CSS.
- Widgets missing: confirm the widget is listed in modules-left/center/right arrays and that its settings block exists.
## Quick recipe: add and use a new Waybar
1) Create modules/home/waybar/my-waybar.nix (copy an existing one and edit).
2) If needed, drop helper scripts into modules/home/waybar/scripts/.
3) Update hosts/default/variables.nix:
```nix path=null start=null
waybarChoice = ../../modules/home/waybar/my-waybar.nix;
```
4) Stage files before rebuilding:
```bash path=null start=null
git add modules/home/waybar/my-waybar.nix modules/home/waybar/scripts/*
```
5) Rebuild.

View file

@ -0,0 +1,171 @@
# Guía para personalizar Hyprland en ZaneyOS
Esta guía ofrece una visión detallada de cómo personalizar tu experiencia con Hyprland en ZaneyOS. Veremos los archivos de configuración más importantes, qué hacen y cómo puedes editarlos.
**Aviso:** Los archivos están escritos en el lenguaje Nix. La sintaxis es estricta y cualquier error puede impedir que tu sistema se reconstruya. Edita con cuidado y sigue los ejemplos.
## Aplicar cambios
Tras editar, aplica los cambios desde una terminal:
```bash path=null start=null
zcli rebuild
```
Esto reconstruirá el sistema con tu configuración. Si hay errores, el comando fallará.
---
### `binds.nix` - Atajos de teclado
Controla atajos de teclado y ratón en Hyprland.
**Ubicación:** `modules/home/hyprland/binds.nix`
Formato: cadena con valores separados por comas: `MODIFICADOR, TECLA, ACCIÓN, VALOR`.
**Ejemplo:** Cambiar el atajo para abrir la terminal de `SUPER + Return` a `SUPER + T`.
```nix path=null start=null
# ...
bind = [
# ...
"$modifier,T,exec, ${terminal}"
# ...
];
# ...
```
---
### `exec-once.nix` - Aplicaciones al inicio
Lista de aplicaciones/comandos que se lanzan al iniciar Hyprland.
**Ubicación:** `modules/home/hyprland/exec-once.nix`
**Ejemplo:** Añadir `copyq` para que arranque siempre.
```nix path=null start=null
# ...
exec-once = [
# ...
"pypr &" # pyprland para terminal desplegable SUPERSHIFT + T
"copyq"
];
# ...
```
---
### `decoration.nix` - Decoración de ventanas
Controla bordes, sombras y desenfoque.
**Ubicación:** `modules/home/hyprland/decoration.nix`
**Ejemplo:** Aumentar el redondeo de esquinas a `10`.
```nix path=null start=null
# ...
decoration = {
rounding = 10;
# ...
```
---
### `env.nix` - Variables de entorno
Variables de entorno para la sesión.
**Ubicación:** `modules/home/hyprland/env.nix`
**Ejemplo:** Forzar Firefox en Wayland.
```nix path=null start=null
# ...
env = [
# ...
"SDL_VIDEODRIVER, wayland"
"MOZ_ENABLE_WAYLAND, 1"
# ...
];
# ...
```
---
### `gestures.nix` - Gestos del touchpad
Control de gestos (p. ej., cambio de espacios de trabajo).
**Ubicación:** `modules/home/hyprland/gestures.nix`
**Ejemplo:** Deshabilitar el swipe de espacios:
```nix path=null start=null
# ...
gestures = {
workspace_swipe = 0;
# ...
```
---
### `misc.nix` - Miscelánea
Ajustes varios.
**Ubicación:** `modules/home/hyprland/misc.nix`
**Ejemplo:** Activar VRR (Variable Refresh Rate).
```nix path=null start=null
# ...
misc = {
# ...
vrr = 1;
# ...
};
# ...
```
---
### `hyprland.nix` - Configuración principal
Ajustes generales, dispositivos de entrada y layout.
**Ubicación:** `modules/home/hyprland/hyprland.nix`
**Ejemplo:** Cambiar la distribución de teclado a `us`.
```nix path=null start=null
# ...
input = {
kb_layout = "us";
# ...
```
---
### `windowrules.nix` - Reglas de ventanas
Define comportamientos por aplicación (flotante, workspace, opacidad, etc.).
**Ubicación:** `modules/home/hyprland/windowrules.nix`
**Ejemplo:** Hacer que Thunar siempre flote.
```nix path=null start=null
# ...
windowrule = [
# ...
"float, class:^(foot-floating)$"
"float, class:^(Thunar)$"
# ...
];
# ...
```

View file

@ -0,0 +1,302 @@
# A Guide to Customizing Hyprland in ZaneyOS
This guide provides a more detailed look at how to customize your Hyprland experience in ZaneyOS. We'll go through the most important configuration files, explaining what they do and how you can edit them.
**A Word of Caution:** The configuration files are written in the Nix language. Nix has a very specific syntax, and any mistakes can prevent your system from building successfully. Always be careful when editing these files, and make sure to follow the examples closely.
## Applying Your Changes
After making any changes to these files, you'll need to apply them. Open a terminal and run:
```bash
zcli rebuild
```
This command will rebuild your system with the new configuration. If there are any errors in your configuration, this command will fail.
---
### `binds.nix` - Keybindings
This file controls all of your keyboard and mouse shortcuts in Hyprland.
**Location:** `modules/home/hyprland/binds.nix`
You can change existing keybindings or add new ones. The format is a string with comma-separated values: `MODIFIER, KEY, DISPATCHER, VALUE`.
**Example:**
Let's say you want to change the keybinding for opening a terminal from `SUPER + Return` to `SUPER + T`.
**Original:**
```nix
# ...
bind = [
# ...
"$modifier,Return,exec, ${terminal}"
# ...
];
# ...
```
**Modified:**
```nix
# ...
bind = [
# ...
"$modifier,T,exec, ${terminal}"
# ...
];
# ...
```
---
### `exec-once.nix` - Startup Applications
This file lists the applications and commands that run automatically when you start Hyprland.
**Location:** `modules/home/hyprland/exec-once.nix`
You can add or remove commands from this list. Each command is a string.
**Example:**
If you want to start the `copyq` application every time you log in, you can add it to the list.
**Original:**
```nix
# ...
exec-once = [
# ...
"pypr &" # pyprland for drop down term SUPERSHIFT + T
];
# ...
```
**Modified:**
```nix
# ...
exec-once = [
# ...
"pypr &" # pyprland for drop down term SUPERSHIFT + T
"copyq"
];
# ...
```
---
### `decoration.nix` - Window Decorations
This file controls the appearance of window borders, shadows, and blur effects.
**Location:** `modules/home/hyprland/decoration.nix`
You can change values like `rounding` for rounded corners, or adjust the `blur` and `shadow` settings.
**Example:**
To increase the rounding of window corners from `0` to `10`.
**Original:**
```nix
# ...
decoration = {
rounding = 0;
# ...
```
**Modified:**
```nix
# ...
decoration = {
rounding = 10;
# ...
```
---
### `env.nix` - Environment Variables
This file sets environment variables for your Hyprland session. These can affect how applications behave.
**Location:** `modules/home/hyprland/env.nix`
You can add or change environment variables in this list.
**Example:**
To set the `MOZ_ENABLE_WAYLAND` variable to `1`, which forces Firefox to run in Wayland mode.
**Original:**
```nix
# ...
env = [
# ...
"SDL_VIDEODRIVER, wayland"
# ...
];
# ...
```
**Modified:**
```nix
# ...
env = [
# ...
"SDL_VIDEODRIVER, wayland"
"MOZ_ENABLE_WAYLAND, 1"
# ...
];
# ...
```
---
### `gestures.nix` - Touchpad Gestures
This file controls touchpad gestures, like swiping between workspaces.
**Location:** `modules/home/hyprland/gestures.nix`
You can enable or disable gestures and change their behavior.
**Example:**
To disable workspace swiping.
**Original:**
```nix
# ...
gestures = {
workspace_swipe = 1;
# ...
```
**Modified:**
```nix
# ...
gestures = {
workspace_swipe = 0;
# ...
```
---
### `misc.nix` - Miscellaneous Settings
This file contains various settings that don't fit into the other categories.
**Location:** `modules/home/hyprland/misc.nix`
You can change settings like `vrr` (Variable Refresh Rate) or `disable_hyprland_logo`.
**Example:**
To enable Variable Refresh Rate.
**Original:**
```nix
# ...
misc = {
# ...
vrr = 0;
# ...
};
# ...
```
**Modified:**
```nix
# ...
misc = {
# ...
vrr = 1;
# ...
};
# ...
```
---
### `hyprland.nix` - Main Configuration
This is the main Hyprland configuration file. It sets up general settings, input devices, and the window layout.
**Location:** `modules/home/hyprland/hyprland.nix`
You can change things like the keyboard layout, touchpad settings, and the layout engine.
**Example:**
To change the keyboard layout from the default to `us`.
**Original:**
```nix
# ...
input = {
kb_layout = "${keyboardLayout}";
# ...
```
**Modified:**
```nix
# ...
input = {
kb_layout = "us";
# ...
```
---
### `windowrules.nix` - Window Rules
This file defines rules for how specific windows should behave. You can make certain applications always float, open on a specific workspace, or have a certain opacity.
**Location:** `modules/home/hyprland/windowrules.nix`
You can add new rules to the `windowrule` list.
**Example:**
To make the `thunar` file manager always float.
**Original:**
```nix
# ...
windowrule = [
# ...
"float, class:^(foot-floating)$"
# ...
];
# ...
```
**Modified:**
```nix
# ...
windowrule = [
# ...
"float, class:^(foot-floating)$"
"float, class:^(Thunar)$"
# ...
];
# ...
```

View file

@ -0,0 +1,106 @@
[English](./hyprland.binds.cheatsheet.md) | Español
# Atajos de Teclado de Hyprland — ZaneyOS
## 🗝️ Convenciones
- SUPERKEY = Tecla Mod (en Hyprland `$modifier`)
- SHIFT, CTRL, ALT se usan como se muestra
- Flechas y hjkl están soportados para movimiento
---
## 🚀 Lanzadores y Vista General
- SUPERKEY+CTRL+D — Alternar Dock
- ALT+Space — Vista general de espacios
- SUPERKEY+A — Vista general de aplicaciones
- SUPERKEY+R — Menú Rofi (legacy)
- SUPERKEY+D — Menú Rofi
## 🖥️ Terminales
- SUPERKEY+Return — Terminal
- SUPERKEY+SHIFT+Return — Terminal Foot (flotante)
- SUPERKEY+ALT+Return — WezTerm
- SUPERKEY+CTRL+Return — Ghostty
- SUPERKEY+SHIFT+T — Terminal en bandeja (scratchpad)
## ✍️ Editores e IDEs
- ALT+E — Emacs flotante
- SUPERKEY+E — Emacs
- SUPERKEY+G — VS Code
## 🌐 Web y Comunicación
- SUPERKEY+W — Navegador web
- SUPERKEY+ALT+D — Discord Canary
## 📁 Gestión de Archivos
- SUPERKEY+T — Thunar
- SUPERKEY+Y — Yazi
## 🛠️ Utilidades del Sistema
- SUPERKEY+V — Historial del portapapeles
- SUPERKEY+N — Nota desde portapapeles
- SUPERKEY+C — Selector de color
- SUPERKEY+S — Captura de pantalla
- SUPERKEY+SHIFT+S — Captura Satty
- ALT+SHIFT+S — Captura de región
- SUPERKEY+O — OBS Studio
- SUPERKEY+M — Control de audio
- SUPERKEY+SHIFT+E — Selector de emojis
## ⚙️ Ajustes y Sistema
- SUPERKEY+ALT+S — Diálogo de configuración
- SUPERKEY+SHIFT+N — Reiniciar notificaciones
- SUPERKEY+SHIFT+P — Menú de energía
- SUPERKEY+SHIFT+W — Aplicar fondos
- SUPERKEY+ALT+W — Warp Build
- ALT+SHIFT+Q — Menú de cierre de sesión
## 📖 Documentación y Ayuda
- SUPERKEY+SHIFT+K — Ayuda de atajos
- SUPERKEY+SHIFT+C — Chuletas (cheatsheets)
- SUPERKEY+SHIFT+D — Documentación
## 🪟 Gestión de Ventanas
- SUPERKEY+SHIFT+G — Alternar huecos inteligentes
- SUPERKEY+Q — Cerrar ventana activa
- SUPERKEY+F — Alternar pantalla completa
- SUPERKEY+ALT+F — Maximizar (mantiene barras)
- SUPERKEY+SHIFT+F — Alternar flotante
- SUPERKEY+Space — Alternar flotante
- SUPERKEY+SHIFT+Space — Todo flotante en espacio
- SUPERKEY+P — Pseudo mosaico
- SUPERKEY+SHIFT+M — Intercambiar diseño
- SUPERKEY+SHIFT+I — Alternar división
### Mover Ventana
- SUPERKEY+SHIFT+Izquierda/Derecha/Arriba/Abajo — Mover ventana Izquierda/Derecha/Arriba/Abajo
- SUPERKEY+SHIFT+H/J/K/L — Mover ventana Izquierda/Derecha/Arriba/Abajo
### Intercambiar Ventana
- SUPERKEY+ALT+Izquierda/Derecha/Arriba/Abajo — Intercambiar ventana Izquierda/Derecha/Arriba/Abajo
- SUPERKEY+ALT+43/46/45/44 — Intercambiar ventana Izquierda/Derecha/Arriba/Abajo
### Movimiento de Foco
- SUPERKEY+Izquierda/Derecha/Arriba/Abajo — Foco Izquierda/Derecha/Arriba/Abajo
- SUPERKEY+H/J/K/L — Foco Izquierda/Derecha/Arriba/Abajo
### Ciclar Ventanas
- ALT+Tab — Siguiente ventana
- ALT+Tab — Traer activa al frente
## 🗂️ Espacios de Trabajo
- SUPERKEY+1..9,0 — Espacio 1..10
- SUPERKEY+SHIFT+1..9,0 — Mover a espacio 1..10
- SUPERKEY+CTRL+Derecha/Izquierda — Espacio siguiente/anterior
- SUPERKEY+Rueda Abajo/Arriba — Espacio siguiente/anterior
## 🔊 Multimedia y Brillo
- XF86AudioRaiseVolume — Subir volumen
- XF86AudioLowerVolume — Bajar volumen
- XF86AudioMute — Alternar silencio
- XF86AudioPlay/Pause — Reproducir/Pausar
- XF86AudioNext/Prev — Siguiente/Anterior pista
- XF86MonBrightnessDown/Up — Bajar/Subir brillo
## 🖱️ Atajos de Ratón
- SUPERKEY + Botón Izquierdo — Mover ventana
- SUPERKEY + Botón Derecho — Redimensionar ventana

View file

@ -1,5 +1,6 @@
# Hyprland Keybindings — ddubsOS
English | [Español](./hyprland.binds.cheatsheet.es.md)
# Hyprland Keybindings — ZaneyOS
## 🗝️ Conventions
- SUPERKEY = Mod key (Hyprland `$modifier`)
- SHIFT, CTRL, ALT used as shown
@ -7,83 +8,98 @@
---
## 🚀 Applications
- SUPERKEY+Return — Launch default terminal (${terminal})
- SUPERKEY+SHIFT+Return — Launch foot (floating)
- SUPERKEY+ALT+Return — Launch WezTerm
- SUPERKEY+CTRL+Return — Launch Ghostty
- SUPERKEY+W — Launch browser (${browser})
- SUPERKEY+Y — Kitty running Yazi (file manager)
- SUPERKEY+T — Thunar (also another mapping present: "exec, exec, thunar")
- SUPERKEY+M — Pavucontrol (audio)
## 🚀 Launchers & Overview
- SUPERKEY+CTRL+D — Toggle Dock
- ALT+Space — Workspace Overview
- SUPERKEY+A — App Overview
- SUPERKEY+R — Rofi Legacy Menu
- SUPERKEY+D — Rofi Menu
## 🖥️ Terminals
- SUPERKEY+Return — Terminal
- SUPERKEY+SHIFT+Return — Foot Terminal (Floating)
- SUPERKEY+ALT+Return — WezTerm
- SUPERKEY+CTRL+Return — Ghostty
- SUPERKEY+SHIFT+T — Scratchpad Terminal
## ✍️ Editors & IDEs
- ALT+E — Emacs Floating
- SUPERKEY+E — Emacs
- SUPERKEY+G — VS Code
- SUPERKEY+O — OBS Studio
- SUPERKEY+E — Emoji picker (emopicker9000)
- SUPERKEY+V — Clipboard menu (cliphist via rofi)
- SUPERKEY+D — Rofi menu
- SUPERKEY+SHIFT+D — Dock
- SUPERKEY+CTRL+D — Sherlock (alt menu)
- SUPERKEY+SHIFT+W — Web search
- SUPERKEY+ALT+W — Warp terminal (commented alternative: wallsetter)
- SUPERKEY+CTRL+W — Waypaper
- SUPERKEY+N — Note from clipboard
- SUPERKEY+SHIFT+N — SwayNC reset
## 🌐 Web & Communication
- SUPERKEY+W — Web Browser
- SUPERKEY+ALT+D — Discord Canary
- SUPERKEY+C — Hyprpicker (color picker)
- SHIFT+ALT+S — Hyprshot region (non-SUPER shortcut)
## 🧭 Hyprland UI/Plugins
- SUPERKEY+TAB — Hyprspace Overview toggle (all)
- SUPERKEY+SHIFT+TAB — Hyprspace Overview close (all)
- ALT+Space — Hyprexpo toggle
- SUPERKEY+A — AGS Overview toggle
## 📁 File Management
- SUPERKEY+T — Thunar
- SUPERKEY+Y — Yazi
## 📸 Screenshots
- SUPERKEY+S — screenshootin
- SUPERKEY+SHIFT+S — screenshootin-satty
- SUPERKEY+ALT+S — hyprpanel toggleWindow settings-dialog
## 🛠️ System Utilities
- SUPERKEY+V — Clipboard History
- SUPERKEY+N — Create Note From Clipboard
- SUPERKEY+C — Color Picker
- SUPERKEY+S — Screenshot
- SUPERKEY+SHIFT+S — Screenshot Satty
- ALT+SHIFT+S — Screenshot Region
- SUPERKEY+O — OBS Studio
- SUPERKEY+M — Audio Control
- SUPERKEY+SHIFT+E — Emoji Picker
## ⚙️ Settings & System
- SUPERKEY+ALT+S — Settings Dialog
- SUPERKEY+SHIFT+N — Notifications Reset
- SUPERKEY+SHIFT+P — Power Menu
- SUPERKEY+SHIFT+W — Apply Wallpapers
- SUPERKEY+ALT+W — Warp Build
- ALT+SHIFT+Q — Logout Menu
## 📖 Docs & Help
- SUPERKEY+SHIFT+K — Keybinds Help
- SUPERKEY+SHIFT+C — Cheatsheets
- SUPERKEY+SHIFT+D — Docs
## 🪟 Window Management
- SUPERKEY+Q — Kill active window
- SUPERKEY+P — Pseudo tile
- SUPERKEY+SHIFT+I — Toggle split
- SUPERKEY+F — Fullscreen
- SUPERKEY+SHIFT+F — Toggle floating
- SUPERKEY+ALT+F — Workspace option: allfloat
- SUPERKEY+SHIFT+C — Exit Hyprland
- SUPERKEY+SPACE — Toggle floating
- SUPERKEY+SHIFT+SPACE — Workspace option: allfloat
- SUPERKEY+SHIFT+M — swap_layout
- SUPERKEY+SHIFT+G — Smart Gaps Toggle
- SUPERKEY+Q — Kill Active Window
- SUPERKEY+F — Toggle Fullscreen
- SUPERKEY+ALT+F — Maximize (keep bars)
- SUPERKEY+SHIFT+F — Toggle Floating
- SUPERKEY+Space — Toggle Floating
- SUPERKEY+SHIFT+Space — Workspace All Float
- SUPERKEY+P — Pseudo Tile
- SUPERKEY+SHIFT+M — Swap Layout
- SUPERKEY+SHIFT+I — Toggle Split
### Move Window
- SUPERKEY+SHIFT+Left/Right/Up/Down — Move window L/R/U/D
- SUPERKEY+SHIFT+H/J/K/L — Move window L/D/U/R
- SUPERKEY+SHIFT+Left/Right/Up/Down — Move Window Left/Right/Up/Down
- SUPERKEY+SHIFT+H/J/K/L — Move Window Left/Right/Up/Down
### Swap Window
- SUPERKEY+ALT+Left/Right/Up/Down — Swap window L/R/U/D
- SUPERKEY+ALT+[, . , - , ,] — Swap window L/R/U/D (keycodes 43,46,45,44)
- SUPERKEY+ALT+Left/Right/Up/Down — Swap Window Left/Right/Up/Down
- SUPERKEY+ALT+43/46/45/44 — Swap Window Left/Right/Up/Down
### Focus Movement
- SUPERKEY+Left/Right/Up/Down — Focus L/R/U/D
- SUPERKEY+H/J/K/L — Focus L/D/U/R
- SUPERKEY+Left/Right/Up/Down — Focus Left/Right/Up/Down
- SUPERKEY+H/J/K/L — Focus Left/Right/Up/Down
### Workspace Navigation
- SUPERKEY+1..9,0 — Go to workspace 1..10
- SUPERKEY+SHIFT+1..9,0 — Move window to workspace 1..10
- SUPERKEY+CTRL+Right/Left — Next/Previous workspace (relative)
- SUPERKEY+Mouse Wheel Down/Up — Workspace e+1 / e-1
### Window Cycling
- ALT+Tab — Cycle Next Window
- ALT+Tab — Bring Active To Top
### Alt-Tab
- ALT+Tab — Cycle next
- ALT+Tab — Bring active to top (runs twice to ensure raise)
## 🗂️ Workspaces
- SUPERKEY+1..9,0 — Workspace 1..10
- SUPERKEY+SHIFT+1..9,0 — Move To Workspace 1..10
- SUPERKEY+CTRL+Right/Left — Next/Previous Workspace
- SUPERKEY+Mouse Wheel Down/Up — Next/Previous Workspace
## 🔊 Media & Brightness
- XF86AudioRaiseVolume — wpctl set-volume +5%
- XF86AudioLowerVolume — wpctl set-volume -5%
- XF86AudioMute — toggle sink mute
- XF86AudioPlay/Pause — playerctl play-pause
- XF86AudioNext/Prev — playerctl next/previous
- XF86MonBrightnessDown/Up — brightnessctl -5% / +5%
- XF86AudioRaiseVolume — Volume Up
- XF86AudioLowerVolume — Volume Down
- XF86AudioMute — Mute Toggle
- XF86AudioPlay/Pause — Play/Pause
- XF86AudioNext/Prev — Next/Previous Track
- XF86MonBrightnessDown/Up — Brightness Down/Up
## 🖱️ Mouse Bindings
- SUPERKEY + Left Mouse — Move window

View file

@ -0,0 +1,59 @@
[English](./hyprland.windowrules.cheatsheet.md) | Español
# Reglas de Ventana de Hyprland — ZaneyOS
## 🧩 Etiquetas y Clasificación
- file-manager — Thunar, Nautilus, PCManFM-Qt
- terminal — Ghostty, WezTerm, Alacritty, Kitty, kitty-dropterm
- browser — Brave, Firefox, Chrome, Thorium/Cachy
- video — VLC, mpv, Clapper
- projects — VSCodium/VSCode
- im — Discord, WebCord, Vesktop, Ferdium, WhatsApp, Telegram, Teams
- obs — OBS Studio
- games — gamescope, steam_app_*
- gamestore — Steam, Lutris, Heroic
- settings — varias aplicaciones de configuración (nm-applet, pavucontrol, file-roller, rofi, etc.)
## 🪟 Flotante, Tamaño y Posición
- foot-floating — flotante, tamaño 60% x 60%, centrado
- Picture-in-Picture — flotante, opacidad 95%/75%, fijado, mantener relación de aspecto, posición en ~72%/7%
- Diálogos de Autenticación Requerida — flotante, centrado
- Ventanas etiquetadas como Settings — flotante, tamaño 70% x 70%
- Ferdium — flotante, centrado, tamaño 60% x 70%
- Clapper — flotante
- Diálogos de configuración de VSCodium — flotante (reglas negativas de título)
- Diálogos no principales de Steam/Heroic — flotante (reglas negativas de título)
- Diálogos de selección de archivos — flotante; tamaño 70% x 60% (Abrir Archivos); flotante en avisos de guardado
## 🎨 Efectos Visuales
- noblur — juegos
- content none — mpv (prevenir pantalla negra al maximizar)
- Opacidad por etiqueta:
- browser: 1.0 / 1.0
- video: 1.0 / 1.0
- projects: 0.9 / 0.8
- im: 0.94 / 0.86
- file-manager: 0.9 / 0.8
- terminal: 1.0 / 0.8
- settings: 0.8 / 0.7
- Ajustes de opacidad adicionales:
- gedit/GNOME Text Editor/mousepad: 0.8 / 0.7
- seahorse: 0.9 / 0.8
## 🧭 Asignación de Espacio de Trabajo
- im* — espacio de trabajo 3
- browser* — espacio de trabajo 2
- obs* — espacio de trabajo 10
## 🧪 XWayland y Casos Especiales
- Ejemplo de regla específica para xwayland: noblur para la clase “resolve” en xwayland:1
## 🌱 Entorno (establecido a través de Hyprland)
- NIXOS_OZONE_WL=1, NIXPKGS_ALLOW_UNFREE=1
- XDG_CURRENT_DESKTOP=Hyprland, XDG_SESSION_TYPE=wayland, XDG_SESSION_DESKTOP=Hyprland
- GDK_BACKEND=wayland,x11, CLUTTER_BACKEND=wayland
- QT_QPA_PLATFORM=wayland;xcb, QT_WAYLAND_DISABLE_WINDOWDECORATION=1, QT_AUTO_SCREEN_SCALE_FACTOR=1
- SDL_VIDEODRIVER=x11 (explícito)
- MOZ_ENABLE_WAYLAND=1
- AQ_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1
- GDK_SCALE=1, QT_SCALE_FACTOR=1
- EDITOR=nvim

View file

@ -1,5 +1,6 @@
# Hyprland Window Rules — ddubsOS
English | [Español](./hyprland.windowrules.cheatsheet.es.md)
# Hyprland Window Rules — ZaneyOS
## 🧩 Tags and Classification
- file-manager — Thunar, Nautilus, PCManFM-Qt
- terminal — Ghostty, WezTerm, Alacritty, Kitty, kitty-dropterm

View file

@ -0,0 +1,61 @@
[English](./kitty.cheatsheet.md) | Español
# Kitty en ZaneyOS — Resumen y Cheatsheet
## 🚀 Resumen de modules/home/terminals/kitty.nix
- Programa
- Kitty habilitado con el paquete pkgs.kitty
- Integraciones de shell: Zsh, Fish, Bash (modo: habilitado)
- Apariencia y Comportamiento
- Fuente: Maple Mono NF, tamaño 12
- Historial de desplazamiento: 10,000 líneas; líneas mínimas de la rueda: 1; relleno: 4px
- Confirmar cierre: 0 (sin confirmar); campana de audio: deshabilitada; espera para ocultar el ratón: 60
- Rastro del cursor: 1; desvanecimiento de pestaña: 1; estilo de fuente de pestaña activa/inactiva: negrita
- Barra de pestañas: superior, estilo powerline
- Diseños: divisiones habilitadas
- Manejo de URL: abrir con el predeterminado; detectar URL: true; allow_remote_control: true
- Tema (configuración manual de Catppuccin Mocha en extraConfig)
- Primer plano/fondo, selección, cursor, bordes, barra de pestañas y paleta de 16 colores establecidos explícitamente
---
## 🗝️ Cheatsheet de Atajos de Teclado (extraConfig)
Portapapeles
- Ctrl+Shift+V — paste_from_selection
- Shift+Insert — paste_from_selection
Historial de desplazamiento
- Ctrl+Shift+Arriba / k — scroll_line_up
- Ctrl+Shift+Abajo / j — scroll_line_down
- Ctrl+Shift+RePág — scroll_page_up
- Ctrl+Shift+AvPág — scroll_page_down
- Ctrl+Shift+Inicio — scroll_home
- Ctrl+Shift+Fin — scroll_end
- Ctrl+Shift+H — show_scrollback
Ventanas/Pestañas/Diseño
- Alt+N — new_window_with_cwd
- Alt+W — close_window
- Ctrl+Shift+Enter — dividir horizontalmente (hsplit)
- Ctrl+Shift+S — dividir verticalmente (vsplit)
- Ctrl+Shift+] / [ — next_window / previous_window
- Ctrl+Shift+F — move_window_forward
- Ctrl+Shift+B — move_window_backward
- Ctrl+Shift+` — move_window_to_top
- Ctrl+Shift+1..0 — first..tenth_window
- Ctrl+Shift+Derecha/Izquierda — next_tab / previous_tab
- Ctrl+Shift+T — new_tab
- Ctrl+Shift+Q — close_tab
- Ctrl+Shift+L — next_layout
- Ctrl+Shift+. / , — move_tab_forward / move_tab_backward
Tamaño de Fuente
- Ctrl+Shift+Arriba — increase_font_size
- Ctrl+Shift+Abajo — decrease_font_size
- Ctrl+Shift+Retroceso — restore_font_size
Notas
- El esquema de colores está incrustado; el soporte de Stylix está deshabilitado en esta configuración.

View file

@ -1,5 +1,6 @@
# Kitty on ddubsOS — Summary & Cheatsheet
English | [Español](./kitty.cheatsheet.es.md)
# Kitty on ZaneyOS — Summary & Cheatsheet
## 🚀 Summary of modules/home/terminals/kitty.nix
- Program

View file

@ -0,0 +1,34 @@
NixOS, flakes y home-manager funcionan juntos para lograr una configuración del sistema declarativa y reproducible. Forman parte de un cambio de paradigma frente a la administración tradicional (imperativa).
## NixOS
**NixOS** es una distribución Linux construida sobre el **gestor de paquetes Nix**. A diferencia de otras distros donde instalas y configuras software manualmente, NixOS usa un **enfoque declarativo**. Escribes un solo `configuration.nix` que describe el estado completo del sistema (kernel, servicios, programas). Al "construir" y "cambiar" tu config, NixOS crea un sistema nuevo desde cero.
La clave: en lugar de modificar archivos in‑place, NixOS crea una nueva **generación**. Si algo falla, puedes **volver atrás** de forma segura a una generación previa.
## Flakes
Los **flakes** (experimentales pero muy usados) estandarizan la gestión de dependencias. Un flake es un directorio con `flake.nix` y `flake.lock`.
- `flake.nix` declara entradas (versiones de Nixpkgs, repos, etc.) y salidas (config del sistema, devshells). Todo queda **explícito**.
- `flake.lock` fija versiones exactas de todas las entradas (commits). Garantiza **reproducibilidad** bit a bit.
## Home Manager
Mientras NixOS gestiona la config del sistema (`/etc`), **Home Manager** aplica el mismo enfoque declarativo a tu entorno de usuario (`~/.config`). Gestiona shell, programas y otros ajustes de usuario con Nix.
Puede usarse solo o integrado en tu flake NixOS para la misma **reproducibilidad** y **cambios atómicos** del entorno de usuario.
## Por qué los archivos de configuración son de solo lectura
Núcleo del diseño de Nix: garantiza reproducibilidad.
NixOS construye configuraciones en el **Nix Store** (`/nix/store`), que es de solo lectura. Al reconstruir, Nix genera un conjunto nuevo de archivos y lo guarda en un directorio nuevo del Store.
En vez de escribir directamente a `~/.bashrc`, NixOS y Home Manager crean **enlaces simbólicos** desde ubicaciones conocidas hacia el archivo generado del Store.
Ventajas:
1. **Inmutabilidad:** no puedes romper el sistema editando archivos generados.
2. **Reproducibilidad:** la misma fuente genera siempre el mismo resultado.
3. **Actualizaciones/rollbacks atómicos:** cada generación es autocontenida, y cambiar entre ellas es instantáneo.

View file

@ -0,0 +1,64 @@
NixOS, flakes, and home-manager all work together to achieve a declarative and
reproducible system configuration. They are part of a paradigm shift away from
traditional, imperative system administration.
## NixOS
**NixOS** is a Linux distribution built on the **Nix package manager**. Unlike
other distros where you manually install and configure software, NixOS uses a
**declarative approach**. You write a single `configuration.nix` file that
describes the entire state of your system, including the kernel, services, and
installed programs. When you "build" and "switch" your configuration, NixOS
creates a new, complete system from scratch.
This is the key to its power: instead of modifying files in place, NixOS creates
a new "generation" of your system. If an update breaks something, you can
instantly and safely **roll back** to a previous working generation.
## Flakes
**Flakes** are an experimental but widely adopted feature for the Nix package
manager that standardizes and improves dependency management. A flake is
essentially a directory with a `flake.nix` file and a corresponding `flake.lock`
file.
- `flake.nix` declares the inputs (e.g., specific versions of Nixpkgs, other
repositories) and outputs (e.g., your system configuration, development
environments). This makes all dependencies **explicit**.
- `flake.lock` pins the exact versions of all inputs, including the specific Git
commit hashes. This ensures that your configuration is **reproducible** down
to the last byte. No more "it works on my machine" problems because someone
else has a different package version.
## Home Manager
While NixOS manages system-wide configuration (things in `/etc`), **Home
Manager** is a tool that applies the same declarative principles to your
user-specific configuration (your dotfiles in `~/.config`). It lets you manage
your shell, programs, and other user-level settings with Nix.
Home Manager can be used as a standalone tool or, more commonly, integrated into
your NixOS flake. By using it with flakes, you get the same benefits of
reproducibility and atomic updates for your user environment.
## Why Configurations are Read-Only
The concept of read-only configuration files is central to Nix's design and is
the key to its reproducibility.
NixOS builds configurations in a special, read-only directory called the **Nix
Store** (`/nix/store`). When you rebuild your system, Nix generates a new set of
configuration files and stores them in a new directory within the Nix Store.
Instead of writing directly to a configuration file like `~/.bashrc`, NixOS and
Home Manager create **symbolic links** from the expected location (e.g.,
`~/.bashrc`) to the generated, read-only file in the Nix Store.
This approach guarantees that:
1. **Immutability:** Configuration files can't be changed after they're built,
preventing manual edits from breaking your system.
2. **Reproducibility:** The same configuration file will always produce the
exact same result because the source files are immutable.
3. **Atomic Upgrades/Rollbacks:** Because each configuration is a self-contained
"generation," switching between them is a fast, atomic operation.

View file

@ -0,0 +1,61 @@
# ¡Bienvenido a ZaneyOS! Guía para principiantes
¡Bienvenido! Esta guía es para usuarios nuevos en Nix que quieren realizar personalizaciones comunes en ZaneyOS. Mantendremos todo simple y al grano.
## Entendiendo la estructura
Para cambios cotidianos, basta con conocer algunos archivos y directorios clave:
- `flake.nix`: archivo principal del sistema. Normalmente no necesitas editarlo para cambios comunes.
- `hosts/`: configuración por equipo (host).
- `hosts/<tu-hostname>/`:
- `variables.nix`: panel principal para activar/desactivar funciones y cambiar opciones.
- `host-packages.nix`: paquetes solo para ese equipo.
- `modules/`: configuración modular reutilizable.
- `modules/core/global-packages.nix`: paquetes para todos tus equipos ZaneyOS.
- `modules/home/hyprland/binds.nix`: personaliza atajos de Hyprland.
## Cómo añadir paquetes
Dos maneras:
### 1) Solo para un equipo
Edita `hosts/<tu-hostname>/host-packages.nix` y añade el paquete a la lista:
```nix path=null start=null
[
brave
(catppuccin-vsc.override {
variant = "mocha";
})
cowsay
]
```
Guarda el archivo.
### 2) Para todos los equipos
Edita `modules/core/global-packages.nix` y añade el paquete igual que arriba.
## Cambiar ajustes de monitores
En `hosts/<tu-hostname>/variables.nix` busca `extraMonitorSettings`:
```nix path=null start=null
extraMonitorSettings = "monitor=DP-1,1920x1080@144";
```
Guarda el archivo.
## Cambiar atajos de Hyprland
En `modules/home/hyprland/binds.nix` puedes editar mapeos:
```nix path=null start=null
"SUPER, T, exec, ${terminal}"
```
Guarda el archivo.
## Aplicar cambios
Tras editar:
```bash path=null start=null
zcli rebuild
```
Si termina con éxito, ¡tus cambios están activos! Algunos pueden requerir reinicio.

View file

@ -0,0 +1,101 @@
# Welcome to ZaneyOS! A Beginner's Guide to Customization
Welcome! This guide is for users who are new to Nix and want to make some common customizations to their ZaneyOS setup. We'll keep it simple and focus on the essentials.
## Understanding the Layout
NixOS configurations can seem complex, but for day-to-day changes, you only need to know about a few key files and directories.
- `flake.nix`: This is the main file for the entire system. You shouldn't need to edit this file directly for most common changes.
- `hosts/`: This directory contains the configuration for each individual computer (or "host") you've installed ZaneyOS on.
- `hosts/<your-hostname>/`: This is where you'll make most of your changes.
- `variables.nix`: This is your main control panel. You can enable/disable features, change settings, and more.
- `host-packages.nix`: This is where you can add packages that you only want on this specific computer.
- `modules/`: This directory contains the bulk of the configuration, broken down into smaller, reusable pieces ("modules").
- `modules/core/global-packages.nix`: You can add packages here if you want them to be installed on *all* of your ZaneyOS computers.
- `modules/home/hyprland/binds.nix`: This is where you can customize your Hyprland keybindings.
## How to Add Packages
There are two main ways to add packages:
### 1. For a Single Computer
If you only want to install a package on your current computer, you'll add it to `hosts/<your-hostname>/host-packages.nix`.
1. Open `hosts/<your-hostname>/host-packages.nix` in your favorite editor.
2. You'll see a list of packages. Simply add the name of the package you want to install to the list. For example, to add the `cowsay` package, you would change this:
```nix
[
brave
(catppuccin-vsc.override {
variant = "mocha";
})
]
```
to this:
```nix
[
brave
(catppuccin-vsc.override {
variant = "mocha";
})
cowsay
]
```
3. Save the file.
### 2. For All Computers
If you want a package to be installed on every computer you use ZaneyOS on, you'll add it to `modules/core/global-packages.nix`. The process is the same as above.
## How to Change Monitor Settings
You can change your monitor settings in `hosts/<your-hostname>/variables.nix`.
1. Open `hosts/<your-hostname>/variables.nix`.
2. Look for the `extraMonitorSettings` line.
3. You can add your monitor settings here. For example, to set the resolution and refresh rate for a monitor named `DP-1`, you would change this:
```nix
extraMonitorSettings = "";
```
to this:
```nix
extraMonitorSettings = "monitor=DP-1,1920x1080@144";
```
4. Save the file.
## How to Change Hyprland Bindings
You can change your Hyprland keybindings in `modules/home/hyprland/binds.nix`.
1. Open `modules/home/hyprland/binds.nix`.
2. You'll see a list of keybindings. You can change them to your liking. For example, to change the keybinding for opening a terminal from `SUPER, Return` to `SUPER, T`, you would change this:
```nix
"SUPER, Return, exec, ${terminal}"
```
to this:
```nix
"SUPER, T, exec, ${terminal}"
```
3. Save the file.
## Applying Your Changes
After you've made any changes, you need to apply them.
1. Open a terminal.
2. Run the command `zcli rebuild`. This will apply your changes to the system.
3. If the command completes successfully, your changes are now active! Some changes may require a reboot to take effect.

View file

@ -0,0 +1,168 @@
# Introducción a Neovim en ZaneyOS
¡Bienvenido! Esta chuleta introduce Neovim tal y como está configurado en ZaneyOS (modules/home/nvf.nix). Se centra en tareas para principiantes y los plugins/atajos clave de este setup.
Aspectos destacados
- UI moderna: tema Catppuccin, Lualine, bufferline, iconos
- Explorador de archivos: Neo‑tree
- Búsqueda: Telescope (buscar archivos, ripgrep en vivo)
- LSP: autocompletado/diagnósticos/formateo al guardar
- Diagnósticos UI: Trouble; which‑key; notificaciones
- Terminal: ToggleTerm; integración con LazyGit
- Markdown: previsualización en vivo
- Movimientos: hop y leap para saltos rápidos
- Comentado, autocompletado, snippets, autopairs
Tecla Leader
- “Leader” es un prefijo para atajos personalizados. En esta config suele ser Space. Pulsa Space para ver which‑key con grupos disponibles.
- Notación: <leader>ff significa Space, luego f y f.
Primeros pasos
- Abrir Neovim:
```bash path=null start=null
nvim
```
- Ayuda: <leader>h para :help, o <leader>H para ayuda de la palabra bajo el cursor.
- Salir de Insert: escribe jk rápido (mapeado a <Esc>).
Navegación y modos
- Modos: Normal, Insert (i), Visual (v), Comando (:)
- Movimiento: h izq, j abajo, k arriba, l der
- Palabras: w siguiente, b anterior, e fin
- Líneas: 0 inicio, ^ primer no blanco, $ fin
- Pantallas: Ctrl‑f avanza, Ctrl‑b retrocede
- Buscar: /patrón, n siguiente, N anterior; limpia resaltado con <leader>nh
Abrir/crear/leer archivos
- Abrir archivo:
```vim path=null start=null
:e ruta/al/archivo
```
- Crear (editar un nombre nuevo):
```vim path=null start=null
:e nuevo.txt
```
- Leer archivo en el buffer actual:
```vim path=null start=null
:r ruta/a/otro
```
- Leer salida de un comando:
```vim path=null start=null
:r !ls -la
```
Guardar y salir
- Guardar: :w
- Salir: :q
- Guardar y salir: :wq (o :x)
- Salir sin guardar: :q!
- Guardar todo: :wa
- Cerrar buffer (mantener ventana): :bd
Ventanas y buffers
- Dividir: :sp (horizontal), :vsp (vertical)
- Mover entre ventanas: Ctrl‑w h/j/k/l
- Siguiente/anterior buffer: :bnext / :bprevious
- Listar buffers: :ls
Portapapeles, copiar/pegar
- Esta config habilita el portapapeles del sistema (unnamedplus). Los yanks van al portapapeles.
- Copiar: y (yy línea entera)
- Pegar: p / P
- Portapapeles explícito: "+y para copiar, "+p para pegar
Explorador (Neo‑tree)
- Toggle: <leader>e o <leader>fe
- Atajos típicos: Enter abre; a añadir; r renombrar; d borrar; y copiar, p pegar; s/v split/vsplit
Búsqueda (Telescope)
- Buscar archivos: <leader>ff
- Grep en vivo: <leader>lg
- Controles: Arriba/Abajo, Enter, Ctrl‑q a quickfix, Esc cierra
Terminal y LazyGit
- Toggle terminal: <leader>t
- En terminal: Ctrl‑\ y luego Ctrl‑n para Normal
- LazyGit:
```vim path=null start=null
:LazyGit
```
Diagnósticos y LSP
- Lista de diagnósticos (Trouble): <leader>dt
- Siguiente/anterior diagnóstico: <leader>dj / <leader>dk
- Mostrar diagnóstico de la línea actual: <leader>dl
- Formatear:
```vim path=null start=null
:lua vim.lsp.buf.format()
```
- Info LSP:
```vim path=null start=null
:LspInfo
```
Comentarios, completado, pares, snippets
- Comentarios: gcc (línea), gc en visual (selección)
- nvim‑cmp: autocompletado; Enter/Tab según tu preferencia
- Autopairs: cierra brackets/comillas
- Snippets (luasnip): expande con Tab/Enter (según contexto)
Markdown preview
- Toggle: <leader>mp
Mociones
- hop y leap habilitados; consulta :help hop y :help leap
Corrección ortográfica
- Inglés habilitado con wordlist. Comandos:
- Activar/desactivar: :set spell / :set nospell
- Siguiente/anterior error: ]s / [s
- Sugerencias: z=
- Añadir palabra: zg; deshacer: zw
Git
- Gitsigns muestra cambios en el margen.
- Diffview:
```vim path=null start=null
:DiffviewOpen
:DiffviewClose
```
Notificaciones y ayuda
- nvim‑notify muestra avisos.
- F1 desactivado. Usa:
- <leader>h :help
- <leader>H ayuda contextual
Which‑key y chuletas
- Pulsa Space para ver which‑key.
- Hay un plugin de chuleta interactiva.
Solución de problemas
- Salud:
```vim path=null start=null
:checkhealth
```
- Mensajes:
```vim path=null start=null
:messages
```
- Reiniciar LSP:
```vim path=null start=null
:LspRestart
```
Referencia rápida
- Modos: i, v, Esc, :
- Guardar/salir: :w / :q / :wq / :q!
- Abrir/crear: :e archivo
- Leer a buffer: :r archivo
- Buscar: /patrón; n/N; limpiar <leader>nh
- Explorador: <leader>e
- Archivos: <leader>ff; Grep: <leader>lg
- Terminal: <leader>t; LazyGit: :LazyGit
- Diagnósticos: <leader>dt, <leader>dj / <leader>dk, <leader>dl
- Ayuda: <leader>h, <leader>H
Consejo: empieza con which‑key. Pulsa Space y sigue las pistas en pantalla.

View file

@ -0,0 +1,178 @@
# Intro to Neovim on ZaneyOS
Welcome! This cheatsheet introduces Neovim as configured in ZaneyOS (modules/home/nvf.nix). It focuses on beginner tasks and the key plugins and keymaps in this setup.
Highlights of this configuration
- Modern UI: Catppuccin theme, Lualine statusline, bufferline, icons
- File explorer: Neo‑tree
- Search: Telescope (find files, ripgrep live search)
- LSP: Language Server Protocol (syntax, diagnostics, formatting on save)
- Diagnostics UI: Trouble list; which‑key helper; notify popups
- Terminal: ToggleTerm (inline terminal); LazyGit integration
- Markdown: Live preview
- Motions: hop and leap for fast jumping
- Commenting, autocompletion, snippets, autopairs
What is the Leader key?
- The “leader” is a prefix for custom shortcuts. In this config, it’s typically Space. Try pressing Space and you should see a which‑key popup listing available groups.
- Notation: <leader>ff means press Space, then f, then f.
First steps
- Start Neovim: from a terminal, run:
```bash path=null start=null
nvim
```
- Get help: press <leader>h to open a :help prompt, or <leader>H to open help for the word under cursor.
- Escape Insert mode: press jk quickly (mapped to <Esc>).
Basic navigation and modes
- Modes: Normal (default), Insert (i), Visual (v), Command (:)
- Move: h left, j down, k up, l right
- Words: w next word, b back word, e end of word
- Lines: 0 start, ^ first non‑blank, $ end
- Screens: Ctrl‑f forward page, Ctrl‑b back page
- Search: /pattern, n next, N previous; clear highlights with <leader>nh
Open, create, read files
- Open a file:
```vim path=null start=null
:e path/to/file
```
- Create a new file (just edit a new name):
```vim path=null start=null
:e newfile.txt
```
- Read a file into current buffer at cursor:
```vim path=null start=null
:r path/to/otherfile
```
- Read command output into buffer:
```vim path=null start=null
:r !ls -la
```
Save and quit
- Save: :w
- Quit: :q
- Save and quit: :wq (or :x)
- Quit without saving: :q!
- Save all: :wa
- Close buffer (keep window): :bd
Windows and buffers
- Split window: :sp (horizontal), :vsp (vertical)
- Move between windows: Ctrl‑w h/j/k/l
- Next/previous buffer: :bnext / :bprevious
- List buffers: :ls
Clipboard, copy/paste
- This config enables system clipboard (unnamedplus) and Wayland/X11 providers, so yanks go to your system clipboard.
- Copy text: y in normal/visual (yy for a whole line)
- Paste: p (after cursor) or P (before cursor)
- System clipboard explicitly: "+y to copy, "+p to paste
File explorer (Neo‑tree)
- Toggle Neo‑tree: <leader>e or <leader>fe
- In Neo‑tree (common defaults):
- Enter: open
- a: add file/directory
- r: rename
- d: delete
- y: copy, p: paste (within Neo‑tree)
- s / v: open in split / vsplit (varies by setup)
Search (Telescope)
- Find files by name: <leader>ff
- Live grep (ripgrep content search): <leader>lg
- Common Telescope controls: Up/Down to navigate, Enter to open, Ctrl‑q to send to quickfix list, Esc to close
Terminal and LazyGit
- Toggle inline terminal: <leader>t
- In the terminal buffer: press Ctrl‑\ then Ctrl‑n to return to Normal mode if needed
- LazyGit integration is enabled; run:
```vim path=null start=null
:LazyGit
```
Diagnostics and LSP
- Diagnostic list (Trouble): <leader>dt (toggle)
- Next/previous diagnostic: <leader>dj / <leader>dk
- Show diagnostic for current line: <leader>dl
- Formatting on save is enabled where supported. You can also run:
```vim path=null start=null
:lua vim.lsp.buf.format()
```
- LSP info / servers:
```vim path=null start=null
:LspInfo
```
Comments, completion, pairs, snippets
- Comments (comment‑nvim defaults):
- gcc to toggle comment on current line
- gc in visual mode to toggle selection
- Autocompletion (nvim‑cmp): starts automatically; use Enter/Tab per your insert‑mode behavior
- Auto‑pairs: brackets/quotes auto‑close
- Snippets (luasnip): many language snippets are available; expand with Tab/Enter (depends on context)
Markdown preview
- Toggle Markdown live preview: <leader>mp
Motion helpers
- hop and leap are enabled for fast jumping; try searching for a character or pattern (consult :help hop and :help leap for details). Great for quickly moving around large files.
Spellcheck
- English spellcheck is enabled with a programming wordlist that auto‑updates on first run.
- Useful commands:
- Toggle spell: :set spell / :set nospell
- Next/prev misspelling: ]s / [s
- Suggestions for word under cursor: z=
- Add word to dictionary: zg
- Undo added word: zw
Git integration
- Signs in the gutter (gitsigns) show added/changed lines.
- Diffview is available for rich diffs:
```vim path=null start=null
:DiffviewOpen
:DiffviewClose
```
Notifications and help
- Notifications appear via nvim‑notify.
- F1 is disabled to prevent accidental help popups; use:
- <leader>h to open :help prompt
- <leader>H for help on word under cursor
Which‑key and cheatsheet
- Press the leader (Space) to see a which‑key popup of available keys.
- A cheatsheet plugin is enabled—explore keymaps interactively.
Troubleshooting
- Check health:
```vim path=null start=null
:checkhealth
```
- See messages/notifications:
```vim path=null start=null
:messages
```
- If completion/diagnostics feel off, reload LSP:
```vim path=null start=null
:LspRestart
```
Quick reference
- Modes: i (insert), v (visual), Esc (back to normal), : (command)
- Save/quit: :w / :q / :wq / :q!
- Open/create: :e file
- Read file into current: :r file
- Search: /pattern then n/N; clear highlights <leader>nh
- File explorer: <leader>e (Neo‑tree)
- Find files: <leader>ff; Live grep: <leader>lg
- Terminal: <leader>t; LazyGit: :LazyGit
- Diagnostics: <leader>dt (list), <leader>dj / <leader>dk (nav), <leader>dl (line)
- Help: <leader>h, <leader>H
Tip: Start with which‑key. Press Space and follow the on‑screen hints to discover available actions in this setup.

View file

@ -0,0 +1,88 @@
[English](./tmux.cheatsheet.md) | Español
# Tmux en ZaneyOS — Resumen y Cheatsheet
## 🚀 Resumen de modules/home/terminals/tmux.nix
### ⌨️ ¿Qué es el Prefijo de Tmux?
- El prefijo es una tecla especial que presionas antes de la mayoría de los comandos de tmux, para que tmux pueda distinguirlos de la escritura normal.
- Guía de notación utilizada a continuación:
- C-x = mantén presionada la tecla Control y presiona x (ej., C-a significa Control+a)
- M-x = mantén presionada la tecla Alt/Meta y presiona x (a veces se muestra como Alt+x)
- S-x = mantén presionada la tecla Shift y presiona x (a menudo implícito para las letras mayúsculas)
- El prefijo predeterminado de Tmux es C-b (Control+b). En esta configuración se cambia a C-a (Control+a), lo que refleja el flujo de trabajo histórico de GNU Screen que muchos usuarios prefieren.
Ejemplos rápidos (con prefijo = C-a):
- Nueva ventana: presiona C-a y luego c
- Siguiente ventana: presiona C-a y luego n
- Dividir horizontalmente: presiona C-a y luego |
- Dividir verticalmente: presiona C-a y luego -
- Redimensionar a la izquierda: presiona C-a y luego C-h (mantén Control y presiona h)
- Programa
- tmux habilitado; prefijo: C-a; modo de teclas: vi; baseIndex: 1; pane-base-index: 1
- baseIndex: la numeración de las ventanas comienza en 1 en lugar de 0
- pane-base-index: la numeración de los paneles dentro de una ventana comienza en 1 en lugar de 0
- La terminal anula el RGB; la terminal se establece en "kitty"; shell: zsh
- Ratón: habilitado; reloj de 12 horas; límite de historial: 5000; renumerar ventanas: activado
- Estado/UX
- Barra de estado en la parte superior; passthrough: activado; confirmaciones reducidas (kill-pane sin aviso)
- Plugins
- vim-tmux-navigator, sensible, catppuccin
---
## 🗝️ Cheatsheet de Atajos de Teclado
Navegación
- Prefijo h/j/k/l — seleccionar panel Izquierda/Abajo/Arriba/Derecha
- Prefijo o — seleccionar el siguiente panel
- C-Tab — siguiente ventana
- C-S-Tab — ventana anterior
- M-Tab — nueva ventana
Divisiones
- Prefijo | — dividir ventana -h (directorio actual)
- Prefijo \ — dividir ventana -fh (directorio actual)
- Prefijo - — dividir ventana -v (directorio actual)
- Prefijo _ — dividir ventana -fv (directorio actual)
Redimensionar
- Prefijo C-h/C-j/C-k/C-l — redimensionar panel 15 columnas/filas en la dirección
- Prefijo m — alternar zoom (redimensionar panel -Z)
Ventanas
- Prefijo c — nueva ventana
- Prefijo n — siguiente ventana
- Prefijo p — ventana anterior (nota: la configuración asigna 'n' dos veces; se pretendía p para anterior)
- Prefijo t — modo reloj
- Prefijo q — mostrar paneles
- Prefijo u — refrescar cliente
Sesión/Recargar
- Prefijo r — cargar archivo ~/.config/tmux/tmux.conf
- Prefijo x — matar panel (sin aviso)
Ventanas Emergentes (display-popup)
- Prefijo C-y — lazygit (80%x80% en el directorio actual)
- Prefijo C-n — solicitar nombre de sesión; crear y cambiar
- Prefijo C-j — cambiar de sesión a través de fzf
- Prefijo C-r — yazi (90%x90% en el directorio actual)
- Prefijo C-z — nvim ~/ZaneyOS/flake.nix (90%x90%)
- Prefijo C-t — zsh (75%x75% en el directorio actual)
Menú (display-menu)
- Prefijo d — Menú de Dotfiles con entradas de apertura rápida:
- f: flake.nix (ZaneyOS)
- c: paquetes principales (ZaneyOS)
- g: paquetes globales (ZaneyOS)
- k: atajos de teclado (Hyprland)
- w: reglas de ventana (Hyprland)
- z: ZaneyOS flake.nix
- p: paquetes de ZaneyOS
- q: Salir
Notas
- Los índices de paneles/ventanas comienzan en 1.
- Passthrough de terminal y RGB habilitados para color verdadero.

View file

@ -1,5 +1,6 @@
# Tmux on ddubsOS — Summary & Cheatsheet
English | [Español](./tmux.cheatsheet.es.md)
# Tmux on ZaneyOS — Summary & Cheatsheet
## 🚀 Summary of modules/home/terminals/tmux.nix
### ⌨️ What is the Tmux Prefix?
@ -68,14 +69,14 @@ Popups (display-popup)
- Prefix C-n — prompt for session name; create and switch
- Prefix C-j — switch session via fzf
- Prefix C-r — yazi (90%x90% at cwd)
- Prefix C-z — nvim ~/ddubsos/flake.nix (90%x90%)
- Prefix C-z — nvim ~/ZaneyOS/flake.nix (90%x90%)
- Prefix C-t — zsh (75%x75% at cwd)
Menu (display-menu)
- Prefix d — Dotfiles menu with quick-open entries:
- f: flake.nix (ddubsOS)
- c: core packages (ddubsOS)
- g: global packages (ddubsOS)
- f: flake.nix (ZaneyOS)
- c: core packages (ZaneyOS)
- g: global packages (ZaneyOS)
- k: keybinds (Hyprland)
- w: window rules (Hyprland)
- z: ZaneyOS flake.nix

View file

@ -0,0 +1,41 @@
[English](./wezterm.cheatsheet.md) | Español
# WezTerm en ZaneyOS — Resumen y Cheatsheet
## 🚀 Resumen de modules/home/terminals/wezterm.nix
- Programa
- WezTerm habilitado con el paquete pkgs.wezterm
- Configuración de Lua proporcionada en ~/.config/wezterm/wezterm.lua
- Apariencia y Comportamiento
- Ocultar la barra de pestañas si solo hay una pestaña
- Cadena de fuentes de respaldo: Maple Mono NF (delgada), Fira Code, JetBrains Mono, Hack
- Fuente: FiraCode Regular (marco de la ventana: JetBrainsMono Nerd Font Mono); tamaño: 12
- Esquema de colores: Catppuccin Mocha; colores personalizados de la barra de pestañas
- Opacidad del fondo de la ventana: 0.75; relleno: 10 en todos los lados
- Barra de pestañas elegante habilitada; fuente personalizada de window_frame
- Cursor: BlinkingUnderline, velocidad de parpadeo 500
- Term: xterm-256color
- Rendimiento: max_fps 120; animation_fps 30
- Wayland: enable_wayland = true
- Advertencias de glifos faltantes: deshabilitadas
---
## 🗝️ Cheatsheet de Atajos de Teclado
Pestañas
- Alt+t — Crear pestaña (CurrentPaneDomain)
- Alt+w — Cerrar pestaña actual (sin confirmar)
- Alt+n — Pestaña siguiente
- Alt+p — Pestaña anterior
Paneles
- Alt+v — Dividir verticalmente
- Alt+h — Dividir horizontalmente
- Alt+q — Cerrar panel actual (sin confirmar)
- Alt+Teclas de flecha — Activar panel en la dirección de la flecha
Notas
- Lua contiene ajustes opcionales relacionados con NVIDIA comentados.
- default_prog se puede habilitar si el prompt de Starship tiene problemas de inicio.

View file

@ -1,5 +1,6 @@
# WezTerm on ddubsOS — Summary & Cheatsheet
English | [Español](./wezterm.cheatsheet.es.md)
# WezTerm on ZaneyOS — Summary & Cheatsheet
## 🚀 Summary of modules/home/terminals/wezterm.nix
- Program

View file

@ -0,0 +1,110 @@
[English](./yazi.keymap.cheatsheet.md) | Español
# Mapa de Teclas de Yazi — ZaneyOS (Amigable para Humanos)
## 🧭 Navegación
- k / Arriba — Mover hacia arriba
- j / Abajo — Mover hacia abajo
- Ctrl+u / Shift+RePág — Media página hacia arriba
- Ctrl+d / Shift+AvPág — Media página hacia abajo
- Ctrl+b / RePág — Página hacia arriba
- Ctrl+f / AvPág — Página hacia abajo
- g g — Ir al principio
- G — Ir al final
- h / Izquierda — Ir al directorio padre
- l / Derecha — Entrar al directorio hijo
- H — Atrás (directorio anterior)
- L — Adelante (siguiente directorio)
## 🧰 Selección y Modo Visual
- Espacio — Alternar actual, luego mover hacia abajo
- Ctrl+a — Seleccionar todo
- Ctrl+r — Invertir selección
- v — Entrar en modo visual (seleccionar)
- V — Salir del modo visual
## 🔎 Búsqueda y Filtro
- s — Buscar por nombre (fd)
- S — Buscar por contenido (ripgrep)
- Ctrl+s — Cancelar búsqueda
- f — Filtrar archivos (inteligente)
- / — Buscar siguiente (inteligente)
- ? — Buscar anterior (inteligente)
- n — Siguiente encontrado
- N — Anterior encontrado
## 📂 Abrir y Vista Previa
- o / Enter — Abrir
- O / Shift+Enter — Abrir interactivamente
- Tab — Resaltar archivo sobre el que se pasa el ratón
- K / J — Desplazarse hacia arriba/abajo en la vista previa (±5)
## 📋 Portapapeles (Copiar/Mover)
- y — Copiar (yank)
- x — Cortar (yank cut)
- p — Pegar
- P — Pegar (sobrescribir)
- - — Enlace simbólico de la ruta absoluta de lo copiado
- _ — Enlace simbólico de la ruta relativa de lo copiado
- Ctrl+- — Enlace duro de lo copiado
- Y / X — Deshacer copia (cancelar yank)
## 🗑️ Eliminar
- d — Enviar a la papelera lo seleccionado
- D — Eliminar permanentemente
## ✏️ Crear y Renombrar
- a — Crear archivo/directorio (usar / al final para carpetas)
- r — Renombrar (cursor antes de la extensión)
## 🖥️ Shell
- ; — Ejecutar comando de shell (interactivo)
- : — Ejecutar comando de shell (bloquear hasta que termine)
## 👀 Archivos Ocultos
- . — Alternar ocultos
## 🧭 Saltos Rápidos
- g h — Ir a $HOME
- g c — Ir a ~/.config
- g d — Ir a ~/Downloads
- g Espacio — Saltar interactivamente
- z — Salto con Zoxide
- Z — Salto con FZF (archivo/directorio)
## 🧾 Modo de Línea (Vista de Metadatos)
- m s — Tamaño
- m p — Permisos
- m b — Fecha de creación
- m m — Fecha de modificación
- m o — Propietario
- m n — Ninguno
## 🔤 Ordenar
- , m / , M — Ordenar por fecha de modificación (asc/desc)
- , b / , B — Ordenar por fecha de creación (asc/desc)
- , e / , E — Ordenar por extensión (asc/desc)
- , a / , A — Ordenar alfabéticamente (asc/desc)
- , n / , N — Ordenar naturalmente (asc/desc)
- , s / , S — Ordenar por tamaño (asc/desc)
- , r — Ordenar aleatoriamente
## 🗂️ Pestañas
- t — Nueva pestaña (directorio actual)
- 1..9 — Cambiar a la pestaña 1..9
- [ / ] — Pestaña anterior / siguiente
- { / } — Intercambiar pestaña a la izquierda / derecha
## 🧮 Tareas y Ayuda
- w — Mostrar tareas (gestor de tareas)
- ~ / F1 — Abrir ayuda
## 🧩 Plugins (Anteponer)
- g i — LazyGit (plugin)
- l — Entrada inteligente (entrar a directorio o abrir archivo)
## 🧰 Modos: Resaltar, Elegir, Entrada, Confirmar, Autocompletar
- Modo Resaltar: Esc/C-[/Ctrl+c/Tab para cerrar; k/j/Arriba/Abajo para navegar; h/l o Izquierda/Derecha para deslizar; c c para copiar celda; ~ / F1 para ayuda
- Modo Elegir: Esc/C-[/Ctrl+c para cancelar; Enter para enviar; k/j/Arriba/Abajo para navegar; ~ / F1 para ayuda
- Modo Entrada: Esc/C-[ para escapar; i/I/a/A para entrar en modo inserción/añadir (con movimientos al principio/final de línea); selecciones visuales (v, V, Ctrl-A/E); movimiento (h/l/Izquierda/Derecha/C-b/C-f/b/B/w/W/e/E/Alt-b/Alt-f); eliminar/retroceder/matar palabras; cortar/copiar/pegar (d/D/c/C/x/y/p/P); deshacer/rehacer (u/C-r); ~ / F1 para ayuda
- Modo Confirmar: Esc/C-[/Ctrl+c/n para cancelar; Enter/y para enviar; k/j/Arriba/Abajo para navegar; ~ / F1 para ayuda
- Modo Autocompletar: Ctrl+c para cancelar; Tab para enviar; Enter para enviar autocompletado + entrada; Alt-k/j o Arriba/Abajo/C-p/C-n para navegar; ~ / F1 para ayuda

View file

@ -1,5 +1,6 @@
# Yazi Keymap — ddubsOS (Human-friendly)
English | [Español](./yazi.keymap.cheatsheet.es.md)
# Yazi Keymap — ZaneyOS (Human-friendly)
## 🧭 Navigation
- k / Up — Move up
- j / Down — Move down

View file

@ -51,6 +51,7 @@ in {
"$modifier,Return, Terminal, exec, ${terminal}"
# ============= APPLICATION LAUNCHERS =============
"$modifier,K, Keybinds Search Tool, exec, qs-keybinds"
"$modifier CTRL,C, Cheatsheets Viewer, exec, qs-cheatsheets"
"$modifier SHIFT,K, Legacy Keybinds Menu, exec, list-keybinds"
"$modifier SHIFT,D, Discord, exec, discord"
"$modifier SHIFT,W, Web Search, exec, web-search"

View file

@ -43,6 +43,10 @@ in {
"float, title:^(Hyprland Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration)$"
"center, title:^(Hyprland Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration)$"
"size 55% 66%, title:^(Hyprland Keybinds|Emacs Leader Keybinds|Kitty Configuration|WezTerm Configuration|Ghostty Configuration|Yazi Configuration)$"
# qs-cheatsheets floating viewer
"float, title:^(Cheatsheets Viewer)$"
"center, title:^(Cheatsheets Viewer)$"
"size 65% 60%, title:^(Cheatsheets Viewer)$"
"center, class:^([Ff]erdium)$"
"float, class:^([Ww]aypaper)$"
"center, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$"

View file

@ -0,0 +1,242 @@
{pkgs}:
pkgs.writeShellScriptBin "cheatsheets-parser" ''
#!/usr/bin/env bash
set -euo pipefail
# Default paths (ported to ZaneyOS repo location)
CHEATSHEETS_DIR="$HOME/zaneyos/cheatsheets"
# Handle arguments
MODE="''${1:-files}"
CATEGORY="''${2:-emacs}"
LANGUAGE="''${3:-en}"
usage() {
cat <<EOF
Usage: cheatsheets-parser [MODE] [CATEGORY] [LANGUAGE]
MODE: files|content|categories
CATEGORY: emacs|hyprland|kitty|wezterm|yazi|nix|root|etc.
LANGUAGE: en|es
Examples:
cheatsheets-parser files emacs en # List English emacs cheatsheet files
cheatsheets-parser content emacs en # Get content for all English emacs files
EOF
}
# Function to extract clean filename
get_clean_filename() {
local filepath="$1"
local basename=$(basename "$filepath")
# Remove category prefix (e.g., "emacs.")
basename=$(echo "$basename" | sed 's/^[^.]*\.//')
# Remove language suffix (.es.md or .md)
basename=$(echo "$basename" | sed 's/\.es\.md$//' | sed 's/\.md$//')
# Remove common suffixes
basename=$(echo "$basename" | sed 's/\.cheatsheet$//' | sed 's/\.top10$//')
echo "$basename"
}
# Function to detect language from filename
get_language() {
local filepath="$1"
if [[ "$filepath" == *.es.md ]]; then
echo "es"
else
echo "en"
fi
}
# Function to get category from path
get_category() {
local filepath="$1"
local dir=$(dirname "$filepath")
echo $(basename "$dir")
}
# Function to extract title from markdown file
get_title_from_file() {
local filepath="$1"
if [[ -f "$filepath" ]]; then
# Look for the first H1 header in the file
local title=$(${pkgs.gnugrep}/bin/grep -m1 "^# " "$filepath" 2>/dev/null | sed 's/^# //' || echo "")
if [[ -n "$title" ]]; then
echo "$title"
else
# Fallback to clean filename
get_clean_filename "$filepath"
fi
else
get_clean_filename "$filepath"
fi
}
# Main processing
case "$MODE" in
"files")
# Generate JSON list of available files for a category
echo "["
# Handle special "root" category for files in cheatsheets/ root directory
if [[ "$CATEGORY" == "root" ]]; then
# Find markdown files directly in cheatsheets root directory
if [[ -d "$CHEATSHEETS_DIR" ]]; then
first=true
while IFS= read -r -d "" filepath; do
file_lang=$(get_language "$filepath")
# Filter by requested language
if [[ "$file_lang" == "$LANGUAGE" ]]; then
clean_name=$(get_clean_filename "$filepath")
title=$(get_title_from_file "$filepath")
if [[ "$first" == "true" ]]; then
first=false
else
echo ","
fi
cat <<JSON_ENTRY
{
"filename": "$(basename "$filepath")",
"clean_name": "$clean_name",
"title": "$title",
"category": "root",
"language": "$file_lang",
"path": "$filepath"
}
JSON_ENTRY
fi
done < <(${pkgs.findutils}/bin/find "$CHEATSHEETS_DIR" -maxdepth 1 -name "*.md" -print0 | ${pkgs.coreutils}/bin/sort -z)
fi
# Find all markdown files in the specified category directory
elif [[ -d "$CHEATSHEETS_DIR/$CATEGORY" ]]; then
first=true
while IFS= read -r -d "" filepath; do
file_lang=$(get_language "$filepath")
# Filter by requested language
if [[ "$file_lang" == "$LANGUAGE" ]]; then
clean_name=$(get_clean_filename "$filepath")
title=$(get_title_from_file "$filepath")
if [[ "$first" == "true" ]]; then
first=false
else
echo ","
fi
cat <<JSON_ENTRY
{
"filename": "$(basename "$filepath")",
"clean_name": "$clean_name",
"title": "$title",
"category": "$CATEGORY",
"language": "$file_lang",
"path": "$filepath"
}
JSON_ENTRY
fi
done < <(${pkgs.findutils}/bin/find "$CHEATSHEETS_DIR/$CATEGORY" -name "*.md" -print0 | ${pkgs.coreutils}/bin/sort -z)
fi
echo "]"
;;
"content")
# Get content of a specific file or all files in category
FILENAME="''${4:-}"
if [[ -n "$FILENAME" ]]; then
# Single file content
if [[ -f "$CHEATSHEETS_DIR/$CATEGORY/$FILENAME" ]]; then
cat "$CHEATSHEETS_DIR/$CATEGORY/$FILENAME"
else
echo "File not found: $CHEATSHEETS_DIR/$CATEGORY/$FILENAME" >&2
exit 1
fi
else
# All files metadata with content
echo "["
first=true
if [[ -d "$CHEATSHEETS_DIR/$CATEGORY" ]]; then
while IFS= read -r -d "" filepath; do
file_lang=$(get_language "$filepath")
# Filter by requested language
if [[ "$file_lang" == "$LANGUAGE" ]]; then
clean_name=$(get_clean_filename "$filepath")
title=$(get_title_from_file "$filepath")
content=$(cat "$filepath" | ${pkgs.jq}/bin/jq -R -s .)
if [[ "$first" == "true" ]]; then
first=false
else
echo ","
fi
cat <<JSON_ENTRY
{
"filename": "$(basename "$filepath")",
"clean_name": "$clean_name",
"title": "$title",
"category": "$CATEGORY",
"language": "$file_lang",
"path": "$filepath",
"content": $content
}
JSON_ENTRY
fi
done < <(${pkgs.findutils}/bin/find "$CHEATSHEETS_DIR/$CATEGORY" -name "*.md" -print0 | ${pkgs.coreutils}/bin/sort -z)
fi
echo "]"
fi
;;
"categories")
# List available categories
echo "["
first=true
# Always include "root" category for files in cheatsheets/ root directory
if [[ -d "$CHEATSHEETS_DIR" ]] && [[ $(${pkgs.findutils}/bin/find "$CHEATSHEETS_DIR" -maxdepth 1 -name "*.md" | wc -l) -gt 0 ]]; then
echo " \"root\""
first=false
fi
if [[ -d "$CHEATSHEETS_DIR" ]]; then
for dir in "$CHEATSHEETS_DIR"/*; do
if [[ -d "$dir" ]]; then
category=$(basename "$dir")
if [[ "$first" == "true" ]]; then
first=false
else
echo ","
fi
echo " \"$category\""
fi
done
fi
echo "]"
;;
*)
echo "Error: Unknown mode '$MODE'" >&2
usage >&2
exit 1
;;
esac
''

View file

@ -20,6 +20,9 @@
inherit username;
})
(import ./web-search.nix { inherit pkgs; })
# Cheatsheets viewer + parser
(import ./cheatsheets-parser.nix { inherit pkgs; })
(import ./qs-cheatsheets.nix { inherit pkgs; })
(import ./zcli.nix {
inherit pkgs profile;
backupFiles = [

View file

@ -0,0 +1,939 @@
{pkgs}:
pkgs.writeShellScriptBin "qs-cheatsheets" ''
#!/usr/bin/env bash
set -euo pipefail
# Configurable defaults via env
CATEGORY="''${CHEATSHEETS_CATEGORY:-emacs}"
LANGUAGE="''${CHEATSHEETS_LANGUAGE:-en}"
usage() {
cat <<EOF
Usage: qs-cheatsheets [options]
Options:
-c CATEGORY Category to display (emacs|hyprland|kitty|wezterm|yazi|nixos) (default: emacs)
-l LANGUAGE Language (en|es) (default: en)
-h Show this help
EOF
}
# Pre-handle long flags so getopts doesn't complain
ARGS=()
while [[ $# -gt 0 ]]; do
case $1 in
--shell-only)
QS_SHELL_ONLY=1
shift
;;
*)
ARGS+=("$1")
shift
;;
esac
done
set -- "''${ARGS[@]}"
while getopts ":c:l:h" opt; do
case "$opt" in
c) CATEGORY="$OPTARG" ;;
l) LANGUAGE="$OPTARG" ;;
h) usage; exit 0 ;;
:) echo "Missing argument for -$OPTARG" >&2; exit 2 ;;
\?) echo "Unknown option -$OPTARG" >&2; usage; exit 2 ;;
esac
done
# Validate category (dynamically check if directory exists or is "root")
if [[ "$CATEGORY" != "root" && ! -d "$HOME/zaneyos/cheatsheets/$CATEGORY" ]]; then
echo "Error: Category directory '$CATEGORY' not found in cheatsheets/" >&2
echo "Available categories:" >&2
echo " root" >&2
ls -1 "$HOME/zaneyos/cheatsheets/" | grep -E '^[a-z]' | head -10 >&2
exit 1
fi
# Validate language
if [[ "$LANGUAGE" != "en" && "$LANGUAGE" != "es" ]]; then
echo "Error: Invalid language '$LANGUAGE'. Use 'en' or 'es'" >&2
exit 1
fi
# Perf timing helpers
now_ms() { ${pkgs.coreutils}/bin/date +%s%3N; }
if [ -n "''${QS_PERF:-}" ]; then t0=$(now_ms); fi
tmpdir=$(${pkgs.coreutils}/bin/mktemp -d)
files_json="$tmpdir/files.json"
categories_json="$tmpdir/categories.json"
qml="$tmpdir/cheatsheets.qml"
# Helper: convert all markdown to HTML for better rendering fidelity
convert_markdown_sets() {
# Simple on-disk cache to speed up launches
CACHE_ROOT="''${XDG_CACHE_HOME:-$HOME/.cache}/qs-html/cheatsheets"
# Iterate all generated files_*.json manifests
for json in "$tmpdir"/files_*.json; do
[ -f "$json" ] || continue
name=$(basename "$json")
# files_<category>_<lang>.json
category="''${name#files_}"
category="''${category%_*}"
language="''${name##*_}"
language="''${language%.json}"
outdir="$tmpdir/html/$category/$language"
cachedir="$CACHE_ROOT/$category/$language"
${pkgs.coreutils}/bin/mkdir -p "$outdir" "$cachedir"
# Extract paths from JSON
while IFS= read -r src; do
[ -n "$src" ] || continue
base="$(basename "$src")"
base_noext="''${base%.*}"
out="$outdir/''${base_noext}.html"
cache="$cachedir/''${base_noext}.html"
# If cache is newer than source, reuse it
if [ -f "$cache" ] && [ "$cache" -nt "$src" ]; then
${pkgs.coreutils}/bin/cp -f "$cache" "$out"
continue
fi
# Convert with pandoc (GitHub-Flavored Markdown) to a temp file, then update cache and out
tmp_html="$out.tmp"
if ${pkgs.pandoc}/bin/pandoc -f gfm -t html5 --wrap=none "$src" -o "$tmp_html" 2>/dev/null; then
${pkgs.coreutils}/bin/cp -f "$tmp_html" "$out"
${pkgs.coreutils}/bin/cp -f "$tmp_html" "$cache"
${pkgs.coreutils}/bin/rm -f "$tmp_html"
else
# Fallback: escape and wrap in <pre>
esc=$(<"$src" ${pkgs.gnused}/bin/sed -e 's/&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g')
printf '<pre style=\"white-space:pre-wrap;\">%s</pre>' \"$esc\" | ${pkgs.coreutils}/bin/tee \"$out\" > \"$cache\" >/dev/null
fi
done < <(${pkgs.jq}/bin/jq -r '.[] | .path // empty' "$json" 2>/dev/null)
done
}
# Generate data
if [ -n "''${QS_PERF:-}" ]; then t1=$(now_ms); fi
${pkgs.callPackage ./cheatsheets-parser.nix {}}/bin/cheatsheets-parser files "$CATEGORY" "$LANGUAGE" > "$files_json"
${pkgs.callPackage ./cheatsheets-parser.nix {}}/bin/cheatsheets-parser categories > "$categories_json"
# Generate files for all categories and languages for switching
# First generate root directory files
for lang in en es; do
${pkgs.callPackage ./cheatsheets-parser.nix {}}/bin/cheatsheets-parser files "root" "$lang" > "$tmpdir/files_root_''${lang}.json" 2>/dev/null || echo '[]' > "$tmpdir/files_root_''${lang}.json"
done
# Then dynamically discover all category directories
if [ -d "$HOME/zaneyos/cheatsheets" ]; then
for category_dir in "$HOME/zaneyos/cheatsheets"/*/; do
if [ -d "$category_dir" ]; then
category=$(basename "$category_dir")
for lang in en es; do
${pkgs.callPackage ./cheatsheets-parser.nix {}}/bin/cheatsheets-parser files "$category" "$lang" > "$tmpdir/files_''${category}_''${lang}.json" 2>/dev/null || echo '[]' > "$tmpdir/files_''${category}_''${lang}.json"
done
fi
done
fi
# Convert all discovered Markdown files to HTML for RichText rendering
convert_markdown_sets
if [ -n "''${QS_PERF:-}" ]; then t2=$(now_ms); echo "[perf] json_ms=$((t2 - t1))" >&2; fi
# Optional: shell-only mode for perf (skip QML)
if [ -n "''${QS_SHELL_ONLY:-}" ]; then
if [ -n "''${QS_PERF:-}" ]; then echo "[perf] shell_only=1 total_ms=$((t2 - t0))" >&2; fi
exit 0
fi
# Derive QML flags from env
PERF_BOOL=false; [ -n "''${QS_PERF:-}" ] && PERF_BOOL=true
AUTO_QUIT_BOOL=false; [ -n "''${QS_AUTO_QUIT:-}" ] && AUTO_QUIT_BOOL=true
# Create QML interface
cat > "$qml" <<QML_TEMPLATE
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
Window {
id: win
visible: true
width: 1280
height: 1000
title: "Cheatsheets Viewer"
flags: Qt.FramelessWindowHint | Qt.NoDropShadowWindowHint
color: "transparent"
property bool perfEnabled: $PERF_BOOL
property bool autoQuit: $AUTO_QUIT_BOOL
property double qStart: 0
// Current state
property string selectedCategory: "$CATEGORY"
property string selectedLanguage: "$LANGUAGE"
property string selectedFile: ""
property string fileContent: ""
property string htmlContent: ""
property string displayedContent: ""
property string searchQuery: ""
// Search state
property int searchCount: 0
property int currentMatchIndex: 0
property var matchPositions: [] // array of [start,end] in plain text indices
// Data
property var cheatsheetFiles: []
property bool filesLoaded: false
property var availableCategories: []
// List models
ListModel { id: filesModel }
ListModel { id: matchesModel }
// File paths
property string filesJsonPath: "$files_json"
property string categoriesJsonPath: "$categories_json"
property string tmpDir: "$tmpdir"
// Load files for current category and language
function loadCheatsheetFiles() {
console.log("Loading files for:", selectedCategory, selectedLanguage);
var fileName = "files_" + selectedCategory + "_" + selectedLanguage + ".json";
var filePath = tmpDir + "/" + fileName;
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200 || xhr.status === 0) {
try {
const result = JSON.parse(xhr.responseText);
console.log("Files loaded:", result.length, "files");
win.cheatsheetFiles = result;
win.filesLoaded = true;
// Populate the ListModel
filesModel.clear();
for (var i = 0; i < result.length; i++) {
var file = result[i];
console.log("Adding file:", file.filename, "clean_name:", file.clean_name);
filesModel.append({
filename: file.filename || "",
clean_name: file.clean_name || "",
title: file.title || "",
category: file.category || "",
language: file.language || "",
path: file.path || ""
});
}
if (result.length > 0 && (!win.selectedFile || win.selectedFile === "")) {
win.selectedFile = result[0].filename;
win.loadFileContent(result[0].filename);
}
} catch (e) {
console.error("Failed to parse files JSON:", e);
console.log("Response text:", xhr.responseText);
win.cheatsheetFiles = [];
win.filesLoaded = true;
// Clear the model on parse error
filesModel.clear();
}
} else {
console.error("Failed to load files, status:", xhr.status);
console.log("File path:", filePath);
win.cheatsheetFiles = [];
win.filesLoaded = true;
filesModel.clear();
}
}
};
xhr.open("GET", "file://" + filePath);
xhr.send();
}
// Load content of specific file
function loadFileContent(filename) {
console.log("Loading content for:", filename);
// Handle root directory files
var filePath;
if (selectedCategory === "root") {
filePath = "/home/dwilliams/zaneyos/cheatsheets/" + filename;
} else {
filePath = "/home/dwilliams/zaneyos/cheatsheets/" + selectedCategory + "/" + filename;
}
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200 || xhr.status === 0) {
win.fileContent = xhr.responseText;
win.selectedFile = filename;
// Also load pre-converted HTML for better rendering
var base = filename.replace(/\.[^.]+$/, "");
var htmlPath = win.tmpDir + "/html/" + win.selectedCategory + "/" + win.selectedLanguage + "/" + base + ".html";
const xhr2 = new XMLHttpRequest();
xhr2.onreadystatechange = function() {
if (xhr2.readyState === XMLHttpRequest.DONE) {
if (xhr2.status === 200 || xhr2.status === 0) {
win.htmlContent = xhr2.responseText;
} else {
win.htmlContent = "";
}
win.updateSearch(); // recompute matches and content after html load
}
};
xhr2.open("GET", "file://" + htmlPath);
xhr2.send();
} else {
win.fileContent = "Error loading file: " + filename;
win.htmlContent = "";
win.displayedContent = "Error loading file: " + filename;
win.matchPositions = [];
win.searchCount = 0;
win.currentMatchIndex = 0;
}
}
};
xhr.open("GET", "file://" + filePath);
xhr.send();
}
// Load available categories
function loadCategories() {
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200 || xhr.status === 0) {
try {
const result = JSON.parse(xhr.responseText);
win.availableCategories = result;
} catch (e) {
console.error("Failed to parse categories JSON:", e);
win.availableCategories = ["emacs", "hyprland", "kitty", "wezterm", "yazi", "nixos"];
}
}
}
};
xhr.open("GET", "file://" + categoriesJsonPath);
xhr.send();
}
// Switch category
function switchCategory(newCategory) {
selectedCategory = newCategory;
selectedFile = "";
fileContent = "";
loadCheatsheetFiles();
}
// Switch language
function switchLanguage(newLanguage) {
selectedLanguage = newLanguage;
selectedFile = "";
fileContent = "";
loadCheatsheetFiles();
}
// Escape HTML for safe RichText rendering
function escapeHtml(s) {
return s
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/\"/g, "&quot;")
.replace(/'/g, "&#39;");
}
function rebuildDisplayedContent() {
if (!fileContent || fileContent.length === 0) {
displayedContent = "";
return;
}
// Prefer pre-converted HTML if available; fallback to escaped pre
if (htmlContent && htmlContent.length > 0) {
displayedContent = htmlContent;
} else {
displayedContent = "<pre style=\"white-space:pre-wrap;\">" + escapeHtml(fileContent) + "</pre>";
}
}
// Update search matches and rebuild content
function updateSearch() {
matchPositions = [];
searchCount = 0;
currentMatchIndex = 0;
// Clear matches list by default
matchesModel.clear();
if (!fileContent || !searchQuery || searchQuery.trim() === "") {
rebuildDisplayedContent();
return;
}
var needle = String(searchQuery).toLowerCase();
if (needle.length === 0) {
rebuildDisplayedContent();
return;
}
var hay = String(fileContent).toLowerCase();
var idx = 0;
while (true) {
var pos = hay.indexOf(needle, idx);
if (pos === -1) break;
matchPositions.push([pos, pos + needle.length]);
idx = pos + needle.length;
}
searchCount = matchPositions.length;
// Build matches list with context snippets
for (var j = 0; j < matchPositions.length; j++) {
var s = matchPositions[j][0];
var e = matchPositions[j][1];
var ctxStart = Math.max(0, s - 80);
var ctxEnd = Math.min(fileContent.length, e + 80);
var snippet = fileContent.slice(ctxStart, ctxEnd).replace(/\n/g, " ");
matchesModel.append({ idx: j, start: s, snippet: snippet });
}
currentMatchIndex = (searchCount > 0) ? 0 : 0;
rebuildDisplayedContent();
}
function scrollToApproximatePosition(pos) {
var flick = contentScroll && contentScroll.contentItem ? contentScroll.contentItem : null;
if (!flick || !fileContent || fileContent.length === 0) return;
var ratio = Math.max(0, Math.min(1, pos / fileContent.length));
var maxY = Math.max(0, flick.contentHeight - contentScroll.height);
flick.contentY = ratio * maxY;
}
function jumpToMatch(index) {
if (searchCount <= 0) return;
var clamped = Math.max(0, Math.min(searchCount - 1, index));
currentMatchIndex = clamped;
var start = matchPositions[currentMatchIndex][0];
scrollToApproximatePosition(start);
if (typeof matchesList !== 'undefined' && matchesList) {
matchesList.positionViewAtIndex(currentMatchIndex, ListView.Center);
}
}
function gotoNextMatch() {
if (searchCount <= 0) return;
var next = (currentMatchIndex + 1) % searchCount;
jumpToMatch(next);
}
function gotoPrevMatch() {
if (searchCount <= 0) return;
var prev = (currentMatchIndex - 1 + searchCount) % searchCount;
jumpToMatch(prev);
}
Component.onCompleted: {
qStart = Date.now();
if (perfEnabled) console.log("[perf] q0_window_created");
loadCategories();
loadCheatsheetFiles();
updateSearch();
}
// App-wide shortcuts
Shortcut {
sequences: [ "Escape" ]
context: Qt.ApplicationShortcut
onActivated: Qt.quit()
}
Shortcut {
sequences: [ "N", "Right" ]
context: Qt.ApplicationShortcut
onActivated: win.gotoNextMatch()
}
Shortcut {
sequences: [ "P", "Left" ]
context: Qt.ApplicationShortcut
onActivated: win.gotoPrevMatch()
}
Rectangle {
id: frame
anchors.fill: parent
anchors.margins: 12
radius: 12
border.width: 0
border.color: "#00000000"
color: "transparent"
clip: true
Row {
anchors.fill: parent
anchors.margins: 16
spacing: 16
// Left sidebar
Rectangle {
id: sidebar
width: 400
height: parent.height
radius: 8
color: "#BB111111"
border.width: 1
border.color: "#444444"
Column {
anchors.fill: parent
anchors.margins: 12
spacing: 12
// Category buttons
Text {
text: "Categories"
color: "#66ccff"
font.pixelSize: 16
font.bold: true
}
Flow {
width: parent.width
spacing: 6
Repeater {
model: availableCategories
Button {
property string categoryName: modelData || ""
text: categoryName.charAt(0).toUpperCase() + categoryName.slice(1)
width: Math.max(80, text.length * 8 + 16)
height: 32
background: Rectangle {
color: win.selectedCategory === categoryName ? "#66ccff" : "#333333"
radius: 6
border.width: 1
border.color: "#555555"
}
contentItem: Text {
text: parent.text
color: win.selectedCategory === categoryName ? "#000000" : "#cccccc"
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
win.switchCategory(categoryName);
}
}
}
}
// Language toggle
Row {
spacing: 8
Text {
text: "Language:"
color: "#cccccc"
anchors.verticalCenter: parent.verticalCenter
}
Button {
text: "EN"
width: 40
height: 28
background: Rectangle {
color: win.selectedLanguage === "en" ? "#66ccff" : "#333333"
radius: 4
border.width: 1
border.color: "#555555"
}
contentItem: Text {
text: parent.text
color: win.selectedLanguage === "en" ? "#000000" : "#cccccc"
font.pixelSize: 11
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: win.switchLanguage("en")
}
Button {
text: "ES"
width: 40
height: 28
background: Rectangle {
color: win.selectedLanguage === "es" ? "#66ccff" : "#333333"
radius: 4
border.width: 1
border.color: "#555555"
}
contentItem: Text {
text: parent.text
color: win.selectedLanguage === "es" ? "#000000" : "#cccccc"
font.pixelSize: 11
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: win.switchLanguage("es")
}
}
// File list
Text {
text: "Files"
color: "#66ccff"
font.pixelSize: 14
font.bold: true
}
ScrollView {
width: parent.width
height: parent.height - 160
clip: true
ListView {
id: filesList
model: filesModel
spacing: 4
delegate: Rectangle {
property string fileName: model.filename || ""
property string cleanName: model.clean_name || fileName
property string fileTitle: model.title || ""
width: filesList.width - 20
height: 40
radius: 6
color: win.selectedFile === fileName ? "#66ccff" : "transparent"
border.width: 1
border.color: win.selectedFile === fileName ? "#66ccff" : "#333333"
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: parent.border.color = "#66ccff"
onExited: parent.border.color = win.selectedFile === fileName ? "#66ccff" : "#333333"
onClicked: {
if (fileName) {
win.loadFileContent(fileName);
}
}
}
Column {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 12
anchors.rightMargin: 12
Text {
text: cleanName || fileName || "Unknown file"
color: win.selectedFile === fileName ? "#000000" : "#ffffff"
font.pixelSize: 13
font.bold: true
width: parent.width
elide: Text.ElideRight
}
Text {
text: fileTitle || ""
color: win.selectedFile === fileName ? "#333333" : "#cccccc"
font.pixelSize: 10
width: parent.width
elide: Text.ElideRight
visible: text !== ""
}
}
}
}
}
}
}
// Main content area
Rectangle {
id: contentArea
width: parent.width - sidebar.width - 16
height: parent.height
radius: 8
color: "#BB111111"
border.width: 1
border.color: "#444444"
Column {
anchors.fill: parent
anchors.margins: 16
spacing: 12
// Search bar
Rectangle {
width: parent.width
height: 36
radius: 6
border.width: 1
border.color: "#66ccff"
color: "#BB000000"
Row {
anchors.fill: parent
anchors.margins: 8
spacing: 8
Rectangle {
width: parent.width - 220
height: parent.height
color: "transparent"
TextInput {
id: searchInput
anchors.fill: parent
anchors.margins: 4
color: "white"
font.pixelSize: 14
onTextChanged: {
win.searchQuery = text;
win.updateSearch();
}
Keys.onPressed: (ev) => {
if (ev.key === Qt.Key_N || ev.key === Qt.Key_Right) { win.gotoNextMatch(); ev.accepted = true; }
else if (ev.key === Qt.Key_P || ev.key === Qt.Key_Left) { win.gotoPrevMatch(); ev.accepted = true; }
}
}
Text {
text: "Search in file..."
color: "#88ffffff"
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 8
visible: searchInput.text.length === 0
}
}
Text {
text: (win.searchCount > 0 ? "[" + (win.currentMatchIndex + 1) + "/" + win.searchCount + "]" : "[0/0]")
color: win.searchCount > 0 ? "#00e676" : "#ff5252"
font.pixelSize: 14
verticalAlignment: Text.AlignVCenter
}
Item {
width: 5
height: 1
}
Button {
text: "Prev"
width: 60
height: parent.height - 4
onClicked: win.gotoPrevMatch()
enabled: win.searchCount > 0
background: Rectangle {
color: parent.enabled ? "#333333" : "#222222"
radius: 4
border.width: 1
border.color: "#555555"
}
contentItem: Text {
text: parent.text
color: parent.enabled ? "#ffffff" : "#888888"
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
Button {
text: "Next"
width: 60
height: parent.height - 4
onClicked: win.gotoNextMatch()
enabled: win.searchCount > 0
background: Rectangle {
color: parent.enabled ? "#333333" : "#222222"
radius: 4
border.width: 1
border.color: "#555555"
}
contentItem: Text {
text: parent.text
color: parent.enabled ? "#ffffff" : "#888888"
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
CheckBox {
id: matchesToggle
text: "Matches"
checked: true
anchors.verticalCenter: parent.verticalCenter
}
}
}
// Content and matches view
Row {
id: contentRow
width: parent.width
height: parent.height - 48
spacing: 12
// Main content
ScrollView {
id: contentScroll
width: matchesPanel.visible ? parent.width - matchesPanel.width - 12 : parent.width
height: parent.height
clip: true
TextEdit {
id: contentDisplay
text: win.displayedContent
textFormat: TextEdit.RichText
color: "#ffffff"
font.family: "monospace"
font.pixelSize: 13
readOnly: true
selectByMouse: true
wrapMode: TextEdit.Wrap
persistentSelection: true
Keys.onPressed: (ev) => {
if (ev.key === Qt.Key_N || ev.key === Qt.Key_Right) { win.gotoNextMatch(); ev.accepted = true; }
else if (ev.key === Qt.Key_P || ev.key === Qt.Key_Left) { win.gotoPrevMatch(); ev.accepted = true; }
}
}
}
// Matches panel
Rectangle {
id: matchesPanel
width: visible ? 320 : 0
height: parent.height
radius: 6
color: "#BB000000"
border.width: 1
border.color: "#555555"
visible: win.searchCount > 0 && matchesToggle.checked
Column {
anchors.fill: parent
anchors.margins: 8
spacing: 8
Text {
text: "Matches (" + win.searchCount + ")"
color: "#66ccff"
font.pixelSize: 13
font.bold: true
}
ScrollView {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
clip: true
ListView {
id: matchesList
model: matchesModel
spacing: 6
delegate: Rectangle {
property int matchIndex: model.idx || index
property string snippet: model.snippet || ""
width: matchesList.width - 12
height: Math.min(snippetText.implicitHeight + 16, 100)
radius: 6
color: win.currentMatchIndex === matchIndex ? "#66ccff" : "transparent"
border.width: 1
border.color: win.currentMatchIndex === matchIndex ? "#66ccff" : "#333333"
MouseArea {
anchors.fill: parent
onClicked: win.jumpToMatch(matchIndex)
}
Column {
anchors.fill: parent
anchors.margins: 8
spacing: 4
Text {
text: "#" + (matchIndex + 1)
color: win.currentMatchIndex === matchIndex ? "#000000" : "#bbbbbb"
font.pixelSize: 10
}
Text {
id: snippetText
text: snippet
textFormat: Text.PlainText
color: win.currentMatchIndex === matchIndex ? "#000000" : "#dddddd"
font.pixelSize: 11
wrapMode: Text.Wrap
elide: Text.ElideRight
}
}
}
}
}
}
}
}
}
}
}
}
}
QML_TEMPLATE
# Prepare QML runtime environment (Qt6)
export QT_QPA_PLATFORM="wayland;xcb"
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export QT_PLUGIN_PATH="${pkgs.qt6.qtbase}/lib/qt-6/plugins:${pkgs.qt6.qtwayland}/lib/qt-6/plugins"
export QML_IMPORT_PATH="${pkgs.qt6.qtbase}/lib/qt-6/qml:${pkgs.qt6.qtdeclarative}/lib/qt-6/qml:${pkgs.qt6.qt5compat}/lib/qt-6/qml:${pkgs.qt6.qtsvg}/lib/qt-6/qml"
export QML2_IMPORT_PATH="$QML_IMPORT_PATH"
export QML_XHR_ALLOW_FILE_READ="1"
QML_BIN="${pkgs.qt6.qtdeclarative}/bin/qml"
if ! [ -x "$QML_BIN" ]; then
if [ -x "${pkgs.qt6.qtdeclarative}/bin/qml6" ]; then
QML_BIN="${pkgs.qt6.qtdeclarative}/bin/qml6"
elif command -v qml >/dev/null 2>&1; then
QML_BIN=$(command -v qml)
elif command -v qml6 >/dev/null 2>&1; then
QML_BIN=$(command -v qml6)
elif command -v qmlscene >/dev/null 2>&1; then
QML_BIN=$(command -v qmlscene)
fi
fi
# Debug mode: run QML directly and do not filter output
if [ -n "''${QS_DEBUG:-}" ]; then
{
echo "[qs-cheatsheets] CATEGORY=$CATEGORY" >&2
echo "[qs-cheatsheets] LANGUAGE=$LANGUAGE" >&2
echo "[qs-cheatsheets] QML_BIN=$QML_BIN" >&2
echo "[qs-cheatsheets] QML_FILE=$qml" >&2
} || true
[ -n "''${QS_PERF:-}" ] && echo "[perf] pre_qml_ms=$(( $(now_ms) - t2 ))" >&2
exec "$QML_BIN" "$qml"
fi
# Run QML runtime
[ -n "''${QS_PERF:-}" ] && echo "[perf] pre_qml_ms=$(( $(now_ms) - t2 ))" >&2
output=$({ "$QML_BIN" "$qml" 2>&1 || true; })
# Handle any output if needed
if [ -n "''${output:-}" ]; then
echo "$output"
fi
''