-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·49 lines (46 loc) · 1.47 KB
/
setup
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
#!/usr/bin/env python3
import os
import sys
from pathlib import Path
devenv = Path(__file__).parent.resolve()
symlinks = [
("~/.alacritty.yml", "dotfiles/alacritty/alacritty.yml"),
("~/.config/atuin", "dotfiles/atuin"),
("~/.config/lsd", "dotfiles/lsd"),
("~/.config/zed", "dotfiles/zed"),
("~/.digrc", "dotfiles/dig/digrc"),
("~/.dircolors", "dotfiles/dircolors/dircolors"),
("~/.emacs.d/init.el", "emacs-config/emacs.el"),
("~/.gitconfig", "dotfiles/git/gitconfig"),
("~/.hammerspoon/init.lua", "dotfiles/hammerspoon/init.lua"),
("~/.pdbrc.py", "dotfiles/pdbrc.py"),
("~/.pdbrc.py", "dotfiles/pdbrc.py"),
("~/.config/wormhole", "dotfiles/wormhole"),
(
"~/Library/Application Support/pypoetry/config.toml",
"dotfiles/pypoetry/config.toml",
),
("~/.tmux.conf", "dotfiles/tmux/tmux.conf"),
("~/.zshrc", "shell-config/init.zsh"),
("~/bin", "bin"),
(
"~/Library/Application Support/Code - Insiders/User",
"dotfiles/vscode",
),
(
"~/Library/Application Support/Code/User",
"dotfiles/vscode",
),
(
"~/.vscode/extensions/extensions.json",
"dotfiles/vscode/extensions.json",
),
]
for source, target in symlinks:
source = Path(source).expanduser()
if source.exists():
continue
source.parent.mkdir(parents=True, exist_ok=True)
target = devenv / target
os.system(f'ln -sf "{target}" "{source}"')
print(f"{source} -> {target}")