diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2023-12-29 15:44:57 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-29 15:44:57 +0900 |
| commit | 2c070b5bfb2de84abed8a4cd45e999999021db38 (patch) | |
| tree | ab297f40d72eab1dad7506e005cec1654f942ff6 /copy.sh | |
| parent | 76672ae5a6ac03c416bc705d51dec363f88b7a40 (diff) | |
| parent | 69772de8b00a85a7da8e3d56c802fcfd01affe1c (diff) | |
Merge pull request #106 from JaKooLit/development
Development to Main for v2.2.2 Changes
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -4,6 +4,7 @@ clear wallpaper=$HOME/Pictures/wallpapers/Cute-Cat_ja.jpg +Waybar_Style="$HOME/.config/waybar/style/[Pywal] Chroma Fusion.css" # Check if running as root. If root, script will exit if [[ $EUID -eq 0 ]]; then @@ -36,17 +37,17 @@ xdg-user-dirs-update 2>&1 | tee -a "$LOG" || true # uncommenting WLR_NO_HARDWARE_CURSORS if nvidia is detected if lspci -k | grep -A 2 -E "(VGA|3D)" | grep -iq nvidia; then # NVIDIA GPU detected, uncomment line 23 in ENVariables.conf - sed -i '/env = WLR_NO_HARDWARE_CURSORS,1/s/^#//' config/hypr/configs/ENVariables.conf - sed -i '/env = LIBVA_DRIVER_NAME,nvidia/s/^#//' config/hypr/configs/ENVariables.conf - sed -i '/env = __GLX_VENDOR_LIBRARY_NAME,nvidia/s/^#//' config/hypr/configs/ENVariables.conf + sed -i '/env = WLR_NO_HARDWARE_CURSORS,1/s/^#//' config/hypr/UserConfigs/ENVariables.conf + 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 fi # uncommenting WLR_RENDERER_ALLOW_SOFTWARE,1 if running in a VM is detected if hostnamectl | grep -q 'Chassis: vm'; then echo "This script is running in a virtual machine." - sed -i '/env = WLR_NO_HARDWARE_CURSORS,1/s/^#//' config/hypr/configs/ENVariables.conf - sed -i '/env = WLR_RENDERER_ALLOW_SOFTWARE,1/s/^#//' config/hypr/configs/ENVariables.conf - sed -i '/monitor = Virtual-1, 1920x1080@60,auto,1/s/^#//' config/hypr/configs/Monitors.conf + sed -i '/env = WLR_NO_HARDWARE_CURSORS,1/s/^#//' config/hypr/UserConfigs/ENVariables.conf + sed -i '/env = WLR_RENDERER_ALLOW_SOFTWARE,1/s/^#//' config/hypr/UserConfigs/ENVariables.conf + sed -i '/monitor = Virtual-1, 1920x1080@60,auto,1/s/^#//' config/hypr/UserConfigs/Monitors.conf fi # Preparing hyprland.conf to check for current keyboard layout @@ -98,8 +99,8 @@ while true; do case $confirm in [yY]) # If the detected layout is correct, update the 'kb_layout=' line in the file - awk -v layout="$layout" '/kb_layout/ {$0 = " kb_layout=" layout} 1' config/hypr/configs/Settings.conf > temp.conf - mv temp.conf config/hypr/configs/Settings.conf + awk -v layout="$layout" '/kb_layout/ {$0 = " kb_layout=" layout} 1' config/hypr/UserConfigs/UserSettings.conf > temp.conf + mv temp.conf config/hypr/UserConfigs/UserSettings.conf break ;; [nN]) printf "\n%.0s" {1..2} @@ -111,8 +112,8 @@ while true; do printf "\n%.0s" {1..2} read -p "${CAT} - Please enter the correct keyboard layout: " new_layout # Update the 'kb_layout=' line with the correct layout in the file - awk -v new_layout="$new_layout" '/kb_layout/ {$0 = " kb_layout=" new_layout} 1' config/hypr/configs/Settings.conf > temp.conf - mv temp.conf config/hypr/configs/Settings.conf + awk -v new_layout="$new_layout" '/kb_layout/ {$0 = " kb_layout=" new_layout} 1' config/hypr/UserConfigs/UserSettings.conf > temp.conf + mv temp.conf config/hypr/UserConfigs/UserSettings.conf break ;; *) echo "Please enter either 'y' or 'n'." ;; @@ -166,7 +167,7 @@ get_backup_dirname() { echo "back-up_${timestamp}" } -for DIR in btop cava dunst hypr kitty Kvantum qt5ct qt6ct rofi swappy swaylock wal waybar wlogout; do +for DIR in btop cava hypr kitty Kvantum qt5ct qt6ct rofi swappy swaync swaylock wal waybar wlogout; do DIRPATH=~/.config/"$DIR" if [ -d "$DIRPATH" ]; then echo -e "${NOTE} - Config for $DIR found, attempting to back up." @@ -198,7 +199,7 @@ cp -r wallpapers ~/Pictures/ && { echo "${OK}Copy completed!"; } || { echo "${ER # Set some files as executable chmod +x ~/.config/hypr/scripts/* 2>&1 | tee -a "$LOG" - +chmod +x ~/.config/hypr/UserScripts/* 2>&1 | tee -a "$LOG" # Set executable for initial-boot.sh chmod +x ~/.config/hypr/initial-boot.sh 2>&1 | tee -a "$LOG" @@ -252,7 +253,7 @@ else fi # symlinks for waybar style -ln -sf "$HOME/.config/waybar/style/[Pywal] Chroma Fusion.css" "$HOME/.config/waybar/style.css" && \ +ln -sf "$Waybar_Style" "$HOME/.config/waybar/style.css" && \ # initialize pywal to avoid config error on hyprland wal -i $wallpaper -s -t 2>&1 | tee -a "$LOG" |
