mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 04:24:31 +00:00
- Add merlin.prole.org (10.0.0.6) to inventory (k3s_hosts, mariadb_primary) - Relax k3s preflight: /var/lib/rancher no longer requires iSCSI, only blocks SD-backed storage - Add netplan static IP role (NetworkManager) and MariaDB primary/replica roles + site.yml ordering - Add/upgrade USB prep tooling (prepare_mariadb_usb.sh + generated setup.sh + fstab-by-LABEL) Co-authored-by: Junie <junie@jetbrains.com>
49 lines
1.3 KiB
Bash
49 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Create a temp conky config file
|
|
CFG="$(mktemp /tmp/conky-dashboard.XXXXXX.conf)"
|
|
cleanup() { rm -f "$CFG"; }
|
|
trap cleanup EXIT
|
|
|
|
cat >"$CFG" <<'EOF'
|
|
conky.config = {
|
|
update_interval = 1,
|
|
double_buffer = true,
|
|
background = false, -- foreground so Ctrl-C works
|
|
|
|
own_window = false, -- draw on root window
|
|
use_xft = true,
|
|
font = "DejaVu Sans Mono:size=16",
|
|
default_color = "AAAAAA",
|
|
|
|
alignment = "middle_middle",
|
|
gap_x = 0, gap_y = 0,
|
|
};
|
|
|
|
conky.text = [[
|
|
${font DejaVu Sans Mono:size=26}${color 777777}${nodename}${color}${font}
|
|
${color 666666}Uptime:${color} $uptime
|
|
${color 666666}Load:${color} $loadavg
|
|
|
|
${color 666666}CPU:${color} ${cpu}% ${color 444444}${cpubar 14,700}${color}
|
|
|
|
${color 666666}RAM:${color} $mem/$memmax ($memperc%) ${color 444444}${membar 14,700}${color}
|
|
|
|
${color 666666}Disk /:${color} ${fs_used /}/${fs_size /} ${color 444444}${fs_bar 14,700 /}${color}
|
|
|
|
${color 666666}Procs:${color} $processes ${color 666666}Running:${color} $running_processes
|
|
]];
|
|
EOF
|
|
|
|
# Start X just for this dashboard. Conky runs in the foreground; Ctrl-C exits X.
|
|
exec xinit /usr/bin/env bash -lc '
|
|
# Disable screen blanking + power management
|
|
xset s off
|
|
xset -dpms
|
|
xset s noblank
|
|
|
|
xsetroot -solid "#202020"
|
|
exec conky -c "'"$CFG"'"
|
|
' -- :0
|