Updates
This commit is contained in:
parent
2de300120e
commit
a812d7b144
|
@ -8,11 +8,11 @@ echo -e "${GREEN}"
|
||||||
figlet "Backup"
|
figlet "Backup"
|
||||||
echo -e "${NONE}"
|
echo -e "${NONE}"
|
||||||
if [ -d ~/dotfiles ]; then
|
if [ -d ~/dotfiles ]; then
|
||||||
echo "The script has detected an existing dotfiles folder and will try to create a backup into the folder:"
|
echo ":: The script has detected an existing dotfiles folder and will try to create a backup into the folder:"
|
||||||
echo " ~/dotfiles-versions/backups/$datets"
|
echo " ~/dotfiles-versions/backups/$datets"
|
||||||
fi
|
fi
|
||||||
if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
|
if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
|
||||||
echo "The script has detected an existing .bashrc file and will try to create a backup to:"
|
echo ":: The script has detected an existing .bashrc file and will try to create a backup to:"
|
||||||
echo " ~/dotfiles-versions/backups/$datets/.bashrc-old"
|
echo " ~/dotfiles-versions/backups/$datets/.bashrc-old"
|
||||||
fi
|
fi
|
||||||
if gum confirm "Do you want to create a backup?" ;then
|
if gum confirm "Do you want to create a backup?" ;then
|
||||||
|
@ -30,16 +30,16 @@ echo -e "${NONE}"
|
||||||
fi
|
fi
|
||||||
if [ -d ~/dotfiles ]; then
|
if [ -d ~/dotfiles ]; then
|
||||||
rsync -a ~/dotfiles/ ~/dotfiles-versions/backups/$datets/
|
rsync -a ~/dotfiles/ ~/dotfiles-versions/backups/$datets/
|
||||||
echo "Backup of your current dotfiles in ~/dotfiles-versions/backups/$datets created."
|
echo ":: Backup of your current dotfiles in ~/dotfiles-versions/backups/$datets created."
|
||||||
fi
|
fi
|
||||||
if [ -f ~/.bashrc ]; then
|
if [ -f ~/.bashrc ]; then
|
||||||
cp ~/.bashrc ~/dotfiles-versions/backups/$datets/.bashrc-old
|
cp ~/.bashrc ~/dotfiles-versions/backups/$datets/.bashrc-old
|
||||||
echo "Existing .bashrc file found in homefolder. .bashrc-old created"
|
echo ":: Existing .bashrc file found in homefolder. .bashrc-old created"
|
||||||
fi
|
fi
|
||||||
elif [ $? -eq 130 ]; then
|
elif [ $? -eq 130 ]; then
|
||||||
exit 130
|
exit 130
|
||||||
else
|
else
|
||||||
echo "Backup skipped."
|
echo ":: Backup skipped."
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -23,7 +23,7 @@ if [[ ! $(tty) == *"pts"* ]] && [ -d ~/dotfiles ]; then
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
if [ -d ~/dotfiles ]; then
|
if [ -d ~/dotfiles ]; then
|
||||||
echo "The script will overwrite existing files but will not remove additional files or folders of your custom configuration."
|
echo "The script will overwrite existing files but will not remove additional files or folders from your custom configuration."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -d ~/dotfiles ]; then
|
if [ ! -d ~/dotfiles ]; then
|
||||||
|
|
|
@ -5,11 +5,11 @@ if [ -f ~/dotfiles-versions/hook.sh ]; then
|
||||||
echo -e "${GREEN}"
|
echo -e "${GREEN}"
|
||||||
figlet "Hook"
|
figlet "Hook"
|
||||||
echo -e "${NONE}"
|
echo -e "${NONE}"
|
||||||
echo "The script has detected a hook.sh script."
|
echo ":: The script has detected a hook.sh script."
|
||||||
if gum confirm "Do you want to run the script now?"; then
|
if gum confirm "Do you want to run the script now?"; then
|
||||||
source ~/dotfiles-versions/hook.sh
|
source ~/dotfiles-versions/hook.sh
|
||||||
echo "hook.sh executed!"
|
echo ":: hook.sh executed!"
|
||||||
else
|
else
|
||||||
echo "Execution of hook.sh skipped."
|
echo ":: Execution of hook.sh skipped."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -14,7 +14,7 @@ _setupKeyboardLayout() {
|
||||||
echo "Start typing = Search, RETURN = Confirm, CTRL-C = Cancel"
|
echo "Start typing = Search, RETURN = Confirm, CTRL-C = Cancel"
|
||||||
keyboard_layout=$(localectl list-x11-keymap-layouts | gum filter --height 15 --placeholder "Find your keyboard layout...")
|
keyboard_layout=$(localectl list-x11-keymap-layouts | gum filter --height 15 --placeholder "Find your keyboard layout...")
|
||||||
echo ""
|
echo ""
|
||||||
echo "Keyboard layout changed to $keyboard_layout"
|
echo ":: Keyboard layout changed to $keyboard_layout"
|
||||||
echo ""
|
echo ""
|
||||||
_confirmKeyboard
|
_confirmKeyboard
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ _confirmKeyboard() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$restored" == "1" ]; then
|
if [ "$restored" == "1" ]; then
|
||||||
echo "You have already restored your settings into the new installation."
|
echo ":: You have already restored your settings into the new installation."
|
||||||
else
|
else
|
||||||
_confirmKeyboard
|
_confirmKeyboard
|
||||||
|
|
||||||
|
@ -48,6 +48,6 @@ else
|
||||||
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/autostart.sh
|
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/autostart.sh
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Keyboard setup updated successfully."
|
echo ":: Keyboard setup updated successfully."
|
||||||
echo "PLEASE NOTE: You can update your keyboard layout later in ~/dotfiles/hypr/conf/keyboard.conf"
|
echo "PLEASE NOTE: You can update your keyboard layout later in ~/dotfiles/hypr/conf/keyboard.conf"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -54,7 +54,7 @@ _installPackagesPacman() {
|
||||||
toInstall=();
|
toInstall=();
|
||||||
for pkg; do
|
for pkg; do
|
||||||
if [[ $(_isInstalledPacman "${pkg}") == 0 ]]; then
|
if [[ $(_isInstalledPacman "${pkg}") == 0 ]]; then
|
||||||
echo "${pkg} is already installed.";
|
echo ":: ${pkg} is already installed.";
|
||||||
continue;
|
continue;
|
||||||
fi;
|
fi;
|
||||||
toInstall+=("${pkg}");
|
toInstall+=("${pkg}");
|
||||||
|
@ -88,7 +88,7 @@ _installPackagesYay() {
|
||||||
toInstall=();
|
toInstall=();
|
||||||
for pkg; do
|
for pkg; do
|
||||||
if [[ $(_isInstalledYay "${pkg}") == 0 ]]; then
|
if [[ $(_isInstalledYay "${pkg}") == 0 ]]; then
|
||||||
echo "${pkg} is already installed.";
|
echo ":: ${pkg} is already installed.";
|
||||||
continue;
|
continue;
|
||||||
fi;
|
fi;
|
||||||
toInstall+=("${pkg}");
|
toInstall+=("${pkg}");
|
||||||
|
@ -130,20 +130,20 @@ _installSymLink() {
|
||||||
if [ -L "${symlink}" ]; then
|
if [ -L "${symlink}" ]; then
|
||||||
rm ${symlink}
|
rm ${symlink}
|
||||||
ln -s ${linksource} ${linktarget}
|
ln -s ${linksource} ${linktarget}
|
||||||
echo "Symlink ${linksource} -> ${linktarget} created."
|
echo ":: Symlink ${linksource} -> ${linktarget} created."
|
||||||
else
|
else
|
||||||
if [ -d ${symlink} ]; then
|
if [ -d ${symlink} ]; then
|
||||||
rm -rf ${symlink}/
|
rm -rf ${symlink}/
|
||||||
ln -s ${linksource} ${linktarget}
|
ln -s ${linksource} ${linktarget}
|
||||||
echo "Symlink for directory ${linksource} -> ${linktarget} created."
|
echo ":: Symlink for directory ${linksource} -> ${linktarget} created."
|
||||||
else
|
else
|
||||||
if [ -f ${symlink} ]; then
|
if [ -f ${symlink} ]; then
|
||||||
rm ${symlink}
|
rm ${symlink}
|
||||||
ln -s ${linksource} ${linktarget}
|
ln -s ${linksource} ${linktarget}
|
||||||
echo "Symlink to file ${linksource} -> ${linktarget} created."
|
echo ":: Symlink to file ${linksource} -> ${linktarget} created."
|
||||||
else
|
else
|
||||||
ln -s ${linksource} ${linktarget}
|
ln -s ${linksource} ${linktarget}
|
||||||
echo "New symlink ${linksource} -> ${linktarget} created."
|
echo ":: New symlink ${linksource} -> ${linktarget} created."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,19 +4,19 @@
|
||||||
echo -e "${GREEN}"
|
echo -e "${GREEN}"
|
||||||
figlet "Preparation"
|
figlet "Preparation"
|
||||||
echo -e "${NONE}"
|
echo -e "${NONE}"
|
||||||
echo "Preparing temporary folders for the installation."
|
echo ":: Preparing temporary folders for the installation."
|
||||||
if [ ! -d ~/dotfiles-versions ]; then
|
if [ ! -d ~/dotfiles-versions ]; then
|
||||||
mkdir ~/dotfiles-versions
|
mkdir ~/dotfiles-versions
|
||||||
echo "~/dotfiles-versions folder created."
|
echo ":: ~/dotfiles-versions folder created."
|
||||||
fi
|
fi
|
||||||
if [ ! -d ~/dotfiles-versions/$version ]; then
|
if [ ! -d ~/dotfiles-versions/$version ]; then
|
||||||
mkdir ~/dotfiles-versions/$version
|
mkdir ~/dotfiles-versions/$version
|
||||||
echo "~/dotfiles-versions/$version folder created."
|
echo ":: ~/dotfiles-versions/$version folder created."
|
||||||
else
|
else
|
||||||
echo "The folder ~/dotfiles-versions/$version already exists from previous installations."
|
echo ":: The folder ~/dotfiles-versions/$version already exists from previous installations."
|
||||||
rm -rf ~/dotfiles-versions/$version
|
rm -rf ~/dotfiles-versions/$version
|
||||||
mkdir ~/dotfiles-versions/$version
|
mkdir ~/dotfiles-versions/$version
|
||||||
echo "Clean build prepared for the installation."
|
echo ":: Clean build prepared for the installation."
|
||||||
fi
|
fi
|
||||||
rsync -a -I --exclude-from=.install/excludes.txt . ~/dotfiles-versions/$version/
|
rsync -a -I --exclude-from=.install/excludes.txt . ~/dotfiles-versions/$version/
|
||||||
if [[ $(_isFolderEmpty ~/dotfiles-versions/$version/) == 0 ]] ;then
|
if [[ $(_isFolderEmpty ~/dotfiles-versions/$version/) == 0 ]] ;then
|
||||||
|
@ -25,5 +25,5 @@ if [[ $(_isFolderEmpty ~/dotfiles-versions/$version/) == 0 ]] ;then
|
||||||
echo "Execution of rsync -a -I --exclude-from=.install/excludes.txt . ~/dotfiles-versions/$version/ is required."
|
echo "Execution of rsync -a -I --exclude-from=.install/excludes.txt . ~/dotfiles-versions/$version/ is required."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
echo "dotfiles $version successfully prepared in ~/dotfiles-versions/$version/"
|
echo ":: dotfiles $version successfully prepared in ~/dotfiles-versions/$version/"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -28,7 +28,7 @@ if [ ! -d ~/wallpaper ]; then
|
||||||
echo "Default wallpapers installed successfully."
|
echo "Default wallpapers installed successfully."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "~/wallpaper folder already exists."
|
echo ":: ~/wallpaper folder already exists."
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ echo -e "${GREEN}"
|
||||||
figlet "yay"
|
figlet "yay"
|
||||||
echo -e "${NONE}"
|
echo -e "${NONE}"
|
||||||
if sudo pacman -Qs yay > /dev/null ; then
|
if sudo pacman -Qs yay > /dev/null ; then
|
||||||
echo "yay is already installed!"
|
echo ":: yay is already installed!"
|
||||||
else
|
else
|
||||||
echo "yay is not installed. Will be installed now!"
|
echo ":: yay is not installed. Starting the installation!"
|
||||||
_installPackagesPacman "base-devel"
|
_installPackagesPacman "base-devel"
|
||||||
SCRIPT=$(realpath "$0")
|
SCRIPT=$(realpath "$0")
|
||||||
temp_path=$(dirname "$SCRIPT")
|
temp_path=$(dirname "$SCRIPT")
|
||||||
|
@ -16,6 +16,6 @@ else
|
||||||
cd ~/yay-git
|
cd ~/yay-git
|
||||||
makepkg -si
|
makepkg -si
|
||||||
cd $temp_path
|
cd $temp_path
|
||||||
echo "yay has been installed successfully."
|
echo ":: yay has been installed successfully."
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
|
@ -137,7 +137,7 @@
|
||||||
|
|
||||||
# The spacing between lines. If the height is smaller than the
|
# The spacing between lines. If the height is smaller than the
|
||||||
# font height, it will get raised to the font height.
|
# font height, it will get raised to the font height.
|
||||||
line_height = 3
|
line_height = 1
|
||||||
|
|
||||||
# Possible values are:
|
# Possible values are:
|
||||||
# full: Allow a small subset of html markup in notifications:
|
# full: Allow a small subset of html markup in notifications:
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
|
|
||||||
# Vertical alignment of message text and icon.
|
# Vertical alignment of message text and icon.
|
||||||
# Possible values are "top", "center" and "bottom".
|
# Possible values are "top", "center" and "bottom".
|
||||||
vertical_alignment = center
|
vertical_alignment = top
|
||||||
|
|
||||||
# Show age of message if message is older than show_age_threshold
|
# Show age of message if message is older than show_age_threshold
|
||||||
# seconds.
|
# seconds.
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
enable_recursive_icon_lookup = true
|
enable_recursive_icon_lookup = true
|
||||||
|
|
||||||
# Set icon theme (only used for recursive icon lookup)
|
# Set icon theme (only used for recursive icon lookup)
|
||||||
icon_theme = Adwaita
|
icon_theme = "Papirus-Dark,Adwaita"
|
||||||
# You can also set multiple icon themes, with the leftmost one being used first.
|
# You can also set multiple icon themes, with the leftmost one being used first.
|
||||||
# icon_theme = "Adwaita, breeze"
|
# icon_theme = "Adwaita, breeze"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user