From 73938d834351a66469818ef37e679581b7c20cfb Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 26 Aug 2024 15:40:17 +0900 Subject: [PATCH 1/4] added base devel to install first --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4e05df0..c11102c 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,12 @@ https://github.com/JaKooLit/Hyprland-Dots/assets/85185940/50d53755-0f11-45d6-991 ## ✨ to use this script > clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script + +>[!IMPORTANT] +> Make sure you have base-devel installed + +- Without base-devel installed, script will fail + ```bash git clone --depth=1 https://github.com/JaKooLit/Arch-Hyprland.git ~/Arch-Hyprland cd ~/Arch-Hyprland From a177ed254fcb4eeea7a7c0d1a43c82bbd003770a Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 26 Aug 2024 20:31:40 +0900 Subject: [PATCH 2/4] Set to uninstall rofi as conflicts with rofi-wayland --- install-scripts/00-hypr-pkgs.sh | 22 +++++++++++----------- install-scripts/Global_functions.sh | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/install-scripts/00-hypr-pkgs.sh b/install-scripts/00-hypr-pkgs.sh index abf4781..1a5fafe 100755 --- a/install-scripts/00-hypr-pkgs.sh +++ b/install-scripts/00-hypr-pkgs.sh @@ -71,10 +71,11 @@ vim yt-dlp ) -# List of packages to uninstall as it conflicts with swaync or causing swaync to not function properly +# List of packages to uninstall as it conflicts with swaync and rofi-wayland uninstall=( dunst mako + rofi ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## @@ -90,6 +91,15 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh" # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypr-pkgs.log" +# uninstalling conflicting packages +printf "\n%s - Removing Mako, Dunst and rofi-wayland as it conflicts with swaync and rofi-wayland \n" "${NOTE}" +for PKG in "${uninstall[@]}"; do + uninstall_package "$PKG" 2>&1 | tee -a "$LOG" + if [ $? -ne 0 ]; then + echo -e "\e[1A\e[K${ERROR} - $PKG uninstallation failed, please check the log" + exit 1 + fi +done # Installation of main components printf "\n%s - Installing hyprland packages.... \n" "${NOTE}" @@ -102,15 +112,5 @@ for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do fi done -# Checking if mako or dunst is installed -printf "\n%s - Checking if mako or dunst are installed and removing for swaync to work properly \n" "${NOTE}" -for PKG in "${uninstall[@]}"; do - uninstall_package "$PKG" 2>&1 | tee -a "$LOG" - if [ $? -ne 0 ]; then - echo -e "\e[1A\e[K${ERROR} - $PKG uninstallation failed, please check the log" - exit 1 - fi -done - clear diff --git a/install-scripts/Global_functions.sh b/install-scripts/Global_functions.sh index 133b7ff..669b4f0 100755 --- a/install-scripts/Global_functions.sh +++ b/install-scripts/Global_functions.sh @@ -69,7 +69,7 @@ uninstall_package() { if pacman -Qi "$1" &>> /dev/null ; then # Package is installed echo -e "${NOTE} Uninstalling $1 ..." - sudo pacman -Rns --noconfirm "$1" 2>&1 | tee -a "$LOG" + sudo pacman -R --noconfirm "$1" 2>&1 | tee -a "$LOG" # Making sure package is uninstalled if ! pacman -Qi "$1" &>> /dev/null ; then echo -e "\e[1A\e[K${OK} $1 was uninstalled." From 39a97acf3baffc878a134e5cae4fa548a73d425b Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 26 Aug 2024 20:32:19 +0900 Subject: [PATCH 3/4] Set to uninstall rofi as conflicts with rofi-wayland --- CHANGELOGS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index bf26eaa..179e803 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,5 +1,8 @@ ## Changelogs +## 26 Aug 2024 +- Set to uninstall rofi as conflicts with rofi-wayland + ## 14 Aug 2024 - added archlinux-keyring on base.sh From d0605b5afe2c3579244c882f7aaf1a3cef94d729 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 26 Aug 2024 23:09:29 +0900 Subject: [PATCH 4/4] added nvidia_drm.fbdev=1 for grub --- CHANGELOGS.md | 1 + install-scripts/nvidia.sh | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 179e803..d5790cb 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -2,6 +2,7 @@ ## 26 Aug 2024 - Set to uninstall rofi as conflicts with rofi-wayland +- added nvidia_drm.fbdev=1 for grub ## 14 Aug 2024 - added archlinux-keyring on base.sh diff --git a/install-scripts/nvidia.sh b/install-scripts/nvidia.sh index dbee63c..5bb3169 100755 --- a/install-scripts/nvidia.sh +++ b/install-scripts/nvidia.sh @@ -67,19 +67,28 @@ else printf "\n" fi -# additional for GRUB users +# Additional for GRUB users # Check if /etc/default/grub exists if [ -f /etc/default/grub ]; then - # Check if nvidia_drm.modeset=1 is already present + # Check if nvidia-drm.modeset=1 is present if ! sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub; then - # Add nvidia_drm.modeset=1 to GRUB_CMDLINE_LINUX_DEFAULT - sudo sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia-drm.modeset=1"/' /etc/default/grub - # Regenerate GRUB configuration - sudo grub-mkconfig -o /boot/grub/grub.cfg + # Add nvidia-drm.modeset=1 to GRUB_CMDLINE_LINUX_DEFAULT + sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia-drm.modeset=1"/' /etc/default/grub echo "nvidia-drm.modeset=1 added to /etc/default/grub" 2>&1 | tee -a "$LOG" - else - echo "nvidia-drm.modeset=1 is already present in /etc/default/grub" 2>&1 | tee -a "$LOG" fi + + # Check if nvidia_drm.fbdev=1 is present + if ! sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then + # Add nvidia_drm.fbdev=1 to GRUB_CMDLINE_LINUX_DEFAULT + sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia_drm.fbdev=1"/' /etc/default/grub + echo "nvidia_drm.fbdev=1 added to /etc/default/grub" 2>&1 | tee -a "$LOG" + fi + + # Regenerate GRUB configuration if any changes were made + if sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub || sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then + sudo grub-mkconfig -o /boot/grub/grub.cfg + fi + else echo "/etc/default/grub does not exist" fi