-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall
executable file
·180 lines (147 loc) · 5.18 KB
/
install
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
#!/usr/bin/env zsh
unalias rm
BASEDIR="$(cd "$(dirname "${ZSH_SOURCE[0]}")" && pwd)"
link_config() {
src=$1
dst=$2
rm -rf $HOME/$dst
ln -sfn ${BASEDIR}/$src $HOME/$dst
}
link_dev() {
echo "Installing Dev config..."
link_config vim/vim .vim
link_config vim/vimrc .vimrc
link_config vim/gvimrc .gvimrc
link_config nvim .config/nvim
link_config zsh/zsh .zsh
link_config zsh/zprofile .zprofile
link_config zsh/zshenv .zshenv
link_config zsh/zshrc .zshrc
link_config git/gitconfig .gitconfig
link_config git/gitconfig.secrets .gitconfig.secrets
link_config git/gitignore .gitignore
link_config git/gitattributes .gitattributes
link_config tmux/tmux.conf .tmux.conf
link_config ruby/irbrc .irbrc
link_config scheme/csirc .csirc
link_config rg/rgignore .rgignore
link_config ctags/ctags .ctags
link_config ghostty .config/ghostty
link_config alacritty .config/alacritty
echo "fetching vim plugins..."
vim -c PlugInstall -c qall
echo "fetching nvim plugins..."
nvim -c Lazy install -c qall
source $HOME/.zshrc
echo "zshrc sourced."
}
link_linux_shared() {
echo "Installing Linux shared config..."
link_config linux_shared/zathura .config/zathura
link_config linux_shared/gtk-3.0 .config/gtk-3.0
echo "I'd just like to interject for a moment. What you’re referring to as
Linux, is in fact, GNU/Linux, or as I’ve recently taken to calling it,
GNU plus Linux. Linux is not an operating system unto itself, but rather
another free component of a fully functioning GNU system made useful by
the GNU corelibs, shell utilities and vital system components comprising
a full OS as defined by POSIX. Many computer users run a modified
version of the GNU system every day, without realizing it. Through a
peculiar turn of events, the version of GNU which is widely used today
is often called “Linux”, and many of its users are not aware that it is
basically the GNU system, developed by the GNU Project. There really is
a Linux, and these people are using it, but it is just a part of the
system they use. Linux is the kernel: the program in the system that
allocates the machine’s resources to the other programs that you run.
The kernel is an essential part of an operating system, but useless by
itself; it can only function in the context of a complete operating
system. Linux is normally used in combination with the GNU operating
system: the whole system is basically GNU with Linux added, or
GNU/Linux. All the so-called “Linux” distributions are really
distributions of GNU/Linux.
"
}
link_linux_wayland() {
echo "Installing Linux Wayland config..."
link_config wayland/hypr .config/hypr
link_config wayland/sway .config/sway
link_config wayland/waybar .config/waybar
link_config wayland/fuzzel .config/fuzzel
link_config wayland/wofi .config/wofi
link_config wayland/nwg-drawer .config/nwg-drawer
link_config wayland/wpaperd .config/wpaperd
link_config wayland/mako .config/mako
link_config wayland/swaync .config/swaync
link_linux_shared
}
link_linux_x11() {
echo "Installing Linux X11 config..."
link_config bin/fehbg .fehbg
link_config X11/xinitrc .xinitrc
link_config X11/Xresources .Xresources
link_config X11/rofi .config/rofi
link_config X11/picom .config/picom
link_config X11/fontconfig .config/fontconfig
link_linux_shared
}
link_macos() {
echo "Installing MacOS config..."
link_config macos/yabai .config/yabai
link_config macos/skhd .config/skhd
link_config macos/aerospace .config/aerospace
link_config macos/sketchybar .config/sketchybar
}
link_cli_tools() {
echo "Installing CLI tools..."
link_config fastfetch .config/fastfetch
link_config newsboat .newsboat
# link_config nnn .config/nnn
# link_config cmus .config/cmus
}
link_fonts() {
echo "Installing Fonts..."
[ -d $HOME/workspace/fonts/ ] || (git clone https://github.com/powerline/fonts.git $HOME/workspace/fonts/ && pushd $HOME/workspace/fonts && ./install.sh && popd)
[ -d $HOME/workspace/fonts/icons-in-terminal/ ] || (git clone https://github.com/sebastiencs/icons-in-terminal.git $HOME/workspace/fonts/icons-in-terminal && pushd $HOME/workspace/fonts/icons-in-terminal && ./install.sh && popd)
[ -d $HOME/workspace/icons/ ] || (git clone https://github.com/dhanishgajjar/terminal-icons $HOME/workspace/icons/terminal-icons)
}
echo "Creating workspace folder..."
mkdir -p $HOME/workspace
mkdir -p $HOME/.config
echo "Updating Git submodules..."
git submodule update --init --recursive --remote
if [ $# -eq 0 ]; then
echo "Installing all..."
link_dev
link_linux_wayland
link_linux_x11
link_macos
link_cli_tools
link_fonts
elif [[ condition ]]; then
while test $# -gt 0
do
case "$1" in
dev)
link_dev
;;
linux)
link_linux_wayland
;;
linux-x)
link_linux_x11
;;
macos)
link_macos
;;
cli)
link_cli_tools
;;
fonts)
link_fonts
;;
*)
echo "Usage: $0 [*|dev|linux|linux-x|macos|cli|fonts]"
;;
esac
shift
done
fi