The audit's first tier, in one change: every case found where the interface
asserted something the system did not do.
Twenty-one compositor-owned preferences -- the whole Mouse & Touchpad page,
plus window layout, snapping, dim-inactive and the magnifier -- had the live
half (hyprctl eval) and not the config-time half, so they quietly reverted on
every hyprctl reload. All 70 hypr-backed keys now have a prefs.get() in the
Lua, and hypr-prefs-contract pins both the presence and that the Lua fallback
equals the schema default, which is how the touchpad page misreported natural
scrolling on first boot.
The idle generator fell back from unwritten battery keys to the AC values
while the Power page displayed the schema defaults: a fresh laptop showed
"suspend at 20 minutes" and generated no suspend listener, then discharged to
zero in a bag. Unwritten keys now use the defaults the page shows
(idle-defaults-contract pins generator to schema; idle-config-contract
re-pinned to the new rule with the tradeoff recorded), and change-settings
enables managed idle on any machine with a battery -- without starting
hypridle in whatever session the installer runs under.
The per-app lock-screen notification switches wrote fields nothing read:
hyprlock cannot render notifications. Removed, with the rule model shrunk to
{enabled}, stale stored fields dropped at normalization, and the contract now
forbidding the page from growing lock-screen switches it cannot honor.
The battery warning thresholds were searchable, documented as "Found on
Power & Lock", and rendered nowhere -- and crossing the low threshold changed
only a glyph's color. Both sliders now exist where search was already sending
people, and low battery publishes a real notification at important priority.
Three handoffs opened GNOME panels that are inert in a Hyprland session. The
keyboard handoff is gone (that panel writes gsettings nothing here reads, and
the working controls sat on the same page); Connectivity gains a Wi-Fi row
that opens GNOME's actual Wi-Fi panel -- hidden SSIDs and 802.1X finally have
a road -- beside the network row that legitimately drives NetworkManager; the
universal-access handoff is gone, its few working toggles being controls this
app already owns. And the accessibility page now gives the true reason sticky
keys are missing: each Wayland compositor implements its own and Hyprland
does not yet -- not "an X11 feature with no Wayland equivalent," which sent
people to the wrong conclusion about the platform.
Claude-Session: https://claude.ai/code/session_01Epx9ZC1gwm81K3jm9x9CKh
111 lines
5.6 KiB
Bash
Executable File
111 lines
5.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Strict: the copy over / below is the one thing this stage exists to do, and
|
|
# without set -e its failure fell through to guarded no-ops and exited 0 --
|
|
# a failed stage the installer's summary could never see.
|
|
set -euo pipefail
|
|
|
|
# --- Helper functions ---
|
|
log() { echo -e "\033[1;34m[INFO]\033[0m $*"; }
|
|
exists() { command -v "$1" >/dev/null 2>&1; }
|
|
|
|
# --- Defined Paths ---
|
|
# The default, not an assignment: an exported PANAMA_PATH from a clone at
|
|
# another location must win, or the copy over / below reads the wrong tree.
|
|
PANAMA_PATH="${PANAMA_PATH:-$HOME/.local/share/Panama}"
|
|
|
|
echo -e "\n--- Copying System & User files ---"
|
|
log "Changing DNF Settings"
|
|
sudo cp -r "$PANAMA_PATH/config/copy/." "/"
|
|
|
|
# The GPU symlink rules land via the copy above. Apply them without a reboot so
|
|
# AQ_DRM_DEVICES resolves on the first Hyprland login rather than the second.
|
|
if [[ -f /etc/udev/rules.d/99-panama-gpu.rules ]]; then
|
|
log "Reloading udev rules for stable GPU symlinks"
|
|
sudo udevadm control --reload
|
|
sudo udevadm trigger --subsystem-match=drm
|
|
fi
|
|
|
|
# The document-portal drop-in lands via the same copy. A user unit's drop-ins
|
|
# are read at daemon-reload, so without this the guard applies from the next
|
|
# login rather than from now -- and the failure it guards against is one you
|
|
# only find days later, when you next open a flatpak you had not opened yet.
|
|
if [[ -f /etc/systemd/user/xdg-document-portal.service.d/panama-stale-mount.conf ]]; then
|
|
log "Reloading the user manager so the document-portal drop-in applies"
|
|
systemctl --user daemon-reload || log "Could not reload the user manager"
|
|
fi
|
|
|
|
echo -e "\n--- Desktop appearance ---"
|
|
# GTK and Qt apps read these directly from gsettings; there is no settings
|
|
# daemon outside GNOME, so they must be correct rather than merely overridden.
|
|
# These match config/dot/gtk-3.0/settings.ini and quickshell's Theme.qml.
|
|
if exists gsettings; then
|
|
log "Applying interface settings"
|
|
gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3-dark'
|
|
gsettings set org.gnome.desktop.interface icon-theme 'Adwaita'
|
|
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
|
gsettings set org.gnome.desktop.interface font-name 'Adwaita Sans 11'
|
|
gsettings set org.gnome.desktop.interface monospace-font-name 'VictorMono Nerd Font 10'
|
|
gsettings set org.gnome.desktop.interface cursor-theme 'oreo_blue_cursors'
|
|
# Deliberately NOT setting cursor-size. GNOME here is on 16 (smaller than
|
|
# GNOME's own default of 24) and changing it would visibly alter the working
|
|
# GNOME session. Hyprland uses XCURSOR_SIZE=24 from uwsm/env; if the cursor
|
|
# feels too large there, change that one value rather than this one.
|
|
fi
|
|
|
|
echo -e "\n--- Hyprland session services ---"
|
|
# Deliberately NOT enabling these.
|
|
#
|
|
# hyprpaper / hypridle / hyprpolkitagent / vicinae all ship units that are
|
|
# WantedBy=graphical-session.target -- and that target is active under GNOME
|
|
# too. Enabling them would start hypridle alongside GNOME's own idle handling
|
|
# (two daemons blanking and locking the screen on different timers) and start
|
|
# hyprpaper where there is no layer shell for it to draw on.
|
|
#
|
|
# Instead hypr/autostart.lua runs `systemctl --user start ...` on
|
|
# hyprland.start, which scopes them to the Hyprland session. They still get the
|
|
# correct uwsm activation environment and still stop in order, because they are
|
|
# PartOf=graphical-session.target.
|
|
log "Hyprland services are started per-session by hypr/autostart.lua, not enabled globally"
|
|
|
|
# espanso is the exception to the rule above: text expansion is wanted under
|
|
# any compositor and conflicts with nothing GNOME runs, and upstream's own
|
|
# mechanism is a registered user unit. The RPM ships no unit -- without this,
|
|
# the package installs, the config links, and no trigger ever fires.
|
|
# `service register` writes and enables the unit and is idempotent on re-runs;
|
|
# autostart.lua also starts it so the first Hyprland login after a fresh
|
|
# install expands text without waiting for the next one.
|
|
if exists espanso && ! systemctl --user cat espanso.service >/dev/null 2>&1; then
|
|
log "Registering the espanso text-expansion service"
|
|
espanso service register >/dev/null 2>&1 || log "Could not register espanso"
|
|
fi
|
|
|
|
# Notification daemons must NOT be installed: mako, dunst and swaync all
|
|
# register Name=org.freedesktop.Notifications for D-Bus activation, which races
|
|
# Quickshell's own notification server at login. Whoever wins keeps the name.
|
|
for pkg in mako dunst SwayNotificationCenter; do
|
|
if rpm -q "$pkg" >/dev/null 2>&1; then
|
|
log "WARNING: $pkg is installed and will fight Quickshell for the notification D-Bus name."
|
|
log " Fix with: systemctl --user mask ${pkg,,}.service"
|
|
fi
|
|
done
|
|
|
|
# Select the launcher theme once vicinae exists.
|
|
if exists vicinae; then
|
|
log "Setting vicinae theme"
|
|
vicinae theme set tokyonight-moon >/dev/null 2>&1 || true
|
|
fi
|
|
|
|
# A machine with a battery gets managed idle timings from the start. The
|
|
# shipped hypridle.conf deliberately never suspends -- correct for a desktop,
|
|
# and exactly wrong for a laptop in a bag. panama-idle generates the
|
|
# power-source-aware config and points hypridle at it with a drop-in; it does
|
|
# not start hypridle here (the Hyprland session does that), so running it
|
|
# under GNOME during install is safe. A desktop skips this entirely and keeps
|
|
# the shipped file, as before.
|
|
if "${PANAMA_PATH:-$HOME/.local/share/Panama}/bin/panama-hw" battery 2>/dev/null; then
|
|
log "Battery detected: enabling managed idle timings (suspend on battery works out of the box)"
|
|
"${PANAMA_PATH:-$HOME/.local/share/Panama}/config/dot/quickshell/scripts/panama-idle" install \
|
|
|| log "Could not enable managed idle timings; the Power page can turn them on later"
|
|
fi
|