feat(theme,display,wm,power,make): add Anodized theme, editors, multi-monitor arrangement, power timeouts, bar compaction, and replace state preservation

- Replace deprecated AnodeDefault with dark-silvery Anodized default theme
- Add interactive theme editor, duplicator, and non-standard .xth importer to anode-themes (+ CLI --install)
- Fix multi-monitor dwm/lock/vkbd/EDID edge cases and integrate monitor arrangement + 15s revert into anode-display and anode-apply-display
- Gate anode-touchd behind WITH_TOUCHD=1 (keeping anode-vkbd unconditional) and add help/rebuild/install-touch/install-system targets to Makefile
- Add idle screen dim, lock, suspend, and suspend-on-AC timeout controls to anode-power and anode-display backed by power.conf + SIGUSR1
- Prevent lockscreen subtitle overflow and progressively compact status bar segments so focused window titles remain visible
- Preserve workspaces, active desktop, monitor state, floating/fullscreen states, and focus across anode-replace and restarts
This commit is contained in:
Luxferre committed 2026-11-27 08:31:35 +02:00
1 parent bb81541b42
commit 4ec3f59e02
40 files changed
+5843 -768

No files matched your search

+56 -5
View File
@@ -647,6 +647,11 @@ def test_lockscreen_overlaps_systray():
lock_win = wait_until(find_lock_win)
assert lock_win, "anode-lock window did not map"
la = XWindowAttributes()
assert X11.XGetWindowAttributes(dpy, lock_win, ctypes.byref(la))
assert la.x == 0 and la.y == 0 and la.width == 1280 and la.height == 800, (
la.x, la.y, la.width, la.height
)
# Trigger systray updates while locked: dock a 2nd icon and reload dwm via SIGUSR1
dock_dummy_icon()
@@ -1183,7 +1188,7 @@ def test_wine_take_focus_workspace_switch():
env=env, check=True)
time.sleep(0.25)
# Phase 2: switch away to Tag 2 via Super_L + 2, wait, then return via bar Tag 1 click (x=50, y=10)
# Phase 2: switch away to Tag 2 via Super_L + 2, wait, then return via bar Tag 1 click (x=38, y=10)
subprocess.run(["xdotool", "keydown", "Super_L"], env=env, check=True)
time.sleep(0.06)
subprocess.run(["xdotool", "key", "2"], env=env, check=True)
@@ -1192,7 +1197,7 @@ def test_wine_take_focus_workspace_switch():
time.sleep(0.25)
subprocess.run(["xdotool", "mousemove", "400", "400", "click", "1"], env=env, check=True)
time.sleep(0.2)
subprocess.run(["xdotool", "mousemove", "50", "10", "click", "1"], env=env, check=True)
subprocess.run(["xdotool", "mousemove", "38", "10", "click", "1"], env=env, check=True)
time.sleep(0.3)
subprocess.run(["xdotool", "mousemove", "520", "480", "click", "1", "mousemove", "720", "320", "key", "b"],
env=env, check=True)
@@ -1711,7 +1716,7 @@ def test_live_theme_reload_and_bar_artifacts():
env.get("PATH", "")
)
subprocess.run([os.path.join(ROOT, "scripts", "anode-apply-scale"), "1.00", "--touch=0"], env=env, check=True)
subprocess.run([os.path.join(ROOT, "scripts", "anode-apply-theme"), "AnodeDefault"], env=env, check=True)
subprocess.run([os.path.join(ROOT, "scripts", "anode-apply-theme"), "Anodized"], env=env, check=True)
xvfb = subprocess.Popen(
["Xvfb", disp, "-noreset", "-screen", "0", "1280x800x24", "-nolisten", "tcp"],
@@ -1816,8 +1821,8 @@ def test_live_theme_reload_and_bar_artifacts():
)
return res
# Phase 1: Initial AnodeDefault
check_palette("AnodeDefault", {0x11161F, 0x2B5278}, 0x0B0E14, 0x0B0E14)
# Phase 1: Initial Anodized
check_palette("Anodized", {0x0E1014, 0x38414F}, 0x08090B, 0x08090B)
# Phase 2: Switch to SolarizedLight via anode-apply-theme with ANODE_NO_SIGNAL=1
# (must propagate purely via xrdb -load + live XA_RESOURCE_MANAGER lookup!)
@@ -1851,6 +1856,50 @@ def test_live_theme_reload_and_bar_artifacts():
terminate(xvfb)
def test_themes_cli_install_and_arrange_smoke():
disp = pick_display()
with tempfile.TemporaryDirectory() as home:
env = dict(os.environ)
env["DISPLAY"] = disp
env["HOME"] = home
env["XDG_CONFIG_HOME"] = os.path.join(home, ".config")
env["ANODE_PREFIX"] = ROOT
env["LD_LIBRARY_PATH"] = os.path.join(BUILD, "libgemui") + (":" + env["LD_LIBRARY_PATH"] if env.get("LD_LIBRARY_PATH") else "")
src_xth = os.path.join(home, "NonStandardDir", "SilverSmoke.xth")
os.makedirs(os.path.dirname(src_xth))
with open(src_xth, "w", encoding="utf-8") as f:
f.write("theme.name: SilverSmoke\ntheme.bgMain: #0a0b0e\ntheme.fgMain: #e0e5ec\ntheme.accent: #cfd6e0\n")
inst = subprocess.run(
[os.path.join(BUILD, "apps", "anode-themes"), "--install", src_xth, "SmokeCustom"],
env=env, capture_output=True, text=True, check=True,
)
installed_p = os.path.join(home, ".config", "anode", "themes", "SmokeCustom.xth")
assert os.path.isfile(installed_p), inst.stdout
xvfb = subprocess.Popen(
["Xvfb", disp, "-noreset", "-screen", "0", "1440x900x24", "-nolisten", "tcp"],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
)
dpy = None
proc = None
try:
dpy = wait_until(lambda: X11.XOpenDisplay(disp.encode()))
assert dpy, f"Failed to open Xvfb {disp}"
proc = subprocess.Popen(
[os.path.join(BUILD, "apps", "anode-display"), "--arrange"],
env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
)
time.sleep(0.4)
assert proc.poll() is None, f"anode-display --arrange exited with {proc.returncode}"
finally:
terminate(proc)
if dpy:
X11.XCloseDisplay(dpy)
terminate(xvfb)
def main():
if not shutil.which("Xvfb"):
print("test_x11_xvfb: Xvfb not installed (skipping)")
@@ -1879,6 +1928,8 @@ def main():
print("test_x11_xvfb: systray XEmbed dock/map race OK")
test_live_theme_reload_and_bar_artifacts()
print("test_x11_xvfb: live theme reload & bar artifact check OK")
test_themes_cli_install_and_arrange_smoke()
print("test_x11_xvfb: anode-themes --install & anode-display --arrange smoke OK")
return 0