The scratchpad technically minimized Chrome, but sway hands scratchpad windows back floating, so restoring gave a draggable window instead of the maximized one the user put away. Park windows on a hidden workspace as ordinary tiled containers instead, and move them back to the visible workspace on restore. classroom-window carries the whole state machine, so the dock buttons and Super+M share one implementation: not running -> launch unfocused -> focus focused -> minimize minimized -> restore, tiled and maximized Fullscreen is dropped on the way out, since a container parked while still fullscreen keeps drawing over everything else. floating disable on the way back also rescues windows left floating by the old scratchpad path. Super+Shift+M restores the newest minimized window, so nothing can get stranded on the hidden workspace. Co-Authored-By: Claude Opus 5 <[email protected]>
26 lines
745 B
Bash
Executable File
26 lines
745 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# The dock's Browser button. classroom-window decides whether this is a
|
|
# launch, a focus, a minimise or a restore.
|
|
#
|
|
# Chrome stays a full browser: Wonder Ink is only the starting page, and
|
|
# the profile in ~/.config/google-chrome is never touched here so logins
|
|
# and cookies survive reboots and updates.
|
|
|
|
HOME_PAGE='https://app.wonderink.org/'
|
|
|
|
exec /usr/local/bin/classroom-window toggle \
|
|
--match 'google-chrome' \
|
|
--match 'chrome' \
|
|
--match 'chrome-.*' \
|
|
--match 'google-chrome-.*' \
|
|
-- \
|
|
google-chrome \
|
|
--ozone-platform=wayland \
|
|
--start-maximized \
|
|
--no-first-run \
|
|
--no-default-browser-check \
|
|
--password-store=basic \
|
|
"$HOME_PAGE"
|