diff --git a/pi4/build/build-stormux.sh b/pi4/build/build-stormux.sh index 872d3e2..595f98c 100755 --- a/pi4/build/build-stormux.sh +++ b/pi4/build/build-stormux.sh @@ -121,14 +121,28 @@ finish_build() { exit 0 } -copy_rhvoice_english_fixes() { - local sourceDir="../files/etc/RHVoice/dicts/English" +install_rhvoice_english_fixes() { + local rhvoiceRepo="https://git.stormux.org/storm/rhvoice-english" local targetDir="/mnt/etc/RHVoice/dicts/English" + local tempDir + local installStatus=0 - if [[ -d "$sourceDir" ]]; then - mkdir -p "$targetDir" - cp -a "$sourceDir/." "$targetDir/" + tempDir="$(mktemp -d)" + + echo "Installing latest RHVoice English dictionary fixes..." + if ! git clone --depth 1 "$rhvoiceRepo" "$tempDir"; then + rm -rf "$tempDir" + return 1 fi + + mkdir -p "$targetDir" + rm -f "$targetDir/namefix.txt" "$targetDir/wordfix.txt" + if ! cp -a "$tempDir/English/." "$targetDir/"; then + installStatus=1 + fi + + rm -rf "$tempDir" + return "$installStatus" } # shellcheck disable=SC2329 # install_sas is emitted into the chroot heredoc with declare -f @@ -549,7 +563,7 @@ sed -i '/^DisableSandbox/d' /etc/pacman.conf EOF -copy_rhvoice_english_fixes +install_rhvoice_english_fixes # Copy skel files to stormux user home (after user rename in chroot) find ../files/etc/skel/ -mindepth 1 -exec cp -rv "{}" /mnt/home/stormux/ \; diff --git a/pi4/files/etc/RHVoice/dicts/English/namefix.txt b/pi4/files/etc/RHVoice/dicts/English/namefix.txt deleted file mode 100644 index 371f75e..0000000 --- a/pi4/files/etc/RHVoice/dicts/English/namefix.txt +++ /dev/null @@ -1,4 +0,0 @@ -bifrost=buyfraust -danestange=dainstanggey -stange=stangey -kde=kaydeee diff --git a/pi4/files/etc/RHVoice/dicts/English/wordfix.txt b/pi4/files/etc/RHVoice/dicts/English/wordfix.txt deleted file mode 100644 index fcdf4c9..0000000 --- a/pi4/files/etc/RHVoice/dicts/English/wordfix.txt +++ /dev/null @@ -1,19 +0,0 @@ -asus=aysus -certificate=cirtifficate -douche=doosh* -espeak=easpeak* -freenginx=freeenginex -git=ghit* -github=ghittehub -gitea=ghittee -jolla=yolla -jenux=jennux -lightnin=lighttnin -nginx=enginex -rhvoice=ahraychvoice -shit=shitt -sync=sink* -timezone=timezoan -vinux=vinnux -wench=wentch* -youngin=younggin* diff --git a/x86_64/airootfs/etc/RHVoice/dicts/English/namefix.txt b/x86_64/airootfs/etc/RHVoice/dicts/English/namefix.txt deleted file mode 100644 index 371f75e..0000000 --- a/x86_64/airootfs/etc/RHVoice/dicts/English/namefix.txt +++ /dev/null @@ -1,4 +0,0 @@ -bifrost=buyfraust -danestange=dainstanggey -stange=stangey -kde=kaydeee diff --git a/x86_64/airootfs/etc/RHVoice/dicts/English/wordfix.txt b/x86_64/airootfs/etc/RHVoice/dicts/English/wordfix.txt deleted file mode 100644 index fcdf4c9..0000000 --- a/x86_64/airootfs/etc/RHVoice/dicts/English/wordfix.txt +++ /dev/null @@ -1,19 +0,0 @@ -asus=aysus -certificate=cirtifficate -douche=doosh* -espeak=easpeak* -freenginx=freeenginex -git=ghit* -github=ghittehub -gitea=ghittee -jolla=yolla -jenux=jennux -lightnin=lighttnin -nginx=enginex -rhvoice=ahraychvoice -shit=shitt -sync=sink* -timezone=timezoan -vinux=vinnux -wench=wentch* -youngin=younggin* diff --git a/x86_64/airootfs/root/customize_airootfs.sh b/x86_64/airootfs/root/customize_airootfs.sh index 69f07ab..b7ae680 100644 --- a/x86_64/airootfs/root/customize_airootfs.sh +++ b/x86_64/airootfs/root/customize_airootfs.sh @@ -28,6 +28,30 @@ install_sas() { return "$installStatus" } +install_rhvoice_english_fixes() { + local rhvoiceRepo="https://git.stormux.org/storm/rhvoice-english" + local targetDir="/etc/RHVoice/dicts/English" + local tempDir + local installStatus=0 + + tempDir="$(mktemp -d)" + + echo "Installing latest RHVoice English dictionary fixes..." + if ! git clone --depth 1 "$rhvoiceRepo" "$tempDir"; then + rm -rf "$tempDir" + return 1 + fi + + mkdir -p "$targetDir" + rm -f "$targetDir/namefix.txt" "$targetDir/wordfix.txt" + if ! cp -a "$tempDir/English/." "$targetDir/"; then + installStatus=1 + fi + + rm -rf "$tempDir" + return "$installStatus" +} + # Initialize pacman keyring echo "Initializing pacman keyring..." pacman-key --init @@ -49,6 +73,7 @@ echo "en_US.UTF-8 UTF-8" > /etc/locale.gen locale-gen install_sas +install_rhvoice_english_fixes # Enable system services systemctl enable NetworkManager.service diff --git a/x86_64/airootfs/usr/local/bin/install-stormux b/x86_64/airootfs/usr/local/bin/install-stormux index 89cc0d7..ad0f7bc 100755 --- a/x86_64/airootfs/usr/local/bin/install-stormux +++ b/x86_64/airootfs/usr/local/bin/install-stormux @@ -1348,28 +1348,32 @@ install_base_system() { # Define package groups local basePackages=( base base-devel linux linux-firmware - networkmanager sudo dialog git ii rsync wget - bash-completion cronie openssh + networkmanager sudo dialog git ii rsync wget curl + bash-completion cronie openssh rng-tools ) local audioPackages=( pipewire pipewire-alsa pipewire-pulse pipewire-jack - wireplumber alsa-utils sox + wireplumber alsa-utils sox gstreamer + gst-plugins-base gst-plugins-good alsa-firmware sof-firmware bluez bluez-utils ) local accessibilityPackages=( espeak-ng rhvoice-voice-bdl speech-dispatcher - fenrir brltty + fenrir brltty cthulhu ) local utilityPackages=( vi vim nano screen magic-wormhole - man man-pages + man-db man-pages xdg-user-dirs xdg-utils poppler socat parted - realtime-privileges + realtime-privileges wireless-regdb + python-dbus python-gobject python-msgpack + python-pyenchant python-pyte python-pyperclip + python-tornado ) # Stormux-specific packages (installed later in chroot after keyring setup) @@ -1385,18 +1389,17 @@ install_base_system() { if [[ "$hasDesktop" == true ]]; then case "$desktopEnvironment" in *) - allPackages+=(xlibre-xserver xlibre-input-libinput nodm-dgw brave-bin) + allPackages+=( + i38 nodm-dgw xorg-xinit + xlibre-xserver xlibre-input-libinput + xlibre-video-dummy-with-vt xlibre-video-fbdev + ) if [[ "$installSteam" == "yes" ]]; then allPackages+=(steam) fi ;;& i3) - allPackages+=(i3-wm orca python-psutil lxterminal pluma) - allPackages+=(discount jq libnotify xfce4-notifyd pamixer playerctl) - allPackages+=(python-i3ipc python-wxpython sox yad) - allPackages+=(lxsession magic-wormhole pcmanfm) - allPackages+=(python-gobject python-pillow python-pytesseract scrot tesseract) - allPackages+=(tesseract-data-eng udiskie xorg-setxkbmap xdotool) + allPackages+=(xdotool) ;; esac fi @@ -1765,45 +1768,30 @@ fi # Setup desktop environment configurations if [[ "${desktopEnvironment}" == "i3" ]]; then - firstUser="${userNames[0]}" + desktopUser="${autoLoginUser}" # Create git directory for better organization - mkdir -p /home/\$firstUser/git - chown \$firstUser:users /home/\$firstUser/git + mkdir -p /home/\$desktopUser/git + chown \$desktopUser:users /home/\$desktopUser/git # Clone I38 to ~/git/I38 echo "Cloning I38 accessibility configuration..." -if ! sudo -u \$firstUser git clone https://git.stormux.org/storm/I38 /home/\$firstUser/git/I38; then +if ! sudo -u \$desktopUser git clone https://git.stormux.org/storm/I38 /home/\$desktopUser/git/I38; then echo "WARNING: Failed to clone I38 repository" fi # Run I38 setup to generate accessible i3 configuration - if [[ -d /home/\$firstUser/git/I38 ]]; then + if [[ -d /home/\$desktopUser/git/I38 ]]; then echo "Configuring I38 for accessibility..." - cd /home/\$firstUser/git/I38 || exit 1 + cd /home/\$desktopUser/git/I38 || exit 1 - # Ensure xdotool is available for I38 setup - if ! command -v xdotool >/dev/null 2>&1; then - echo "Installing xdotool for I38..." - if ! pacman -Sy --noconfirm --needed xdotool; then - echo "WARNING: Failed to install xdotool for I38 setup" - fi - fi - - # Run I38 setup scripts as the user - # -x generates xinitrc and xprofile - # Main script generates i3 config with accessibility features - play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t 2>/dev/null || true - if ! sudo -u \$firstUser ./i38.sh -x; then - echo "WARNING: I38 xinit/xprofile setup reported an error" - fi - play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t 2>/dev/null || true - if ! sudo -u \$firstUser ./i38.sh; then - echo "WARNING: I38 main setup reported an error" + if ! sudo -u \$desktopUser ./i38.sh -D; then + echo "WARNING: I38 default setup reported an error" fi cd - > /dev/null || exit 1 fi +fi # Initialize pacman keyring pacman-key --init @@ -1841,7 +1829,11 @@ $pipewireConfigCmd # Configure nodm for automatic login (only after nodm package is installed) if [[ "${desktopEnvironment}" == "i3" ]]; then if [[ -f /etc/nodm.conf ]]; then - sed -i "s/{user}/${autoLoginUser}/g" /etc/nodm.conf + sed -i \ + -e "s/{user}/${autoLoginUser}/g" \ + -e "s#^NODM_USER=.*#NODM_USER='${autoLoginUser}'#" \ + -e "s#^NODM_XSESSION=.*#NODM_XSESSION='/home/${autoLoginUser}/.xinitrc'#" \ + /etc/nodm.conf systemctl enable nodm.service echo "Display manager (nodm) configured for ${autoLoginUser}" else @@ -1849,6 +1841,18 @@ if [[ "${desktopEnvironment}" == "i3" ]]; then fi fi +if command -v spd-conf > /dev/null 2>&1; then + spd-conf -n -C || echo "WARNING: Speech Dispatcher system configuration failed" +fi + +if [[ -f /etc/speech-dispatcher/speechd.conf ]]; then + if grep -qE '^[[:space:]]*#?[[:space:]]*DefaultModule[[:space:]]+' /etc/speech-dispatcher/speechd.conf; then + sed -i -E 's/^[[:space:]]*#?[[:space:]]*DefaultModule[[:space:]]+.*/DefaultModule rhvoice/' /etc/speech-dispatcher/speechd.conf + else + printf '\nDefaultModule rhvoice\n' >> /etc/speech-dispatcher/speechd.conf + fi +fi + # Create system-wide accessibility configuration cat > /etc/profile.d/stormux-accessibility.sh <<'PROFILE_EOF' #!/bin/sh