Integrar TLP y añadir funciones de gestión de batería (#15)

* refactor(zsh): rename help function to zsh-help

This commit refactors the Zsh help function based on user feedback.

The following changes have been made:
- The function `zsh_ayuda` has been renamed to `zsh_help`.
- The alias `ayuda` has been updated to `zsh-help`.
- The help text within the function has been updated to reflect the new command name.

* 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.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Marco Gallegos <marco.gallegos@outlook.com>
This commit is contained in:
google-labs-jules[bot]
2025-11-19 13:22:25 -06:00
committed by GitHub
parent 8c12cdad14
commit 4b30ecaffa

View File

@@ -160,6 +160,7 @@ run_module_main() {
git curl wget base-devel unzip htop fastfetch btop git curl wget base-devel unzip htop fastfetch btop
vim nano tmux xdg-utils xdg-user-dirs stow vim nano tmux xdg-utils xdg-user-dirs stow
gnome-keyring libsecret seahorse openssh rsync usbutils gnome-keyring libsecret seahorse openssh rsync usbutils
tlp
) )
# Paquetes para desarrollo de software. # Paquetes para desarrollo de software.
local PACMAN_DEV=( local PACMAN_DEV=(
@@ -344,6 +345,13 @@ EOF
log_success "TeamViewer daemon habilitado e iniciado" log_success "TeamViewer daemon habilitado e iniciado"
fi 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" log_success "Aplicaciones instaladas correctamente"
return 0 return 0
} }