From 6b133bdc3e0bf92025db0f905a51b0b9206c624e Mon Sep 17 00:00:00 2001 From: ekklesia Date: Fri, 4 Sep 2026 17:07:05 -0500 Subject: [PATCH] feat: settle Chrome and notifications into the classroom look MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chrome stays a full browser. The managed policy only removes the things a volunteer should never be asked about — the first-run tour, the default-browser prompt, sync and sign-in promos, the profile picker — and pins the Home button to Wonder Ink so there is always one obvious way back. Startup URL is a recommended policy rather than a managed one, so a teacher can still change it. Nothing restricts where they browse, and the profile is untouched, so YouTube and other logins survive reboots and updates. Notifications were still stock mako, which looked nothing like the rest of the shell. Give them the dock's palette: the same dark slate, the same hairline white border, rounded, white text, top right. Kept a little more opaque than the dock so text stays readable over video, and on the overlay layer so a parent-call alert can still reach someone watching a fullscreen DVD. mako was only ever reaching the session through D-Bus activation. Start it from the sway config so it is running before anything needs it. classroom-notify-test sends a sample so the styling can be checked without waiting for a real event. Co-Authored-By: Claude Opus 5 --- .../policies/managed/ekklesia-classroom.json | 17 ++++++++ .../recommended/ekklesia-classroom.json | 6 +++ config/mako/config | 43 +++++++++++++++++++ config/sway/config | 3 ++ packaging/debian/postinst | 1 + scripts/classroom-notify-test | 30 +++++++++++++ tools/build-release.sh | 19 ++++++++ 7 files changed, 119 insertions(+) create mode 100644 config/chrome/policies/managed/ekklesia-classroom.json create mode 100644 config/chrome/policies/recommended/ekklesia-classroom.json create mode 100644 config/mako/config create mode 100755 scripts/classroom-notify-test diff --git a/config/chrome/policies/managed/ekklesia-classroom.json b/config/chrome/policies/managed/ekklesia-classroom.json new file mode 100644 index 0000000..eaa83e7 --- /dev/null +++ b/config/chrome/policies/managed/ekklesia-classroom.json @@ -0,0 +1,17 @@ +{ + "DefaultBrowserSettingEnabled": false, + "PromotionalTabsEnabled": false, + "MetricsReportingEnabled": false, + + "SyncDisabled": true, + "SigninInterceptionEnabled": false, + "BrowserAddPersonEnabled": false, + "ProfilePickerOnStartupAvailability": 1, + + "PasswordLeakDetectionEnabled": false, + "BackgroundModeEnabled": false, + + "ShowHomeButton": true, + "HomepageIsNewTabPage": false, + "HomepageLocation": "https://app.wonderink.org/" +} diff --git a/config/chrome/policies/recommended/ekklesia-classroom.json b/config/chrome/policies/recommended/ekklesia-classroom.json new file mode 100644 index 0000000..a8e3ec9 --- /dev/null +++ b/config/chrome/policies/recommended/ekklesia-classroom.json @@ -0,0 +1,6 @@ +{ + "RestoreOnStartup": 4, + "RestoreOnStartupURLs": [ + "https://app.wonderink.org/" + ] +} diff --git a/config/mako/config b/config/mako/config new file mode 100644 index 0000000..d718a5e --- /dev/null +++ b/config/mako/config @@ -0,0 +1,43 @@ +# Ekklesia Classroom notifications +# Managed by the ekklesia-classroom package. +# +# Matched to the dock: same dark slate (#222632), same hairline white +# border, same rounded corners, white text. Kept slightly more opaque +# than the dock so text stays readable over the wallpaper and over video. + +font=DejaVu Sans 12 + +background-color=#222632e6 +text-color=#ffffffff +border-color=#ffffff21 +progress-color=over #464b5ae6 + +border-size=1 +border-radius=18 + +padding=14,18 +margin=18 + +width=380 +height=160 + +anchor=top-right +layer=overlay +sort=-time +max-visible=3 + +markup=1 +format=%s\n%b + +icons=1 +max-icon-size=48 + +default-timeout=6000 + +[urgency=low] +default-timeout=4000 + +[urgency=critical] +background-color=#3a2632f0 +border-color=#ff8a8a59 +default-timeout=0 diff --git a/config/sway/config b/config/sway/config index d60c6bc..dcf398c 100644 --- a/config/sway/config +++ b/config/sway/config @@ -9,6 +9,9 @@ output * bg /usr/share/backgrounds/ekklesia/classroom-default.png fill # Ekklesia Classroom dock exec --no-startup-id /usr/local/bin/classroom-dock +# Notifications. Styled by /etc/xdg/mako/config to match the dock. +exec --no-startup-id /usr/bin/mako + # Keep the interface intentionally minimal. # Additional classroom controls are added explicitly by Ekklesia Classroom. diff --git a/packaging/debian/postinst b/packaging/debian/postinst index e2f202f..5b065db 100755 --- a/packaging/debian/postinst +++ b/packaging/debian/postinst @@ -19,6 +19,7 @@ chmod 0644 /home/classroom/.bash_profile chmod 0755 /usr/local/bin/classroom-browser chmod 0755 /usr/local/bin/classroom-window +chmod 0755 /usr/local/bin/classroom-notify-test if [ ! -f /etc/ekklesia-classroom/device.conf ]; then cat > /etc/ekklesia-classroom/device.conf <<'CONFIG' diff --git a/scripts/classroom-notify-test b/scripts/classroom-notify-test new file mode 100755 index 0000000..6a94fd1 --- /dev/null +++ b/scripts/classroom-notify-test @@ -0,0 +1,30 @@ +#!/bin/bash +set -euo pipefail + +# Sends a sample notification so the classroom styling can be checked +# without waiting for a real event. +# +# classroom-notify-test +# classroom-notify-test "Title" "Body text" +# classroom-notify-test --critical "Parent Call" "Room 3 needs a parent." + +urgency=normal + +if [[ "${1:-}" == "--critical" ]]; then + urgency=critical + shift +elif [[ "${1:-}" == "--low" ]]; then + urgency=low + shift +fi + +title="${1:-DVD Ready}" +body="${2:-A disc is ready to play.}" + +notify-send \ + --app-name="Ekklesia Classroom" \ + --urgency="$urgency" \ + -- \ + "$title" "$body" + +echo "Sent $urgency notification: $title" diff --git a/tools/build-release.sh b/tools/build-release.sh index 0ebf8d8..4b989e1 100755 --- a/tools/build-release.sh +++ b/tools/build-release.sh @@ -90,6 +90,10 @@ install -Dm755 \ "$ROOT/scripts/classroom-window" \ "$STAGE/usr/local/bin/classroom-window" +install -Dm755 \ + "$ROOT/scripts/classroom-notify-test" \ + "$STAGE/usr/local/bin/classroom-notify-test" + install -Dm644 \ "$ROOT/config/wallpapers/classroom-default.png" \ "$STAGE/usr/share/backgrounds/ekklesia/classroom-default.png" @@ -102,6 +106,21 @@ install -Dm644 \ "$ROOT/config/dock/style.css" \ "$STAGE/etc/ekklesia-classroom/dock/style.css" +# Notification styling, matched to the dock. +install -Dm644 \ + "$ROOT/config/mako/config" \ + "$STAGE/etc/xdg/mako/config" + +# Chrome enterprise policy: suppress first-run and sign-in nags, and pin +# Home to Wonder Ink. Nothing here restricts where teachers can browse. +install -Dm644 \ + "$ROOT/config/chrome/policies/managed/ekklesia-classroom.json" \ + "$STAGE/etc/opt/chrome/policies/managed/ekklesia-classroom.json" + +install -Dm644 \ + "$ROOT/config/chrome/policies/recommended/ekklesia-classroom.json" \ + "$STAGE/etc/opt/chrome/policies/recommended/ekklesia-classroom.json" + install -Dm755 \ "$ROOT/scripts/ekklesia-classroom-update" \ "$STAGE/usr/local/bin/ekklesia-classroom-update"