Initial commit: Geminux 0.1.0 (helio) for Planet Computers Gemini PDA (MT6797X)
This commit is contained in:
commit
034c1f61b1
816 files changed
+223435
No files matched your search
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
# Apply a Geminux .xth theme across .Xresources, xrdb, dunst, dwm, st, and libgemui apps.
|
||||
set -eu
|
||||
|
||||
HOME_DIR="${HOME:-/home/user}"
|
||||
THEME_DIR="$HOME_DIR/.xthemes"
|
||||
TARGET="${1:-}"
|
||||
|
||||
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
|
||||
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"
|
||||
else
|
||||
echo "Error: theme '$TARGET' not found in $THEME_DIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -f "$THEME_FILE" "$HOME_DIR/.Xresources"
|
||||
if [ -n "${DISPLAY:-}" ] && command -v xrdb >/dev/null 2>&1; then
|
||||
xrdb -merge "$HOME_DIR/.Xresources" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
/usr/bin/geminux-sync-dunst-theme
|
||||
|
||||
# Signal live applications (dwm, st, libgemui apps) to reload .Xresources via SIGUSR1
|
||||
for proc in dwm st geminux-dialer geminux-callscreen geminux-sms geminux-contacts \
|
||||
geminux-net geminux-camera geminux-control geminux-themes geminux-lock; do
|
||||
for pid in $(pidof "$proc" 2>/dev/null || true); do
|
||||
kill -USR1 "$pid" 2>/dev/null || true
|
||||
done
|
||||
done
|
||||
Reference in new issue
Block a user