The laptop model's hardware module and a memory-pressure module for any machine (hq research 027/03, 026/05, to-be 42 phase 3). The predecessor's polling auto-profile and mem-guard user scripts become each module's own Go code launched by the node runtime (ADR 0198): a profile switcher woken by the kernel's power-supply uevents, and a guard that warns on RAM, swap or PSI before systemd-oomd acts, on the desktop over the account's bus and always as an event. supergfxctl and triggerhappy are kept as found (research 027 Q1).
13 lines
636 B
Bash
Executable File
13 lines
636 B
Bash
Executable File
#!/bin/bash
|
|
# zephyrus-notify ID SUMMARY — a short desktop notification that replaces the previous one with the
|
|
# same ID, through the session's notification service on its bus. busctl is the service manager's
|
|
# own client, so nothing is installed for it. Shipped by the mesh's asus-zephyrus-g14 module.
|
|
set -u
|
|
id=${1:-0}
|
|
summary=${2:-}
|
|
uid=$(id -u)
|
|
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/${uid}/bus" \
|
|
busctl --user call org.freedesktop.Notifications /org/freedesktop/Notifications \
|
|
org.freedesktop.Notifications Notify susssasa{sv}i \
|
|
asus-zephyrus-g14 "$id" "" "$summary" "" 0 1 urgency y 0 1500 >/dev/null 2>&1 || true
|