#!/bin/bash packages="$1" packages="${packages//lxqt/lxqt lxterminal oxygen-icons ratpoison network-manager-applet}" packages="${packages//mate/mate mate-extra network-manager-applet}" packages="${packages//i3/clipster grun jq i3-wm libnotify lxterminal notification-daemon pamixer playerctl python-i3ipc sgtk-menu sox transfersh yad}" # Proper command for launching the desktop session. case "${1}" in "lxqt") session="startlxqt";; "mate") session="mate-session";; *) session="$1";; esac install_package ${packages} firefox nodm-dgw orca speech-dispatcher xclip xf86-video-dummy-with-vt xorg-server xorg-xinit # GUI bluetooth manager if [[ "${architecture}" == "aarch64" ]]; then install_package blueman fi # Configure nodm sudo sed -i "s/{user}/$USER/g" /etc/nodm.conf # Create ~/.xinitrc cat << "EOF" > ~/.xinitrc #!/bin/sh # # ~/.xinitrc # # Executed by startx (run your window manager from here) dbus-launch [[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources if [ -d /etc/X11/xinit/xinitrc.d ]; then for f in /etc/X11/xinit/xinitrc.d/*; do [ -x "$f" ] && . "$f" done unset f fi #accessibility for original load export ACCESSIBILITY_ENABLED=1 export GTK_MODULES=gail:atk-bridge:canberra-gtk-module export GNOME_ACCESSIBILITY=1 export QT_ACCESSIBILITY=1 export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 export DBUS_SESSION_BUS_PID export DBUS_SESSION_BUS_ADDRESS EOF echo "exec ${session}" >> ~/.xinitrc chmod 755 ~/.xinitrc if [[ "$1" == "i3" ]]; then gitDir="$(mktemp -d)" echo "Loading I38, please wait..." git clone -q https://git.stormux.org/storm/I38 "$gitDir" cd "$gitDir" # Play a sound to let the user know the next part is interactive. attention ./i38.sh -x ./i38.sh fi # Configure speech-dispatcher if [[ ! -d ~/.config/speech-dispatcher ]]; then spd-conf -n fi # enable nodm sudo systemctl enable nodm --now