Browse Source

adjusted copy.sh for kb_layout and Rainbow Borders disabling

pull/365/head
JaKooLit 2 years ago
parent
commit
246266f582
  1. 84
      copy.sh

84
copy.sh

@ -36,6 +36,11 @@ if [ ! -d Copy-Logs ]; then
mkdir Copy-Logs
fi
# Function to print colorful text
print_color() {
printf "%b%s%b\n" "$1" "$2" "$CLEAR"
}
# 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"
@ -93,13 +98,26 @@ layout=$(detect_layout)
if [ "$layout" = "(unset)" ]; then
while true; do
printf "\n%.0s" {1..1}
echo "$(tput bold)$(tput setaf 3)ATTENTION!!!! VERY IMPORTANT!!!! $(tput sgr0)"
echo "$(tput bold)$(tput setaf 1)The keyboard layout could not be detected properly. $(tput sgr0)"
echo "$(tput bold)$(tput setaf 7)You need to set it manually. $(tput sgr0)"
echo "$(tput bold)$(tput setaf 2)If you are not sure, type us. You can change later on! $(tput sgr0)"
printf "\n%.0s" {1..1}
echo "$(tput bold)$(tput setaf 5)You can also set more than 2 layouts!$(tput sgr0)"
echo "$(tput bold)$(tput setaf 5)ie: us,kr,es $(tput sgr0)"
print_color $RED "
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
STOP AND READ
█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
!!! IMPORTANT WARNING !!!
The Default Keyboard Layout could not be detected
You need to set it Manually
!!! WARNING !!!
Setting a wrong Keyboard Layout will cause Hyprland to crash
If you are not sure, just type us
NOTE:
• You can also set more than 2 keyboard layouts
• For example us,kr,gb,ru
"
printf "\n%.0s" {1..1}
read -p "${CAT} - Please enter the correct keyboard layout: " new_layout
@ -128,12 +146,26 @@ while true; do
break ;;
[nN])
printf "\n%.0s" {1..2}
echo "$(tput bold)$(tput setaf 3)ATTENTION!!!! VERY IMPORTANT!!!! $(tput sgr0)"
echo "$(tput bold)$(tput setaf 1)Setting a wrong value here will result in Hyprland not starting $(tput sgr0)"
echo "$(tput bold)$(tput setaf 2)If you are not sure, type us. You can change later on! $(tput sgr0)"
printf "\n%.0s" {1..1}
echo "$(tput bold)$(tput setaf 5)You can also set more than 2 layouts!$(tput sgr0)"
echo "$(tput bold)$(tput setaf 5)ie: us,kr,es $(tput sgr0)"
print_color $RED "
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
STOP AND READ
█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
!!! IMPORTANT WARNING !!!
The Default Keyboard Layout could not be detected
You need to set it Manually
!!! WARNING !!!
Setting a wrong Keyboard Layout will cause Hyprland to crash
If you are not sure, just type us
NOTE:
• You can also set more than 2 keyboard layouts
• For example us,kr,gb,ru
"
printf "\n%.0s" {1..1}
read -p "${CAT} - Please enter the correct keyboard layout: " new_layout
@ -256,7 +288,31 @@ fi
printf "\n%.0s" {1..2}
### Copy Config Files ###
# Rainbow Borders
# Check if the user wants to disable Rainbow borders
# Print message about Rainbow Borders
printf "${NOTE} - By default, Rainbow Borders animation is enabled.\n"
printf "${NOTE} - However, this uses a bit more CPU and Memory resources.\n
# Prompt user to disable Rainbow Borders
read -p "Do you want to disable Rainbow Borders animation? (Y/N): " choice
if [[ "$choice" =~ ^[Yy]$ ]]; then
# Move RainbowBorders.sh script to backup location
mv config/hypr/UserScripts/RainbowBorders.sh config/hypr/UserScripts/RainbowBorders.bak.sh
# Comment out the line exec-once = $UserScripts/RainbowBorders.sh &
sed -i '/exec-once = \$UserScripts\/RainbowBorders.sh \&/s/^/#/' config/hypr/UserConfigs/Startup_Apps.conf
# Comment out the line animation = borderangle, 1, 180, liner, loop
sed -i '/ animation = borderangle, 1, 180, liner, loop/s/^/#/' config/hypr/UserConfigs/UserSettings.conf
echo "Rainbow borders is now disabled." 2>&1 | tee -a "$LOG"
else
echo "No changes made. Rainbow borders remain enabled." 2>&1 | tee -a "$LOG"
fi
# Copy Config Files #
set -e # Exit immediately if a command exits with a non-zero status.
printf "${NOTE} - copying dotfiles\n"

Loading…
Cancel
Save