From 2cbda9364cae61cf7eb88c0fc9d6223ace4c3527 Mon Sep 17 00:00:00 2001 From: shynd Date: Thu, 20 Feb 2025 20:49:08 +0100 Subject: [PATCH] working on copy script --- copy.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/copy.sh b/copy.sh index 4dfb77b..1642165 100644 --- a/copy.sh +++ b/copy.sh @@ -65,4 +65,27 @@ echo -e "\e[35m ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ \e[0m" -printf "\n%.0s" {1..1} \ No newline at end of file +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 \ No newline at end of file