one more tweak
This commit is contained in:
@@ -6,6 +6,7 @@ if [[ $USE_PRESET = [Yy] ]]; then
|
|||||||
source ./preset.sh
|
source ./preset.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
# Determine the directory where the script is located
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
@@ -19,6 +20,12 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log"
|
||||||
|
|
||||||
|
# Checking if current user is in the 'input' group
|
||||||
|
if groups "$(whoami)" | grep -q '\binput\b'; then
|
||||||
|
echo "USER $(whoami) is already in the 'input' group." 2>&1 > "$LOG"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
echo "${WARN} This script will add your ${YELLOW}user${RESET} to the ${MAGENTA}input${RESET} group."
|
echo "${WARN} This script will add your ${YELLOW}user${RESET} to the ${MAGENTA}input${RESET} group."
|
||||||
echo "${NOTE} Please note that adding yourself to the ${MAGENTA}input${RESET} group might be necessary for ${MAGENTA}waybar keyboard-state functionality${RESET} ."
|
echo "${NOTE} Please note that adding yourself to the ${MAGENTA}input${RESET} group might be necessary for ${MAGENTA}waybar keyboard-state functionality${RESET} ."
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ if grep -qE '^MODULES=.*nvidia. *nvidia_modeset.*nvidia_uvm.*nvidia_drm' /etc/mk
|
|||||||
echo "Nvidia modules already included in /etc/mkinitcpio.conf" 2>&1 | tee -a "$LOG"
|
echo "Nvidia modules already included in /etc/mkinitcpio.conf" 2>&1 | tee -a "$LOG"
|
||||||
else
|
else
|
||||||
sudo sed -Ei 's/^(MODULES=\([^\)]*)\)/\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf 2>&1 | tee -a "$LOG"
|
sudo sed -Ei 's/^(MODULES=\([^\)]*)\)/\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf 2>&1 | tee -a "$LOG"
|
||||||
echo "Nvidia modules added in /etc/mkinitcpio.conf"
|
echo "${OK} Nvidia modules added in /etc/mkinitcpio.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "\n%.0s" {1..1}
|
printf "\n%.0s" {1..1}
|
||||||
@@ -62,7 +62,7 @@ printf "\n%.0s" {1..1}
|
|||||||
# Additional Nvidia steps
|
# Additional Nvidia steps
|
||||||
NVEA="/etc/modprobe.d/nvidia.conf"
|
NVEA="/etc/modprobe.d/nvidia.conf"
|
||||||
if [ -f "$NVEA" ]; then
|
if [ -f "$NVEA" ]; then
|
||||||
printf "${OK} Seems like ${YELLOW}nvidia_drm modeset=1 fbdev=1${RESET} is already added in your system..moving on."
|
printf "${INFO} Seems like ${YELLOW}nvidia_drm modeset=1 fbdev=1${RESET} is already added in your system..moving on."
|
||||||
printf "\n"
|
printf "\n"
|
||||||
else
|
else
|
||||||
printf "\n"
|
printf "\n"
|
||||||
@@ -78,19 +78,19 @@ if [ -f /etc/default/grub ]; then
|
|||||||
# Check if nvidia-drm.modeset=1 is present
|
# Check if nvidia-drm.modeset=1 is present
|
||||||
if ! sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub; then
|
if ! sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub; then
|
||||||
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia-drm.modeset=1"/' /etc/default/grub
|
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia-drm.modeset=1"/' /etc/default/grub
|
||||||
printf "nvidia-drm.modeset=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
printf "${OK} nvidia-drm.modeset=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if nvidia_drm.fbdev=1 is present
|
# Check if nvidia_drm.fbdev=1 is present
|
||||||
if ! sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
if ! sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
||||||
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia_drm.fbdev=1"/' /etc/default/grub
|
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia_drm.fbdev=1"/' /etc/default/grub
|
||||||
printf "nvidia_drm.fbdev=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
printf "${OK} nvidia_drm.fbdev=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Regenerate GRUB configuration
|
# Regenerate GRUB configuration
|
||||||
if sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub || sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
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
|
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
printf "${YELLOW}GRUB${RESET} configuration regenerated\n" 2>&1 | tee -a "$LOG"
|
printf "${INFO} ${YELLOW}GRUB${RESET} configuration regenerated\n" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "${OK} Additional steps for ${YELLOW}GRUB${RESET} completed\n" 2>&1 | tee -a "$LOG"
|
printf "${OK} Additional steps for ${YELLOW}GRUB${RESET} completed\n" 2>&1 | tee -a "$LOG"
|
||||||
@@ -107,7 +107,7 @@ if [ -f /boot/loader/loader.conf ]; then
|
|||||||
find /boot/loader/entries/ -type f -name "*.conf" | while read imgconf; do
|
find /boot/loader/entries/ -type f -name "*.conf" | while read imgconf; do
|
||||||
# Backup conf
|
# Backup conf
|
||||||
sudo cp "$imgconf" "$imgconf.bak"
|
sudo cp "$imgconf" "$imgconf.bak"
|
||||||
printf "Backup created for systemd-boot loader: %s\n" "$imgconf" 2>&1 | tee -a "$LOG"
|
printf "${INFO} Backup created for systemd-boot loader: %s\n" "$imgconf" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
# Clean up options and update with NVIDIA settings
|
# Clean up options and update with NVIDIA settings
|
||||||
sdopt=$(grep -w "^options" "$imgconf" | sed 's/\b nvidia-drm.modeset=[^ ]*\b//g' | sed 's/\b nvidia_drm.fbdev=[^ ]*\b//g')
|
sdopt=$(grep -w "^options" "$imgconf" | sed 's/\b nvidia-drm.modeset=[^ ]*\b//g' | sed 's/\b nvidia_drm.fbdev=[^ ]*\b//g')
|
||||||
@@ -133,8 +133,7 @@ if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then
|
|||||||
printf "${OK} Seems like ${YELLOW}nouveau${RESET} is already blacklisted..moving on.\n"
|
printf "${OK} Seems like ${YELLOW}nouveau${RESET} is already blacklisted..moving on.\n"
|
||||||
else
|
else
|
||||||
echo "blacklist nouveau" | sudo tee -a "$NOUVEAU" 2>&1 | tee -a "$LOG"
|
echo "blacklist nouveau" | sudo tee -a "$NOUVEAU" 2>&1 | tee -a "$LOG"
|
||||||
printf "${NOTE} has been added to $NOUVEAU.\n"
|
printf "${INFO} has been added to $NOUVEAU.\n"
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
# To completely blacklist nouveau (See wiki.archlinux.org/title/Kernel_module#Blacklisting 6.1)
|
# To completely blacklist nouveau (See wiki.archlinux.org/title/Kernel_module#Blacklisting 6.1)
|
||||||
if [ -f "/etc/modprobe.d/blacklist.conf" ]; then
|
if [ -f "/etc/modprobe.d/blacklist.conf" ]; then
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar.log"
|
||||||
|
|
||||||
# Thunar
|
# Thunar
|
||||||
printf "${NOTE} Installing ${SKY_BLUE}Thunar${RESET} Packages...\n\n"
|
printf "${NOTE} Installing ${SKY_BLUE}Thunar${RESET} Packages...\n"
|
||||||
for THUNAR in "${thunar[@]}"; do
|
for THUNAR in "${thunar[@]}"; do
|
||||||
install_package "$THUNAR" "$LOG"
|
install_package "$THUNAR" "$LOG"
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "\n%.0s" {1..2}
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
if [[ $USE_PRESET = [Yy] ]]; then
|
||||||
source ./preset.sh
|
source ./preset.sh
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
|
||||||
|
|
||||||
# XDG-DESKTOP-PORTAL-HYPRLAND
|
# XDG-DESKTOP-PORTAL-HYPRLAND
|
||||||
printf "${NOTE} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland${RESET}\n\n"
|
printf "${NOTE} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland${RESET}\n"
|
||||||
for xdgs in "${xdg[@]}"; do
|
for xdgs in "${xdg[@]}"; do
|
||||||
install_package "$xdgs" "$LOG"
|
install_package "$xdgs" "$LOG"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user