-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclone_dotconfig
executable file
·63 lines (53 loc) · 1.86 KB
/
clone_dotconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#! /bin/bash
# Check if GIT_PATH is already set
if [ -z "$GIT_PATH" ]; then
read -p "Do you want to create a default location for git repositories? (y/n) " create_git_dir
if [[ $create_git_dir =~ ^[Yy]$ ]]; then
read -p "Enter the path for git repositories (default: $HOME/git): " git_path
GIT_PATH=$git_path
export GIT_PATH
if [ ! -d "$GIT_PATH" ]; then
mkdir -p "$GIT_PATH"
echo "Created git directory at $GIT_PATH"
else
echo "Git directory already exists at $GIT_PATH"
fi
else
echo "Skipping git directory creation."
fi
else
echo "GIT_PATH is already set to $GIT_PATH"
fi
current_dir=$(pwd)
# Ask user if they want to use dotconfig files
read -p "Do you want to use the dotconfig files? (y/n) " use_dotconfig
if [[ $use_dotconfig =~ ^[Yy]$ ]]; then
echo "Setting up dotconfig files..."
# Check if .config folder exists
if [ ! -d "$HOME/.config" ]; then
echo "Creating .config folder..."
mkdir "$HOME/.config"
fi
# Clone dotconfig repository
echo "Cloning dotconfig repository..."
git clone https://github.com/curadotd/dotconfig.git $GIT_PATH/dotconfig
cd $GIT_PATH/dotconfig
cp bashrc $HOME/.bashrc
cp -R dunst $HOME/.config/
cp -R kitty $HOME/.config/
cp -R MangoHud $HOME/.config/
cp -R rofi $HOME/.config/
cp -R gamemode.ini $HOME/.config/
cp -R starship.toml $HOME/.config/
cp -R user-dirs.dirs $HOME/.config/
cp -R user-dirs.locale $HOME/.config/
cp -R qt5ct $HOME/.config/
# You may want to add additional steps here, such as:
# - Moving files from .config/dotconfig to .config
# - Removing the temporary dotconfig folder
# - Setting up symlinks if necessary
echo "Dotconfig setup complete."
cd $current_dir
else
echo "Skipping dotconfig setup."
fi