feat: settle Chrome and notifications into the classroom look

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 <[email protected]>
This commit is contained in:
ekklesia
2026-09-04 17:07:05 -05:00
co-authored by Claude Opus 5
parent af79aba21b
commit 6b133bdc3e
7 changed files with 119 additions and 0 deletions
@@ -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/"
}
@@ -0,0 +1,6 @@
{
"RestoreOnStartup": 4,
"RestoreOnStartupURLs": [
"https://app.wonderink.org/"
]
}
+43
View File
@@ -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=<b>%s</b>\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
+3
View File
@@ -9,6 +9,9 @@ output * bg /usr/share/backgrounds/ekklesia/classroom-default.png fill
# Ekklesia Classroom dock # Ekklesia Classroom dock
exec --no-startup-id /usr/local/bin/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. # Keep the interface intentionally minimal.
# Additional classroom controls are added explicitly by Ekklesia Classroom. # Additional classroom controls are added explicitly by Ekklesia Classroom.
+1
View File
@@ -19,6 +19,7 @@ chmod 0644 /home/classroom/.bash_profile
chmod 0755 /usr/local/bin/classroom-browser chmod 0755 /usr/local/bin/classroom-browser
chmod 0755 /usr/local/bin/classroom-window chmod 0755 /usr/local/bin/classroom-window
chmod 0755 /usr/local/bin/classroom-notify-test
if [ ! -f /etc/ekklesia-classroom/device.conf ]; then if [ ! -f /etc/ekklesia-classroom/device.conf ]; then
cat > /etc/ekklesia-classroom/device.conf <<'CONFIG' cat > /etc/ekklesia-classroom/device.conf <<'CONFIG'
+30
View File
@@ -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"
+19
View File
@@ -90,6 +90,10 @@ install -Dm755 \
"$ROOT/scripts/classroom-window" \ "$ROOT/scripts/classroom-window" \
"$STAGE/usr/local/bin/classroom-window" "$STAGE/usr/local/bin/classroom-window"
install -Dm755 \
"$ROOT/scripts/classroom-notify-test" \
"$STAGE/usr/local/bin/classroom-notify-test"
install -Dm644 \ install -Dm644 \
"$ROOT/config/wallpapers/classroom-default.png" \ "$ROOT/config/wallpapers/classroom-default.png" \
"$STAGE/usr/share/backgrounds/ekklesia/classroom-default.png" "$STAGE/usr/share/backgrounds/ekklesia/classroom-default.png"
@@ -102,6 +106,21 @@ install -Dm644 \
"$ROOT/config/dock/style.css" \ "$ROOT/config/dock/style.css" \
"$STAGE/etc/ekklesia-classroom/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 \ install -Dm755 \
"$ROOT/scripts/ekklesia-classroom-update" \ "$ROOT/scripts/ekklesia-classroom-update" \
"$STAGE/usr/local/bin/ekklesia-classroom-update" "$STAGE/usr/local/bin/ekklesia-classroom-update"