|

hammerhead-desktop 1.7.0: live desktop config (updates always take)

hammerhead-desktop 1.7.0: live desktop config (updates always take)

The old hh-desktop-init copied the whole openbox/tint2/conky config into
~/.config, so package updates went stale (a user's seeded menu/rc/tint2rc
shadowed the system ones). Fix: seed NOTHING except the openbox autostart, and
make even that a SYMLINK to the live system file.
- hh-desktop-init: ~/.config/openbox/autostart -> symlink to
  /usr/local/etc/xdg/openbox/autostart (migrates legacy copies). Nothing else.
- rc.xml/menu.xml/tint2rc resolve live from /usr/local/etc/xdg via
  XDG_CONFIG_DIRS; autostart launches conky with an explicit -c system path.
So all desktop config is now live and updates always take.
Author: Chris Tusa <chris.tusa@leafscale.com>
Date: Jul 24, 2026 14:30
Changeset: 9ffe493eb3e55d1fbc9611dd0a766fda320a5ee3
Branch: default

Diff

diff -r 1b5aaf6e10b5 -r 9ffe493eb3e5 base/hammerhead-desktop/autostart
--- a/base/hammerhead-desktop/autostart	Fri Jul 24 13:49:05 2026 -0500
+++ b/base/hammerhead-desktop/autostart	Fri Jul 24 14:30:24 2026 -0500
@@ -4,6 +4,8 @@
 # `openbox --restart` doesn't spawn duplicate panels.
 running() { ps -ef | grep -v grep | grep -q "$1"; }
 running "[p]icom" || picom --backend xrender -b 2>/dev/null &
+# tint2 finds its config live via XDG_CONFIG_DIRS; conky does NOT honor
+# XDG_CONFIG_DIRS, so give it the system config path explicitly (stays live).
 running "[t]int2" || tint2 &
-running "[c]onky" || conky &
+running "[c]onky" || conky -c @@PREFIX@@/etc/xdg/conky/conky.conf &
 feh --bg-fill @@PREFIX@@/share/backgrounds/hammerhead.png 2>/dev/null &
diff -r 1b5aaf6e10b5 -r 9ffe493eb3e5 base/hammerhead-desktop/hh-desktop-init
--- a/base/hammerhead-desktop/hh-desktop-init	Fri Jul 24 13:49:05 2026 -0500
+++ b/base/hammerhead-desktop/hh-desktop-init	Fri Jul 24 14:30:24 2026 -0500
@@ -1,24 +1,26 @@
 #!/bin/sh
-# hh-desktop-init - seed the user's ~/.config with the Hammerhead desktop
-# defaults if absent, then return. Called from the X session entrypoint
-# (xdm Xsession / ~/.xsession) BEFORE openbox-session.
+# hh-desktop-init - point the user's openbox autostart at the LIVE system
+# autostart so desktop-config updates ALWAYS take, with no per-user copies to
+# go stale. Called from the X session entrypoint before openbox-session.
+#
+# Why only the autostart: openbox-autostart (run by openbox-session) reads only
+# /etc/xdg/openbox/autostart or ~/.config/openbox/autostart -- NOT
+# XDG_CONFIG_DIRS -- so the autostart is the single desktop file that must live
+# under ~/.config. Everything else resolves live from /usr/local/etc/xdg via
+# XDG_CONFIG_DIRS (set by the X session): openbox rc.xml/menu.xml and tint2rc;
+# conky is launched by the autostart with an explicit -c path. So none of those
+# need a per-user copy.
 #
-# Why: openbox-autostart (run by openbox-session) only executes
-# /etc/xdg/openbox/autostart or ~/.config/openbox/autostart -- it does NOT
-# honor XDG_CONFIG_DIRS, so it never runs the autostart we ship under
-# /usr/local/etc/xdg. Likewise tint2/conky look in ~/.config first. A fresh
-# user (no ~/.config) therefore gets a bare desktop: no wallpaper, panel, or
-# monitor. This mirrors CrunchBang++/BunsenLabs, whose session copies the
-# default config from the system skel when the user has none.
-#
-# Copy-if-missing only: never clobbers a user's own customizations.
-TMPL=/usr/local/etc/xdg
-CFG="${XDG_CONFIG_HOME:-$HOME/.config}"
+# We make ~/.config/openbox/autostart a SYMLINK to the system autostart (not a
+# copy), so a package update to the autostart is picked up with no re-seed.
+# A pre-existing non-symlink here is treated as legacy seeded state and migrated
+# to the symlink.
+SYS=/usr/local/etc/xdg/openbox/autostart
+CFG="${XDG_CONFIG_HOME:-$HOME/.config}/openbox"
 
-for d in openbox tint2 conky; do
-	if [ ! -e "$CFG/$d" ] && [ -d "$TMPL/$d" ]; then
-		mkdir -p "$CFG/$d" 2>/dev/null || continue
-		cp -R "$TMPL/$d/." "$CFG/$d/" 2>/dev/null
-	fi
-done
+mkdir -p "$CFG" 2>/dev/null || exit 0
+if [ "$(readlink "$CFG/autostart" 2>/dev/null)" != "$SYS" ]; then
+	rm -f "$CFG/autostart" 2>/dev/null
+	ln -sf "$SYS" "$CFG/autostart" 2>/dev/null
+fi
 exit 0
diff -r 1b5aaf6e10b5 -r 9ffe493eb3e5 base/hammerhead-desktop/package.toml
--- a/base/hammerhead-desktop/package.toml	Fri Jul 24 13:49:05 2026 -0500
+++ b/base/hammerhead-desktop/package.toml	Fri Jul 24 14:30:24 2026 -0500
@@ -7,7 +7,7 @@
 
 [package]
 name = "hammerhead-desktop"
-version = "1.6.0"
+version = "1.7.0"
 release = 1
 description = "Zygaena marine-dark desktop branding: wallpaper, Openbox theme, tint2/conky configs, categorized menu w/ CBPP-style Places/Recent pipemenus + Shutdown/Reboot (pfexec zygctl), autostart"
 url = "https://git.sharkos.one/zygaena/hammerhead"