From 78861f4f066e235c48f3076482a58082ca0581b2 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Feb 03 2025 22:40:58 +0000 Subject: Enable a11y This makes Orca work out of the box, with Command+Option+S to enable the screen reader and Fn+Enter (Insert) as the default Orca Modifier. Fn+Enter+Space for settings, Fn+Enter+H for help. Signed-off-by: Hector Martin --- diff --git a/setup.sh b/setup.sh index ca0c9e5..b28c8cb 100755 --- a/setup.sh +++ b/setup.sh @@ -4,7 +4,7 @@ WALLPAPER_FILE="/usr/share/backgrounds/default.png" -trap 'killall -9 kwin_wayland calamares plasmashell' EXIT SIGINT SIGTERM +trap 'killall -9 kwin_wayland calamares plasmashell pipewire pipewire-pulse wireplumber speech-dispatcher kaccess; pkill -9 -f at-spi2' EXIT SIGINT SIGTERM # Wait for the drivers to load udevadm settle @@ -97,11 +97,6 @@ mkdir -p "$HOME" cd $HOME mkdir -p .config -# Set up dummy XDG runtime directory so we don't mess with the real root one -export XDG_RUNTIME_DIR="$HOME/.runtime" -mkdir -p "$XDG_RUNTIME_DIR" -chmod 0700 "$XDG_RUNTIME_DIR" - # Detect HiDPI embedded screens and configure things appropriately HIDPI=0 if [ -e /sys/class/drm/card*-eDP-1/modes ]; then @@ -170,10 +165,21 @@ fi # Set up user session environment, so stuff launches properly export WAYLAND_DISPLAY=wayland-0 export QT_QPA_PLATFORM=wayland -systemctl --user import-environment WAYLAND_DISPLAY QT_QPA_PLATFORM XDG_RUNTIME_DIR HOME +export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 +export DISPLAY=:0 +systemctl --user import-environment WAYLAND_DISPLAY QT_QPA_PLATFORM XDG_RUNTIME_DIR HOME QT_LINUX_ACCESSIBILITY_ALWAYS_ON DISPLAY + +# Start audio for a11y support +systemctl --usrt start pipewire +systemctl --user start wireplumber +pipewire-pulse & # Systemd service refuses to start as root +systemctl --user start at-spi-dbus-bus.service +/usr/libexec/at-spi2-registryd --use-gnome-session & + +rm -f "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" # Start KWin -kwin_wayland --drm --no-global-shortcuts --no-lockscreen --locale1 & +kwin_wayland --xwayland --drm --no-lockscreen --locale1 & # Wait for the compositor to be available for i in $(seq 1 50); do @@ -191,6 +197,9 @@ if [ "$HIDPI" == 1 ]; then kscreen-doctor output.eDP-1.scale.1.5 fi +# Start a11y +kaccess & + # Start plasmashell to get a wallpaper plasmashell &