summarylogtreecommitdiffstats
path: root/aqueous.install
blob: 36ff10a44b5f48a5d02b3cc4ed85c957569be463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
post_install() {
    cat <<'EOF'
==> Aqueous installed (single-process Zig build).

    Select 'Aqueous' from your display manager's session list. 'ly' is the
    recommended greeter (enable it with 'systemctl enable ly.service'); sddm
    and tuigreet/greetd also work. greetd users can install
    'aqueous-greetd-config' (or apply packaging/greetd/config.toml.example).

    The session is now managed by uwsm (Universal Wayland Session Manager):
    the 'Aqueous' wayland-session entry runs 'uwsm start -- aqueous-wm', which
    wraps the compositor as a systemd user unit, exports a FRESH Wayland
    environment on every start, activates graphical-session.target, and tears
    the whole session down cleanly on exit. This fixes the stale-WAYLAND_DISPLAY
    reconnect loop that could leave the bar chasing a dead socket across a
    compositor restart. Static
    toolkit/backend hints live in /etc/uwsm/env-aqueous.

    Output modes, scale, transform, position, adaptive sync, profiles,
    persistence, and hotplug are handled directly by the compositor. The
    outputd protocol remains available at
    $XDG_RUNTIME_DIR/aqueous/outputd.sock for display-panel compatibility;
    no output daemon or wlr-randr package is required.

    The graphical session is brought up by uwsm (it activates the static
    graphical-session.target itself), so that xdg-desktop-portal.service --
    which has Requisite=graphical-session.target -- can start. This is what
    makes flameshot/screencast/screenshots work. When uwsm is unavailable,
    aqueous-init falls back to the bundled aqueous-session.target wrapper.
    Run 'systemctl --user daemon-reload' once so the units are picked up
    without a relogin.

    The Noctalia bar/shell is started as a systemd user unit
    (noctalia.service), wanted by graphical-session.target and ordered
    Before=xdg-desktop-autostart.target. It runs the Noctalia v5 native shell
    via 'noctalia --daemon', which forks the shell and returns once it is up;
    Type=forking makes systemd wait for that return before marking the unit
    active (a real readiness barrier). This makes its system-tray watcher
    (org.kde.StatusNotifierWatcher) come up BEFORE autostarted tray apps
    (nm-applet, blueman-applet, ...), so their icons populate reliably -- the
    old [[exec]] launch raced the autostart target and dropped icons. It is
    enabled automatically via a graphical-session.target.wants symlink; no
    per-user 'systemctl --user enable' is needed.

    On first login aqueous-init seeds a default Noctalia config to
    ~/.config/noctalia/config.toml (bundled wallpapers + idle/lock defaults)
    only when you have no config yet; an existing config is never overwritten.
    GUI changes Noctalia makes itself land in
    ~/.local/state/noctalia/settings.toml and are independent of this seed.

    If tray icons are still missing after login, check that no KDE tray daemon
    (kded6) is squatting the watcher:
        busctl --user list | grep -i StatusNotifier
        pkill kded6   # then restart noctalia.service

    Per-user state/cache/config directories will be created at first
    login by systemd-tmpfiles --user.

    Logs:
        tail -f ~/.local/state/river/river.log
EOF
    systemd-tmpfiles --create /usr/lib/tmpfiles.d/aqueous.conf >/dev/null 2>&1 || true
}

post_upgrade() {
    local old_ver="$2"
    echo "==> Aqueous upgraded from ${old_ver:-unknown}."
    echo "    The session is now launched via uwsm (uwsm start -- aqueous-wm)"
    echo "    and exits cleanly on compositor disconnect. Reload user units"
    echo "    and restart the graphical session:"
    echo "        systemctl --user daemon-reload"
    echo "    The session target takes effect on your next login."
    systemd-tmpfiles --create /usr/lib/tmpfiles.d/aqueous.conf >/dev/null 2>&1 || true
}

post_remove() {
    cat <<'EOF'
==> Aqueous removed.

    Per-user state was left in place:
        ~/.cache/aqueous
        ~/.config/aqueous
        ~/.local/state/aqueous
        ~/.local/state/river

    Delete manually if no longer wanted.
EOF
}