Skip to content

Commit

Permalink
Fix config cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevithakannan2 committed Sep 24, 2024
1 parent d38d7a1 commit 7c2f780
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
8 changes: 5 additions & 3 deletions core/tabs/applications-setup/Developer-tools/neovim-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ installNeovim() {

backupNeovimConfig() {
printf "%b\n" "${YELLOW}Backing up existing configuration files...${RC}"
if [ -d "$HOME/.config/nvim" ] && [ ! -d "$HOME/.config/nvim-backup" ]; then
cp -r "$HOME/.config/nvim" "$HOME/.config/nvim-backup"
if [ -d "$HOME/.config/nvim" ]; then
if [ -d "$HOME/.config/nvim-linutilbak" ]; then
rm -rf "$HOME/.config/nvim-linutilbak"
fi
mv "$HOME/.config/nvim" "$HOME/.config/nvim-linutilbak"
fi
rm -rf "$HOME/.config/nvim"
}

linkNeovimConfig() {
Expand Down
7 changes: 5 additions & 2 deletions core/tabs/applications-setup/alacritty-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ installAlacritty() {

setupAlacrittyConfig() {
printf "%b\n" "${YELLOW}Copying alacritty config files...${RC}"
if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then
cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak"
if [ -d "${HOME}/.config/alacritty" ]; then
if [ -d "${HOME}/.config/alacritty-linutilbak" ]; then
rm -rf "${HOME}/.config/alacritty-linutilbak"
fi
mv "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-linutilbak"
fi
mkdir -p "${HOME}/.config/alacritty/"
curl -sSLo "${HOME}/.config/alacritty/alacritty.toml" "https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/alacritty/alacritty.toml"
Expand Down
7 changes: 5 additions & 2 deletions core/tabs/applications-setup/fastfetch-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ installFastfetch() {

setupFastfetchConfig() {
printf "%b\n" "${YELLOW}Copying Fastfetch config files...${RC}"
if [ -d "${HOME}/.config/fastfetch" ] && [ ! -d "${HOME}/.config/fastfetch-bak" ]; then
cp -r "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-bak"
if [ -d "${HOME}/.config/fastfetch" ]; then
if [ -d "${HOME}/.config/fastfetch-linutilbak" ]; then
rm -rf "${HOME}/.config/fastfetch-linutilbak"
fi
mv "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-linutilbak"
fi
mkdir -p "${HOME}/.config/fastfetch/"
curl -sSLo "${HOME}/.config/fastfetch/config.jsonc" https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/config.jsonc
Expand Down
7 changes: 5 additions & 2 deletions core/tabs/applications-setup/kitty-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ installKitty() {

setupKittyConfig() {
printf "%b\n" "${YELLOW}Copying Kitty configuration files...${RC}"
if [ -d "${HOME}/.config/kitty" ] && [ ! -d "${HOME}/.config/kitty-bak" ]; then
cp -r "${HOME}/.config/kitty" "${HOME}/.config/kitty-bak"
if [ -d "${HOME}/.config/kitty" ]; then
if [ -d "${HOME}/.config/kitty-linutilbak" ]; then
rm -rf "${HOME}/.config/kitty-linutilbak"
fi
mv "${HOME}/.config/kitty" "${HOME}/.config/kitty-linutilbak"
fi
mkdir -p "${HOME}/.config/kitty/"
curl -sSLo "${HOME}/.config/kitty/kitty.conf" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/kitty/kitty.conf
Expand Down
7 changes: 5 additions & 2 deletions core/tabs/applications-setup/rofi-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ installRofi() {

setupRofiConfig() {
printf "%b\n" "${YELLOW}Copying Rofi configuration files...${RC}"
if [ -d "$HOME/.config/rofi" ] && [ ! -d "$HOME/.config/rofi-bak" ]; then
cp -r "$HOME/.config/rofi" "$HOME/.config/rofi-bak"
if [ -d "$HOME/.config/rofi" ]; then
if [ -d "$HOME/.config/rofi-linutilbak" ]; then
rm -rf "$HOME/.config/rofi-linutilbak"
fi
mv "$HOME/.config/rofi" "$HOME/.config/rofi-linutilbak"
fi
mkdir -p "$HOME/.config/rofi"
curl -sSLo "$HOME/.config/rofi/powermenu.sh" https://github.com/ChrisTitusTech/dwm-titus/raw/main/config/rofi/powermenu.sh
Expand Down

0 comments on commit 7c2f780

Please sign in to comment.