feat(power): integrate tlp and add battery management functions

This commit introduces a complete battery management solution by integrating TLP into the setup scripts and providing convenient control functions in Zsh.

Key changes:
- Adds `eco-batt` and `full-batt` functions to `.zshrc` to allow the user to easily switch between battery-saving (80%) and full-charge (100%) modes.
- Modifies `modules/apps.sh` to automatically install the `tlp` package.
- Adds logic to `modules/apps.sh` to enable and start the `tlp.service` so that power management is active on boot.
- Updates the `zsh-help` function to include documentation for the new battery management commands.
This commit is contained in:
google-labs-jules[bot]
2025-11-19 19:21:46 +00:00
parent b3575b69e7
commit c03e49d683
2 changed files with 37 additions and 0 deletions

View File

@@ -160,6 +160,7 @@ run_module_main() {
git curl wget base-devel unzip htop fastfetch btop
vim nano tmux xdg-utils xdg-user-dirs stow
gnome-keyring libsecret seahorse openssh rsync usbutils
tlp
)
# Paquetes para desarrollo de software.
local PACMAN_DEV=(
@@ -343,6 +344,13 @@ EOF
sudo systemctl enable --now teamviewerd.service 2>/dev/null || true
log_success "TeamViewer daemon habilitado e iniciado"
fi
if command_exists tlp; then
log_info "Habilitando servicio TLP para gestión de energía..."
sudo systemctl enable tlp.service 2>/dev/null || true
sudo systemctl start tlp.service 2>/dev/null || true
log_success "TLP habilitado e iniciado."
fi
log_success "Aplicaciones instaladas correctamente"
return 0