working on copy script

This commit is contained in:
shynd 2025-02-20 20:49:08 +01:00
parent d3d9cb8853
commit 2cbda9364c
1 changed files with 24 additions and 1 deletions

25
copy.sh
View File

@ -65,4 +65,27 @@ echo -e "\e[35m
░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░
\e[0m" \e[0m"
printf "\n%.0s" {1..1} printf "\n%.0s" {1..1}
# create directory for copy logs
if [ ! -d copy-logs ]; then
mkdir copy-logs
fi
# set the name of the log file to include the current date and time
LOG="copy-logs/install-$(date +%d-%H%M%S)_dotfiles.log"
# update home folders
xdg-user-dirs-update 2>&1 | tee -a "$LOG" || true
# setting up for nvidia
if lspci -k | grep -A 2 -E "(VGA|3D)" | grep -iq nvidia; then
echo "${INFO} nvidia gpu detected, setting up proper env's and configs" 2>&1 | tee "$LOG" || true
sed -i '/env = LIBVA_DRIVER_NAME,nvidia/s/^#//' config/hypr/UserConfigs/ENVariables.conf
sed -i '/env = __GLX_VENDOR_LIBRARY_NAME,nvidia/s/^#//' config/hypr/UserConfigs/ENVariables.conf
sed -i '/env = NVD_BACKEND,direct/s/^#//' config/hypr/UserConfigs/ENVariables.conf
# enabling no hardware cursors if nvidia detected
sed -i 's/^\([[:space:]]*no_hardware_cursors[[:space:]]*=[[:space:]]*\)false/\1true/' config/hypr/UserConfigs/UserSettings.conf
# disabling explicit sync for nvidia for now (Hyprland 0.42.0)
#sed -i 's/ explicit_sync = 2/ explicit_sync = 0/' config/hypr/UserConfigs/UserSettings.conf
fi