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"