-
Notifications
You must be signed in to change notification settings - Fork 0
/
SyncConfigFromMyPC.sh
88 lines (81 loc) · 2.17 KB
/
SyncConfigFromMyPC.sh
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
78
79
80
81
82
83
84
85
86
87
88
#!/bin/sh
# only config file option,
# default: true
# if it's flase, this script will sync plugin file
# if .....true , this script won't sync plugin file
OnlyConfigFile=$1
SyncConky (){
echo "(${FUNCNAME[@]})"
if test -e ~/.conkyrc ;then
echo "cp ~/.conkyrc ./conky/"
cp ~/.conkyrc ./conky/
fi
}
SyncFont (){
echo "(${FUNCNAME[@]})"
}
SyncNeovim(){
echo "(${FUNCNAME[@]})"
if $OnlyConfigFile == true && test -e ~/.config/nvim/init.vim; then
echo "cp ~/.config/nvim/init.vim ./neovim"
cp ~/.config/nvim/init.vim ./neovim
elif test -d ~/.config/nvim ;then
echo "rm -rf ./neovim/nvim && cp -r ~/.config/nvim ./neovim"
rm -rf ./neovim/nvim
cp -r ~/.config/nvim ./neovim
fi
}
SyncTmux (){
# TODO
echo "(${FUNCNAME[@]})"
return
if $OnlyConfigFile == true && test -e ~/.tmuxinator; then
echo "cp ~/.config/nvim/init.vim ./neovim"
cp ~/.config/nvim/init.vim ./neovim
elif test -d ~/.config/nvim ;then
echo "cp -r ~/.config/nvim ./neovim"
cp -r ~/.config/nvim ./neovim
fi
}
Syncwtf (){
echo "(${FUNCNAME[@]})"
if $OnlyConfigFile == true && test -e ~/.config/wtf; then
echo "cp ~/.config/wtf/config.yml ./wtf"
cp ~/.config/wtf/config.yml ./wtf
elif test -d ~/.config/wtf;then
echo "rm -rf ./wtf/wtf && cp -r ~/.config/wtf ./wtf"
rm -rf ./wtf/wtf
cp -r ~/.config/wtf ./wtf
fi
}
SyncZsh (){
echo "(${FUNCNAME[@]})"
if test -d ~/.zshrc;then
echo "cp ~/.zshrc ./zsh"
cp ~/.zshrc ./zsh
fi
if $OnlyConfigFile == true ; then
return
else
if test -d ~/.tmuxinator;then
echo "rm -rf ./zsh/.tmuxinator && cp -r ~/.config/nvim/init.vim ./zsh"
rm -rf ./zsh/.tmuxinator
cp -r ~/.tmuxinator ./zsh
fi
if test -d ~/.oh-my-zsh;then
echo "rm -rf ./zsh/.oh-my-zsh && cp -r ~/.oh-my-zsh ./zsh"
rm -rf ./zsh/.oh-my-zsh
cp -r ~/.oh-my-zsh ./zsh
fi
fi
}
#SyncConky(){echo "${FUNCNAME[@]})"}
start(){
SyncConky
SyncFont
SyncNeovim
SyncTmux
Syncwtf
SyncZsh
}
start