-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathUpdate.py
More file actions
31 lines (28 loc) · 910 Bytes
/
Update.py
File metadata and controls
31 lines (28 loc) · 910 Bytes
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
import os
src_paths = [
"~/.config/hypr/",
"~/.config/nvim/",
"~/.config/kitty/",
"~/.config/fuzzel/",
"~/.config/yazi/",
]
target_paths = [
"~/Projects/My-dotfiles/.config/hypr",
"~/Projects/My-dotfiles/.config/nvim",
"~/Projects/My-dotfiles/.config/kitty",
"~/Projects/My-dotfiles/.config/fuzzel/",
"~/Projects/My-dotfiles/.config/yazi",
]
for src_path, target_path in zip(src_paths, target_paths):
if src_path == "~/.config/nvim/":
os.system(
f"""rsync -a -r --delete --exclude "lazy-lock.json" {src_path} {target_path}"""
)
elif src_path == "~/.config/yazi/":
os.system(
f"""rsync -a -r --delete --exclude "plugins/" {src_path} {target_path}"""
)
else:
os.system(f"rsync -a -r --quiet --delete {src_path} {target_path}")
# os.system("./special_for_zsh.d.sh")
print("Finished to update")