Fix PMIC/SPM deep-sleep wakeups and backport DE fixes, Anodized theme, and theme editor

- kernel: add 0013-gemini-pmic-wake-and-spm-safety.patch to arm MT6397/MT6351 wake IRQs in late suspend and enable PCM WDT, IM wait, and CNTP backstop on s.sleep
- geminux-powerd: distinguish real input/lid-open wakes from spurious open-lid wakes and re-suspend cleanly on battery timer wakes
- DE/WM: backport systray (32-bit ARGB, XEmbed race fix, lockscreen stacking), NETWM/EWMH/ICCCM and Wine/DXVK focus fixes, bar drawing fixes, and live Xresources reload across dwm, drw, st, libgemui, geminux-apply-theme, and geminux-session
- themes: backport Anodized.xth, geminux-xth.h, and interactive geminux-themes editor/importer (--install), rebuild prebuilt binaries/kernel modules, and update verification scripts
This commit is contained in:
Luxferre committed 2026-11-27 16:32:50 +02:00
1 parent f65dbb28a2
commit 6fcc263256
28 files changed
+3802 -355

No files matched your search

@@ -0,0 +1,96 @@
! Geminux Unified Theme: Anodized (Obsidian & brushed silver, brass-amber highlight, Fira Code + Nerd Fonts)
theme.name: Anodized
theme.isDark: 1
theme.fontFace: Fira Code
theme.uiFontFace: Roboto
theme.iconFontFace: DejaVuSansM Nerd Font
theme.baseFontSize: 32
theme.gtkTheme: Geminux-Anodized
theme.qtTheme: Fusion
theme.iconTheme: Adwaita
*TkTheme: gtkTtk
Xft.dpi: 192
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.rgba: rgb
Xcursor.theme: default
Xcursor.size: 64
theme.bgMain: #08090b
theme.bgBar: #0e1014
theme.bgHeader: #12151a
theme.bgFooter: #0b0d11
theme.bgOverlay: #171b22
theme.bgAltEven: #101318
theme.bgAltOdd: #14181f
theme.bgInput: #161a21
theme.bgInputFocus: #1e232c
theme.bgButton: #1c212a
theme.bgSearch: #191e27
theme.bgBubbleIn: #181d25
theme.bgBubbleOut: #252c38
theme.bgToast: #1c222b
theme.fgMain: #e4e8ee
theme.fgBright: #f5f7fa
theme.fgMuted: #89929f
theme.selBg: #38414f
theme.selFg: #f5f7fa
theme.accent: #cfd6e0
theme.accentAlt: #e5eaf0
theme.highlight: #e2bc72
theme.border: #2d3440
theme.divider: #20252f
theme.success: #79cf9c
theme.info: #9eb3c8
theme.warning: #e2bc72
theme.danger: #e07a7a
theme.dangerBg: #3f1d20
dwm.borderpx: 4
dwm.font: Fira Code, DejaVuSansM Nerd Font 38px
dwm.background: #0e1014
dwm.foreground: #e4e8ee
dwm.border: #2d3440
dwm.selbackground: #38414f
dwm.selforeground: #f5f7fa
dwm.selborder: #cfd6e0
dwm.normbgcolor: #0e1014
dwm.normfgcolor: #e4e8ee
dwm.normbordercolor: #2d3440
dwm.selbgcolor: #38414f
dwm.selfgcolor: #f5f7fa
dwm.selbordercolor: #cfd6e0
dmenu.font: Fira Code, DejaVuSansM Nerd Font 40px
dmenu.background: #12151a
dmenu.foreground: #e4e8ee
dmenu.selbackground: #38414f
dmenu.selforeground: #f5f7fa
dmenu.outbackground: #191e27
dmenu.outforeground: #cfd6e0
dmenu.highlight: #e2bc72
st.font: Fira Code:pixelsize=44:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color
st.background: #08090b
st.foreground: #e4e8ee
st.cursorColor: #cfd6e0
st.revCursorColor: #08090b
st.color0: #08090b
st.color1: #d97878
st.color2: #79cf9c
st.color3: #e2bc72
st.color4: #8ba6c4
st.color5: #b39bc8
st.color6: #84b8be
st.color7: #d5dce4
st.color8: #5b6370
st.color9: #eb9494
st.color10: #96deb3
st.color11: #edd092
st.color12: #a6bdd6
st.color13: #cab5dc
st.color14: #a2cdd2
st.color15: #f5f7fa
+108 -12
View File
@@ -1,27 +1,103 @@
#!/bin/sh
# Apply a Geminux .xth theme across .Xresources, xrdb, dunst, GTK2/3/4, Qt, Tk, dwm, st, and libgemui apps.
# Apply or install a Geminux .xth theme across .Xresources, xrdb, dunst, GTK2/3/4, Qt, Tk, dwm, st, and libgemui apps.
set -eu
HOME_DIR="${HOME:-/home/user}"
THEME_DIR="$HOME_DIR/.xthemes"
TARGET="${1:-}"
USER_THEME_DIR="${XDG_CONFIG_HOME:-$HOME_DIR/.config}/geminux/themes"
INSTALL_SRC=""
INSTALL_NAME=""
TARGET=""
if [ "${1:-}" = "--install" ]; then
if [ $# -lt 2 ] || [ -z "${2:-}" ]; then
echo "Error: --install requires a .xth file path" >&2
exit 1
fi
INSTALL_SRC="$2"
INSTALL_NAME="${3:-}"
else
TARGET="${1:-}"
fi
sanitize_theme_name() {
printf '%s' "$1" | tr -c 'A-Za-z0-9_-' '_' | sed 's/^_*//; s/_*$//'
}
if [ -n "$INSTALL_SRC" ]; then
if [ ! -f "$INSTALL_SRC" ] || [ ! -r "$INSTALL_SRC" ]; then
echo "Error: cannot read theme file '$INSTALL_SRC'" >&2
exit 1
fi
if ! awk '
{
s = $0
gsub(/^[ \t\r\n]+|[ \t\r\n]+$/, "", s)
if (s == "" || substr(s, 1, 1) == "!" || substr(s, 1, 1) == "#") next
if (index(s, ":") > 1) { ok = 1; exit }
}
END { exit(ok ? 0 : 1) }
' "$INSTALL_SRC"; then
echo "Error: invalid .xth theme file '$INSTALL_SRC'" >&2
exit 1
fi
if [ -z "$INSTALL_NAME" ]; then
INSTALL_NAME="$(awk -F: '/^theme\.name[[:space:]]*:/ { sub(/^[[:space:]]+/, "", $2); sub(/[ \t\r\n]+$/, "", $2); print $2; exit }' "$INSTALL_SRC" || true)"
fi
if [ -z "$INSTALL_NAME" ]; then
INSTALL_NAME="$(basename "$INSTALL_SRC" .xth)"
fi
SAFE_NAME="$(sanitize_theme_name "$INSTALL_NAME")"
if [ -z "$SAFE_NAME" ] || [ "$SAFE_NAME" = "." ] || [ "$SAFE_NAME" = ".." ]; then
echo "Error: invalid target theme name" >&2
exit 1
fi
mkdir -p "$USER_THEME_DIR"
DEST_XTH="$USER_THEME_DIR/$SAFE_NAME.xth"
TMP_INST="$DEST_XTH.tmp.$$"
awk -v tname="$SAFE_NAME" '
BEGIN { had_name = 0 }
/^theme\.name[[:space:]]*:/ {
if (!had_name) {
printf "theme.name: %s\n", tname
had_name = 1
}
next
}
{ print $0 }
END {
if (!had_name) printf "theme.name: %s\n", tname
}
' "$INSTALL_SRC" > "$TMP_INST"
mv -f "$TMP_INST" "$DEST_XTH"
TARGET="$DEST_XTH"
fi
if [ -z "$TARGET" ]; then
if [ -d "$THEME_DIR" ]; then
ls -1 "$THEME_DIR"/*.xth 2>/dev/null | xargs -r -n1 basename | sed 's/\.xth$//'
fi
for _dir in "$USER_THEME_DIR" "$THEME_DIR" "/etc/skel/.xthemes"; do
if [ -d "$_dir" ]; then
ls -1 "$_dir"/*.xth 2>/dev/null || true
fi
done | xargs -r -n1 basename | sed 's/\.xth$//' | awk '!seen[$0]++' | sort
exit 0
fi
if [ -f "$TARGET" ]; then
THEME_FILE="$TARGET"
elif [ -f "$THEME_DIR/$TARGET.xth" ]; then
THEME_FILE="$THEME_DIR/$TARGET.xth"
elif [ -f "/etc/skel/.xthemes/$TARGET.xth" ]; then
THEME_FILE="/etc/skel/.xthemes/$TARGET.xth"
elif [ -f "$TARGET.xth" ]; then
THEME_FILE="$TARGET.xth"
else
echo "Error: theme '$TARGET' not found in $THEME_DIR" >&2
exit 1
_base="$(basename "$TARGET" .xth)"
if [ -f "$USER_THEME_DIR/$_base.xth" ]; then
THEME_FILE="$USER_THEME_DIR/$_base.xth"
elif [ -f "$THEME_DIR/$_base.xth" ]; then
THEME_FILE="$THEME_DIR/$_base.xth"
elif [ -f "/etc/skel/.xthemes/$_base.xth" ]; then
THEME_FILE="/etc/skel/.xthemes/$_base.xth"
else
echo "Error: theme '$TARGET' not found in $USER_THEME_DIR or $THEME_DIR" >&2
exit 1
fi
fi
cp -f "$THEME_FILE" "$HOME_DIR/.Xresources"
@@ -29,7 +105,27 @@ cp -f "$THEME_FILE" "$HOME_DIR/.Xresources"
/usr/bin/geminux-sync-gtk-theme --skip-xrdb
if [ -n "${DISPLAY:-}" ] && command -v xrdb >/dev/null 2>&1; then
xrdb -nocpp -merge "$HOME_DIR/.Xresources" >/dev/null 2>&1 || true
xrdb -nocpp -load "$HOME_DIR/.Xresources" >/dev/null 2>&1 || true
fi
if [ -n "${DISPLAY:-}" ] && [ "${GEMINUX_NO_SIGNAL:-0}" != "1" ]; then
_pids="$( (ps -eo pid=,comm= 2>/dev/null || ps -ax -o pid=,comm= 2>/dev/null || true) | awk '
{
pid = $1; cmd = $2
sub(/^.*\//, "", cmd)
if (cmd == "dwm" || cmd == "st" || cmd == "geminux-statusd" ||
cmd == "geminux-themes" || cmd == "geminux-control" ||
cmd == "geminux-net" || cmd == "geminux-audio" ||
cmd == "geminux-datetime" || cmd == "geminux-lock") {
print "USR1 " pid
}
}
' )"
if [ -n "${_pids:-}" ]; then
printf '%s\n' "$_pids" | while read -r _sig _p; do
[ -n "${_p:-}" ] && kill -"$_sig" "$_p" 2>/dev/null || true
done
fi
fi
# Signal live applications (dwm, st, webarchy, libgemui apps) to reload .Xresources via SIGUSR1
+7 -1
View File
@@ -18,10 +18,16 @@ if [ ! -f "$HOME_DIR/.Xresources" ] || \
[ -d /etc/skel/.xthemes ] && rm -rf "$HOME_DIR/.xthemes" && cp -a /etc/skel/.xthemes "$HOME_DIR/.xthemes"
elif [ ! -d "$HOME_DIR/.xthemes" ] && [ -d /etc/skel/.xthemes ]; then
cp -a /etc/skel/.xthemes "$HOME_DIR/.xthemes"
elif [ -d /etc/skel/.xthemes ]; then
for _xth in /etc/skel/.xthemes/*.xth; do
[ -f "$_xth" ] || continue
_base="$(basename "$_xth")"
[ -f "$HOME_DIR/.xthemes/$_base" ] || cp -f "$_xth" "$HOME_DIR/.xthemes/$_base"
done
fi
if [ -f "$HOME_DIR/.Xresources" ] && command -v xrdb >/dev/null 2>&1; then
xrdb -merge "$HOME_DIR/.Xresources" 2>/dev/null || true
xrdb -nocpp -load "$HOME_DIR/.Xresources" 2>/dev/null || true
fi
if command -v xrandr >/dev/null 2>&1; then