From e173887a4d9cf7ae8c09615644555874b6f2e711 Mon Sep 17 00:00:00 2001 From: Jerzy Drozdz Date: Mon, 18 Nov 2024 17:36:13 +0100 Subject: [PATCH 1/3] Removed -a option --- install/fedora.sh | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/install/fedora.sh b/install/fedora.sh index 5b87baa..205d47b 100644 --- a/install/fedora.sh +++ b/install/fedora.sh @@ -8,6 +8,16 @@ fi # Don't continue script if any error occurs. set -e +function yes_or_no { + local yn + while true; do + read -r -p "$* [y/n]: " yn + case $yn in + [Yy]*) choice="Y" ; return 0 ;; + [Nn]*) choice="n" ; return 0 ;; + esac + done +} echo "Enabling nwg-shell Copr" sudo dnf copr enable -y tofik/nwg-shell @@ -43,8 +53,19 @@ sudo dnf install -y $fm $editor $browser echo "Installing nwg-shell" sudo dnf install -y nwg-shell -echo "Installing initial configuration" -# Version in fedora does not support -w flag, so, implemented workaround -echo y | nwg-shell-installer -a +echo "Starting from v0.5.0, nwg-shell supports Hyprland Wayland compositor." + +echo +yes_or_no "Install Hyprland?" + +if [ "$choice" == "Y" ] ; then + echo "Installing Hyprland" + dnf install -y hyprland wlr-randr + echo Installing initial configuration + nwg-shell-installer -w -hypr +else + echo Installing initial configuration + nwg-shell-installer -w +fi xdg-user-dirs-update From 0f872ff9c5edfe83d5f416f14244538e5e6dcb75 Mon Sep 17 00:00:00 2001 From: Jerzy Drozdz Date: Mon, 18 Nov 2024 17:40:47 +0100 Subject: [PATCH 2/3] Added repositories with dependecies --- install/fedora-ostree.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/fedora-ostree.sh b/install/fedora-ostree.sh index a3bf8d4..ba22aff 100644 --- a/install/fedora-ostree.sh +++ b/install/fedora-ostree.sh @@ -15,6 +15,9 @@ version=$REDHAT_SUPPORT_PRODUCT_VERSION echo "Enabling nwg-shell Copr" sudo curl https://copr.fedorainfracloud.org/coprs/tofik/nwg-shell/repo/fedora-$version/tofik-nwg-shell-fedora-$version.repo -o /etc/yum.repos.d/nwg-shell.repo +sudo curl https://copr.fedorainfracloud.org/coprs/tofik/sway/repo/fedora-${version}/tofik-sway-fedora-${version}.repo -o /etc/yum.repos.d/tofik-sway.repo +sudo curl https://copr.fedorainfracloud.org/coprs/erikreider/SwayNotificationCenter/repo/fedora-${version}/erikreider-SwayNotificationCenter-fedora-${version}.repo -o /etc/yum.repos.d/erikreider-SwayNotificationCenter.repo +sudo curl https://copr.fedorainfracloud.org/coprs/mochaa/gtk-session-lock/repo/fedora-${version}/mochaa-gtk-session-lock-fedora-${version}.repo -o /etc/yum.repos.d/mochaa-gtk-session-lock.repo echo echo "You're about to select components, that need to be preinstalled for the key bindings to work." From 44401351747faffec0b80d34087091d7dc224e67 Mon Sep 17 00:00:00 2001 From: Jerzy Drozdz Date: Mon, 18 Nov 2024 17:42:40 +0100 Subject: [PATCH 3/3] Removed -a option --- install/fedora-ostree.sh | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/install/fedora-ostree.sh b/install/fedora-ostree.sh index ba22aff..2c0573b 100644 --- a/install/fedora-ostree.sh +++ b/install/fedora-ostree.sh @@ -8,6 +8,16 @@ fi # Don't continue script if any error occurs. set -e +function yes_or_no { + local yn + while true; do + read -r -p "$* [y/n]: " yn + case $yn in + [Yy]*) choice="Y" ; return 0 ;; + [Nn]*) choice="n" ; return 0 ;; + esac + done +} # Check fedora version source /etc/os-release @@ -51,8 +61,19 @@ rpm-ostree install --allow-inactive $fm $editor $browser nwg-shell echo "Apply changes live to make nwg-shell-installer available" sudo rpm-ostree apply-live -echo "Installing initial configuration" -# Version in fedora does not support -w flag, so, implemented workaround -echo y | nwg-shell-installer -a +echo "Starting from v0.5.0, nwg-shell supports Hyprland Wayland compositor." + +echo +yes_or_no "Install Hyprland?" + +if [ "$choice" == "Y" ] ; then + echo "Installing Hyprland" + dnf install -y hyprland wlr-randr + echo Installing initial configuration + nwg-shell-installer -w -hypr +else + echo Installing initial configuration + nwg-shell-installer -w +fi xdg-user-dirs-update