- Boot sequence cleanups:
- Scope ModemManager's musl shared-plugin LD_PRELOAD to the child daemon via
supervise_daemon_args="--env LD_PRELOAD=..." so OpenRC helpers and plugins
start cleanly with zero "symbol not found" errors.
- Link XLibre fbdev_drv.so against libfbdevhw.so and libshadow.so, pin
libxfont2 in rootfs-packages.txt, populate /usr/share/fonts/*/fonts.dir,
provide XKeysymDB entries, create ~/.cache before dmenu_run, disable TearFree
for ShadowFB modesetting, and avoid D-Bus autolaunch collision with
ModemManager.
- Enable CONFIG_SYN_COOKIES=y and disable IPMI_HANDLER in
geminux-mt6797x.config, add /etc/sysctl.d/00-alpine.conf, drop x86
kernel.nmi_watchdog from 99-geminux-power.conf, and disable module
load/unload in zram-init for built-in zram.
- Add MT6797 ALSA UCM2 DL2/DL3/UL2/UL3/UL_MONO_1 backend DAI routes in
HiFi.conf and apply 0006-mt6797-boot-cleanups.patch (stk3310 ID 0x11,
mt6797-fm firmware search path, mt6797_mac_wq, and pre-auth TX abort).
- Chrony immediate online time sync:
- Enable FAST_STARTUP, configure makestep 1.0 -1 with sourcedir
/etc/chrony/sources.d, and trigger burst/waitsync/makestep/hwclock on
NetworkManager interface up via 30-geminux-chrony.
- Date, Time & Timezone UI:
- Add geminux-datetime libgemui X11 utility with zoneinfo browser, live
search, region filters, and NTP sync trigger.
- Add doas-authorized geminux-tzctl helper with zoneinfo validation and
update geminux-statusd to reload /etc/timezone cleanly under musl.
83 lines
2.5 KiB
Bash
Executable File
83 lines
2.5 KiB
Bash
Executable File
#!/bin/sh
|
|
# Geminux application and quick-action launcher using Pango/HarfBuzz dmenu.
|
|
set -eu
|
|
|
|
LOCK_DIR="/tmp/geminux-launcher-${USER:-user}.lock"
|
|
if ! mkdir "$LOCK_DIR" 2>/dev/null; then
|
|
oldpid="$(cat "$LOCK_DIR/pid" 2>/dev/null || true)"
|
|
if [ -n "$oldpid" ] && kill -0 "$oldpid" 2>/dev/null; then
|
|
exit 0
|
|
fi
|
|
rm -rf "$LOCK_DIR"
|
|
mkdir "$LOCK_DIR" 2>/dev/null || exit 0
|
|
fi
|
|
printf '%s\n' "$$" > "$LOCK_DIR/pid"
|
|
trap 'rm -rf "$LOCK_DIR"' EXIT INT TERM HUP
|
|
|
|
if pidof dmenu >/dev/null 2>&1; then
|
|
exit 0
|
|
fi
|
|
|
|
LAUNCHER_LIST="
|
|
Terminal|st
|
|
Dialer|geminux-dialer
|
|
SMS Messages|geminux-sms
|
|
Contacts|geminux-contacts
|
|
Network & Radios|geminux-net
|
|
Sound & Mixer|geminux-audio
|
|
Camera|geminux-camera
|
|
Control Center|geminux-control
|
|
Date & Timezone|geminux-datetime
|
|
Themes|geminux-themes
|
|
Lock Screen|geminux-lock
|
|
Suspend Now|doas /usr/bin/geminux-power-ctl suspend
|
|
"
|
|
|
|
build_menu() {
|
|
printf '%s\n' "$LAUNCHER_LIST" | sed '/^[[:space:]]*$/d' | cut -d'|' -f1
|
|
for dir in /usr/share/applications /usr/local/share/applications "${HOME:-/home/user}/.local/share/applications"; do
|
|
[ -d "$dir" ] || continue
|
|
for df in "$dir"/*.desktop; do
|
|
[ -f "$df" ] || continue
|
|
grep -q '^NoDisplay=true' "$df" 2>/dev/null && continue
|
|
name="$(awk -F= '/^Name=/{print $2; exit}' "$df")"
|
|
[ -n "$name" ] && printf ' %s\n' "$name"
|
|
done
|
|
done | sort -u
|
|
if command -v dmenu_path >/dev/null 2>&1; then
|
|
dmenu_path
|
|
fi
|
|
}
|
|
|
|
choice="$(build_menu | awk '!seen[$0]++' | dmenu -f -l 9 -i -p 'Geminux:')"
|
|
[ -n "$choice" ] || exit 0
|
|
|
|
pinned_cmd="$(printf '%s\n' "$LAUNCHER_LIST" | awk -F'|' -v sel="$choice" '$1 == sel {print $2; exit}')"
|
|
if [ -n "$pinned_cmd" ]; then
|
|
setsid sh -c "$pinned_cmd" >/dev/null 2>&1 </dev/null &
|
|
exit 0
|
|
fi
|
|
|
|
case "$choice" in
|
|
" "*)
|
|
app_name="${choice# }"
|
|
for dir in /usr/share/applications /usr/local/share/applications "${HOME:-/home/user}/.local/share/applications"; do
|
|
[ -d "$dir" ] || continue
|
|
for df in "$dir"/*.desktop; do
|
|
[ -f "$df" ] || continue
|
|
n="$(awk -F= '/^Name=/{print $2; exit}' "$df")"
|
|
if [ "$n" = "$app_name" ]; then
|
|
ex="$(awk -F= '/^Exec=/{print $2; exit}' "$df" | sed 's/ %[fFuUdDnNickvm]//g')"
|
|
if [ -n "$ex" ]; then
|
|
setsid sh -c "$ex" >/dev/null 2>&1 </dev/null &
|
|
exit 0
|
|
fi
|
|
fi
|
|
done
|
|
done
|
|
;;
|
|
*)
|
|
setsid sh -c "$choice" >/dev/null 2>&1 </dev/null &
|
|
;;
|
|
esac
|