configure-stormux/.includes/gui.sh

84 lines
2.2 KiB
Bash
Raw Normal View History

2021-10-18 02:06:41 -04:00
#!/bin/bash
2021-10-18 02:36:48 -04:00
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 jq i3-wm libnotify lxterminal notification-daemon pamixer playerctl python-i3ipc python-wxpython sox transfersh yad}"
packages+=" libmd libbsd"
# 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
2022-04-06 02:54:29 -04:00
2023-08-24 10:49:59 -04:00
# GUI bluetooth manager
if [[ "${architecture}" == "aarch64" ]]; then
install_package blueman
fi
2021-10-18 02:06:41 -04:00
# 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
2022-04-06 03:24:24 -04:00
export GTK_MODULES=gail:atk-bridge:canberra-gtk-module
2021-10-18 02:06:41 -04:00
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
2021-10-18 02:06:41 -04:00
if [[ "$1" == "i3" ]]; then
gitDir="$(mktemp -d)"
echo "Loading I38, please wait..."
2023-01-22 20:13:54 -05:00
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
2023-01-22 20:27:24 -05:00
./i38.sh
fi
2021-10-18 03:19:24 -04:00
# Configure speech-dispatcher
if [[ ! -d ~/.config/speech-dispatcher ]]; then
spd-conf -n
fi
# Automatically start orca for mate.
if [[ "$1" == "mate" ]]; then
GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.a11y.applications screen-reader-enabled true
GSETTINGS_BACKEND=dconf gsettings set org.mate.interface accessibility true
GSETTINGS_BACKEND=dconf gsettings set org.mate.applications-at-visual startup true
fi
# enable nodm
sudo systemctl enable nodm --now