feat: scaffold conky_widget desktop monitor
Conky (X11 + Lua + Cairo) desktop widget with three clickable tabs (Red / Sistema / Docker) rendered entirely with Cairo: - Red: live down/up speed for enp5s0, 60s history graph, active connections count, totals, and launcher buttons for Wireshark, ntopng and nethogs (with notify-send fallback when missing). - Sistema: total CPU + per-core bars, RAM, swap, root disk usage, temperature, load average and uptime. - Docker: running/total container count and active container names (read without sudo). Includes install.sh (symlink into ~/.config/conky + XFCE autostart), launch.sh (tool launcher with missing-binary fallback) and app.md with e2e_checks. Positioned top-right of the primary monitor (xinerama_head 0), configurable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+47
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
# Instala conky_widget: enlaza la config en ~/.config/conky, registra el
|
||||
# autostart de XFCE y deja el widget listo para arrancar.
|
||||
#
|
||||
# Idempotente: se puede ejecutar varias veces sin efectos duplicados.
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
CONKY_DIR="$HOME/.config/conky"
|
||||
LINK="$CONKY_DIR/conky_widget"
|
||||
AUTOSTART_DIR="$HOME/.config/autostart"
|
||||
DESKTOP="$AUTOSTART_DIR/conky_widget.desktop"
|
||||
CONF="$LINK/conky.conf"
|
||||
|
||||
echo "==> conky_widget install"
|
||||
|
||||
# 1. Comprobar dependencia
|
||||
if ! command -v conky >/dev/null 2>&1; then
|
||||
echo "ERROR: conky no esta instalado. Instalar: sudo apt install conky-all" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 2. Enlazar la app dentro de ~/.config/conky (ruta estable para la config)
|
||||
mkdir -p "$CONKY_DIR"
|
||||
ln -sfn "$SCRIPT_DIR" "$LINK"
|
||||
echo " symlink: $LINK -> $SCRIPT_DIR"
|
||||
|
||||
# 3. Permisos de ejecucion para los scripts
|
||||
chmod +x "$SCRIPT_DIR/lua/launch.sh" "$SCRIPT_DIR/install.sh" 2>/dev/null || true
|
||||
|
||||
# 4. Autostart de XFCE (espera 5s a que el compositor este listo)
|
||||
mkdir -p "$AUTOSTART_DIR"
|
||||
cat > "$DESKTOP" <<EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Conky Widget
|
||||
Comment=Visualizador de escritorio con pestañas (Red / Sistema / Docker)
|
||||
Exec=sh -c "sleep 5; exec conky -c '$CONF'"
|
||||
Terminal=false
|
||||
X-GNOME-Autostart-enabled=true
|
||||
EOF
|
||||
echo " autostart: $DESKTOP"
|
||||
|
||||
echo "==> Listo."
|
||||
echo " Arrancar ahora: conky -c '$CONF' &"
|
||||
echo " Parar: pkill -f conky_widget/conky.conf"
|
||||
echo " Monitor: editar xinerama_head en conky.conf (0=HDMI-0, 1=DP-1)"
|
||||
Reference in New Issue
Block a user