Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fedora install script #438

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions install/fedora-ostree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,26 @@ 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

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."
Expand Down Expand Up @@ -48,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
27 changes: 24 additions & 3 deletions install/fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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