-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·78 lines (66 loc) · 2.25 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·78 lines (66 loc) · 2.25 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/env bash
echo -ne "\033[32m"
echo "========================================="
echo " Dotfiles - watasuke102 "
echo " https://github.com/watasuke102/dotfiles "
echo "========================================="
echo -ne "\033[39m"
cat << END
Following files and directory will be overwritten.
* ~/.func
* ~/.zshrc
* ~/.aliases
* ~/.gdbinit
* ~/.tmux.conf
* ~/.config/xremap.yml
* ~/.config/ags/
* ~/.config/dunst/
* ~/.config/hypr/
* ~/.config/lazygit/
* ~/.config/nvim/
* ~/.config/swaylock/
* ~/.config/wofi/
* ~/.config/wezterm
END
echo -n "Do you want to continue? [y/N] "
read -n1 input
echo
if [[ ${input} != "y" ]]; then
echo "aborting."
exit 1
fi
current=$(cd $(dirname ${0}); pwd)
if [[ ! -e ~/.gdb-dashboard ]]; then
echo -e "\033[36m[info] Downloading '.gdb-dashboard'...\033[39m"
curl https://raw.githubusercontent.com/cyrus-and/gdb-dashboard/master/.gdbinit -o ~/.gdb-dashboard
fi
if [[ ! -e ~/.git-prompt.sh ]]; then
echo -e "\033[36m[info] Downloading '.git-prompt.sh'...\033[39m"
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
fi
if ! grep -Eq "path = .+/dotfiles/\.gitconfig" ~/.gitconfig; then
echo -e "\033[36m[info] Setting up gitconfig...\033[39m"
cat << END >> ~/.gitconfig
[include]
path = ${current}/.gitconfig
END
fi
echo -e "\033[36m[info] Creating symlink...\033[39m"
mkdir -p ~/.config
ln -snvf ${current}/.func ~/.func
ln -snvf ${current}/.zshrc ~/.zshrc
ln -snvf ${current}/.aliases ~/.aliases
ln -snvf ${current}/.gdbinit ~/.gdbinit
ln -snvf ${current}/.tmux.conf ~/.tmux.conf
ln -snvf ${current}/.config/xremap.yml ~/.config/xremap.yml
ln -snvfd ${current}/.config/ags ~/.config/ags
ln -snvfd ${current}/.config/hypr ~/.config/hypr
ln -snvfd ${current}/.config/nvim ~/.config/nvim
ln -snvfd ${current}/.config/wofi ~/.config/wofi
ln -snvfd ${current}/.config/dunst ~/.config/dunst
ln -snvfd ${current}/.config/lazygit ~/.config/lazygit
ln -snvfd ${current}/.config/wezterm ~/.config/wezterm
ln -snvfd ${current}/.config/swaylock ~/.config/swaylock
echo -e "\033[36m[info] initialize config files...\033[39m"
touch ~/.config/hypr/screen.conf
echo -e "\033[32m[info] All done!\033[32m"