-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcopyconfigs.sh
executable file
·70 lines (63 loc) · 1.44 KB
/
copyconfigs.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
#!/usr/bin/env sh
while read line
do
if [ ! -z "$line" ] && ! [ "#" = "$(echo "$line" | tr -d " " | cut -c1)" ]; then
# create directory in this repo if it doesn't exist
dir_name="$(dirname "$line")"
[ -d "$dir_name" ] || mkdir -p "$dir_name"
# symbolic link to that config file
line_home="$HOME/$line"
# ln -s "$line_home" "$line" 2>/dev/null
rsync -a --delete "$line_home" "$line"
# verbose
[ "$1" = "-v" ] && echo "$line"
fi
# put the folders ending with "/" and the files not.
done <<EOF
# Xorg
.config/x11/
.xinitrc
# Doom Emacs
.config/doom/snippets/
.config/doom/config.org
.config/doom/custom.el
.config/doom/init.el
.config/doom/packages.el
# In home directory
.zshrc
.gtkrc-2.0
# scripts/ folder
sc/
# In config directory
.config/calcurse/
.config/dunst/
.config/dwmblocks/
.config/gtk-3.0/settings.ini
.config/i3/
.config/i3blocks/
.config/mailcap
.config/mimeapps.list
.config/mouse/
.config/mpd/mpd.conf
.config/ncmpcpp/
.config/nnn/config
.config/nnn/plugins/
.config/nsxiv/
.config/nvim/init.vim
.config/pacman-hooks/
.config/qtile/
.config/qutebrowser/autoconfig.yml
.config/qutebrowser/config.py
.config/qutebrowser/solarized-everything-css/
.config/qutebrowser/start.html
.config/redshift/
.config/sc-im/
.config/screenkey.json
.config/set-config.sh
.config/shell/
.config/sxhkd/
.config/tg/conf.py
.config/tmux/tmux.conf
#.config/wallpaper
.config/zathura/
EOF