-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup
executable file
·118 lines (101 loc) · 5.57 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/env bash
set -Euo pipefail
echo 'Executing setup'
mkdir -p ~/.cache/bin
mkdir -p ~/.config/fontconfig
mkdir -p ~/.config/environment.d
mkdir -p ~/.local/{bin,lib,scripts-ext,share,state}
SCRIPT=$(realpath -s "$0")
WORKDIR=$(dirname "$SCRIPT")
export PATH="$PATH:$WORKDIR/.local/script"
cd "$WORKDIR" || exit 1
chmod -R u=rwX,go-rwxs .ssh
[[ -r "$HOME/.config/user-dirs.dirs" ]] || {
mkdir -p ~/{desktop,documents,downloads,music,pictures,public,templates,videos}
command cp -rf ".config/user-dirs.dirs" ~/.config/
command cp -rf ".config/user-dirs.locale" ~/.config/
}
ln -sr .gnupg ~/ 2>/dev/null
ln -sr .ssh ~/ 2>/dev/null
ln -sr .xprofile ~/ 2>/dev/null
ln -srf .bashrc ~/
ln -srf .zshenv ~/
[[ -d ~/.config/atuin ]] && rm -rf ~/.config/atuin
ln -srf .config/atuin ~/.config/
ln -srf .config/chromium-flags.conf ~/.config/
ln -srf .config/chromium-flags.conf ~/.config/chrome-flags.conf
ln -srf .config/commitlintrc.yaml ~/.config/
ln -srf .config/environment.d/* ~/.config/environment.d/
ln -srf .config/eza ~/.config/
ln -srf .config/fd ~/.config/
ln -srf .config/fontconfig/conf.d ~/.config/fontconfig/
ln -srf .config/fzfrc ~/.config/fzfrc
ln -srf .config/git ~/.config/
ln -srf .config/luarocks ~/.config/
ln -srf .config/mpv ~/.config/
ln -srf .config/picom.conf ~/.config/
ln -srf .config/ripgreprc ~/.config/
ln -srf .config/shell ~/.config/
ln -srf .config/sxhkd ~/.config/
ln -srf .config/systemd ~/.config/
ln -srf .config/tmux ~/.config/
ln -srf .config/user-tmpfiles.d ~/.config/
ln -srf .config/vifm ~/.config/
ln -srf .config/vim ~/.config/
ln -srf .config/wezterm ~/.config/
ln -srf .config/wgetrc ~/.config/
ln -srf .config/xh ~/.config/
ln -srf .config/yt-dlp ~/.config/
ln -srf .config/zsh ~/.config/
ln -srf .local/lib/perl5 ~/.local/lib/
ln -srf .local/lib/shell ~/.local/lib/
ln -srf .local/script ~/.local/
ln -srf .local/share/3rdparty ~/.local/share/
ln -srf .local/share/distrobox ~/.local/share/
command cp -rf ".config/htop" ~/.config/ 2>/dev/null
command cp -rf ".config/locale.conf" ~/.config/ 2>/dev/null
if [[ "$USER" == "agrechkin" ]]; then
ln -srf .config/bspwm ~/.config/
ln -srf .config/containers ~/.config/
ln -srf .config/lazygit ~/.config/
ln -srf .config/luaformatter ~/.config/
ln -srf .config/markdownlint.yaml ~/.config/
ln -srf .config/nvim ~/.config/
ln -srf .config/perlcriticrc ~/.config/
ln -srf .config/perlcriticrc ~/.perlcriticrc
ln -srf .config/perlimports ~/.config/
ln -srf .config/perltidyrc ~/.perltidyrc
ln -srf .config/redshift ~/.config/
ln -srf .config/sql-formatter.json ~/.config/
ln -srf .config/sqlfluff ~/.config/
ln -srf .config/wireplumber ~/.config/
ln -srf .config/yamllint ~/.config/
ln -srf .config/zathura ~/.config/
ln -srf .config/zellij ~/.config/
[[ -f "$HOME/.config/npm" ]] || {
command cp -rf ".config/npm" ~/.config/
}
[[ -x "/volume1/local/arch/usr/bin/vim" ]] && {
ln -srfn .config/vim ~/.vim
}
[[ -x "$(command -v delta)" ]] && {
ln -srfn .config/git/gitconfig.delta ~/.config/gitconfig.delta
}
ln -srf .local/share/vim-dict ~/.local/share/
ln -srf .local/share/vim-plug ~/.local/share/
ln -srf .local/share/wiki ~/.local/share/
[[ -x submodules/private/setup ]] && {
echo 'Executing private/setup'
(exec submodules/private/setup)
}
[[ -x submodules/secret/setup ]] && {
echo 'Executing secret/setup'
(exec submodules/secret/setup)
}
else
ln -srfn .config/vim ~/.config/nvim
fi
[[ -d "$HOME/.config/kdedefaults" ]] || {
command cp -rf ".config/kdedefaults" ~/.config/
}
exit 0