47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path, notes
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | notes | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| powertoys_config_path | function | py | infra | 1.0.0 | pure | def powertoys_config_path(user: str | None = None) -> str | Devuelve el path al default.json de PowerToys Keyboard Manager. Soporta WSL, Windows nativo y override via env var POWERTOYS_CONFIG. |
|
false |
|
|
Path absoluto al archivo default.json de PowerToys Keyboard Manager (el archivo puede no existir). | false | python/functions/infra/powertoys_config_path.py | Clasificada como pure por convencion del registry: sin estado mutable, determinista dado el entorno. Lee env vars ($POWERTOYS_CONFIG, $USER, $LOCALAPPDATA, $WSL_DISTRO_NAME) que se tratan como parametros implicitos del entorno — comportamiento identico al de funciones puras de configuracion. Prioridad de resolucion: (1) $POWERTOYS_CONFIG override, (2) WSL path con /mnt/c, (3) Windows nativo. |
Ejemplo
from infra.powertoys_config_path import powertoys_config_path
# WSL con usuario actual
path = powertoys_config_path()
# => /mnt/c/Users/lucas/AppData/Local/Microsoft/PowerToys/Keyboard Manager/default.json
# Override explicito
import os
os.environ["POWERTOYS_CONFIG"] = "/tmp/test_powertoys.json"
path = powertoys_config_path()
# => /tmp/test_powertoys.json
Notas
Detecta WSL verificando /mnt/c y las variables WSL_DISTRO_NAME / WSLENV.
En Windows nativo usa %LOCALAPPDATA%. El archivo puede no existir si PowerToys no esta instalado.