diff --git a/bin/sphere-add-flatpack-repos b/bin/sphere-add-flatpack-repos new file mode 100755 index 0000000..a8053e4 --- /dev/null +++ b/bin/sphere-add-flatpack-repos @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ "$(id -u)" = "0" ]; then + SYSTEM="--system" + MSG="to all users" +else + MSG="to user $(whoami)" +fi + +if [ -f /usr/bin/flatpak ]; then + /usr/bin/flatpak remote-add $SYSTEM --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + /usr/bin/flatpak remote-add $SYSTEM --if-not-exists fedora oci+https://registry.fedoraproject.org + + echo "Added flathub and fedoraproject flatpak repos $MSG" +fi diff --git a/bin/sphere-wayland-configure b/bin/sphere-wayland-configure new file mode 100755 index 0000000..2fa9ba2 --- /dev/null +++ b/bin/sphere-wayland-configure @@ -0,0 +1,37 @@ +#!/bin/sh + +usage() +{ + echo "Enable/Disable Wayland in GDM" + echo "Usage: sphere-wayland-configure <--enable|--disable>" + echo + exit 1 +} + +OPTION="$1" + +echo $OPTION + +if [ "$OPTION" != "--disable" -a "$OPTION" != "--enable" ]; then + echo "Unknown option" + usage +fi + +if [ ! -f /etc/gdm/custom.conf ]; then + echo "GDM configuration file not found" + exit 5 +fi + +if [ "$OPTION" = "--enable" ]; then + sed -i '/^WaylandEnable=false/s@^@#@' /etc/gdm/custom.conf + sed -i '/^DefaultSession=/s@^@#@' /etc/gdm/custom.conf + + echo "Wayland enabled, please restart gdm" + echo "sudo systemctl restart gdm.service" +elif [ "$OPTION" = "--disable" ]; then + sed -i '/^#WaylandEnable=false/s@^#@@' /etc/gdm/custom.conf + sed -i '/^#DefaultSession=/s@^#@@' /etc/gdm/custom.conf + + echo "Wayland enabled, please restart gdm" + echo "sudo systemctl restart gdm.service" +fi