-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
186 lines (141 loc) · 4.67 KB
/
Makefile
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
181
182
183
184
185
186
arch: arch-start files
@echo "run `make gui' to setup gui environment"
ubuntu: ubuntu-start files
mac: mac-start files
##############
### ubuntu ###
##############
ubuntu-start: ubuntu-lang ubuntu-clis
sudo chsh -s /bin/zsh
ubuntu-lang: rust ubuntu-py
sudo apt install nodejs npm texlive texlive-latex-extra
ubuntu-py:
sudo apt install python3.8-venv
pip install --upgrade pip
pip install ipython ptpython
python -m venv ~/.py
ubuntu-clis:
sudo apt install zsh mosh tmux gnupg pass jq bat ripgrep
cargo install --locked zellij eza sd fd-find git-delta
############
### arch ###
############
arch-start: arch-lang arch-lang-util arch-clis arch-service
chsh -s /bin/zsh
arch-lang: rust
sudo pacman -S python go nodejs npm texlive-core
arch-lang-util: arch-py
sudo pacman -S texlive-latexextra texlive-genericextra
arch-py:
sudo pacman -S python-pip
pip install --upgrade pip # arch repo can be outdated
sudo pip install ipython ptpython
python -m venv ~/.py
arch-clis: trizen
sudo pacman -S git zsh mosh tmux zellij gnupg pass jq eza sd bat fd ripgrep git-delta
trizen:
git clone https://aur.archlinux.org/trizen.git
cd trizen && makepkg -si
arch-service:
sudo pacman -S openssh
sudo systemctl enable sshd
###########
### mac ###
###########
mac-start: brew mac-lang mac-clis mac-alacritty mac-hammerspoon
chsh -s /bin/zsh
brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
mac-lang: mac-py
brew install go
brew cask install mactex
mac-py:
brew install python3
pip3 install virtualenv ipython ptpython
virtualenv ~/.py
mac-clis:
brew install mosh tmux zellij pass jq eza sd bat fd ripgrep git-delta
mac-alacritty:
brew cask install alacritty
mac-hammerspoon:
brew install hammerspoon
mkdir -p ~/.hammerspoon
cp hammerspoon.lua ~/.hammerspoon/init.lua
####################
### other common ###
####################
rust:
curl https://sh.rustup.rs -sSf | sh
~/.cargo/bin/rustup update
#############
### files ###
#############
files: sh bins vim
cp gitconfig ~/.gitconfig
cp tmux.conf ~/.tmux.conf
mkdir -p ~/.config/alacritty && cp alacritty.toml ~/.config/alacritty/alacritty.toml
cp -r zellij ~/.config/
curl -LSso ~/.config/zellij/zjstatus.wasm https://github.com/dj95/zjstatus/releases/download/v0.11.2/zjstatus.wasm
sh:
git clone --recursive https://github.com/lorepozo/zsh ~/.zsh && ln -sf ~/.zsh/zshrc ~/.zshrc
echo "source ~/.zsh/aliases.zsh" >>~/.bashrc
echo "source ~/.zsh/environment.zsh" >>~/.bashrc
bins:
mkdir -p ~/bin
curl -LSso ~/bin/tobase https://raw.githubusercontent.com/lorepozo/tobase/master/tobase
chmod +x ~/bin/tobase
cp bin/* ~/bin/
vim: vim-config # vim-langservers
vim-config:
mkdir -p ~/.vim/autoload ~/.vim/bundle ~/.vim/colors ~/.config
if [ `uname` = "Darwin" ]; then sed -i '' s/unknown-linux-musl/apple-darwin/ init.vim ; fi
cp init.vim ~/.vim/init.vim
cp colors.vim ~/.vim/colors/lore.vim
curl -LSso ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
ln -s ~/.vim/init.vim ~/.vimrc
vim -c PlugUpgrade -c PlugInstall -c PlugUpdate -c qa
vim-langservers:
sudo pip3 install python-language-server
~/.cargo/bin/rustup component add rust-src rust-analyzer
#npm i -g javascript-typescript-langserver
#go get -u github.com/sourcegraph/go-langserver
cp language_client_settings.json ~/.vim/language_client_settings.json
#############
### gui ###
#############
gui:
@echo "select either gui-vm or gui-mac"
gui-vm: xorg-vm gui-general
@echo "you may need to install additional drivers"
gui-mac: xorg-mac gui-general
@echo "you may need to install additional drivers"
gui-general: drivers xmonad applications
drivers:
sudo pacman -S xf86-input-synaptics nvidia
xorg:
sudo pacman -S xorg-server xorg-xinit xorg-server-utils xorg-xinit xorg-xrandr xorg-xrdb slim
cp zlogin ~/.zlogin
cp xinitrc ~/.xinitrc
cp Xresources ~/.Xresources
systemctl enable slim
xorg-vm: xorg
[[ -f /etc/X11/xorg.conf ]] && mv /etc/X11/xorg.conf /etc/X11/xorg.old.conf
cp xorg.vm.conf /etc/X11/xorg.conf
xorg-mac: xorg
sudo pacman -S acpid
systemctl enable acpid
nvidia-xconfig
echo "install i915 /bin/false\ninstall intel_agp /bin/false\ninstall intel_gtt /bin/false" > /etc/modprobe.d/video.conf
setpci -v -H1 -s 00:01.00 BRIDGE_CONTROL=0
ln -s /sys/class/backlight/gmux_backlight/brightness ~/bin/backlight_screen
ln -s /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightnes ~/bin/backlight_kbd
cp xorg.mac.conf /etc/X11/xorg.conf
xmonad:
sudo pacman -S xmonad xmonad-contrib rofi
mkdir -p ~/.xmonad
cp xmonad.hs ~/.xmonad/xmonad.hs
mkdir -p ~/.config/rofi
cp rofi.config ~/.config/rofi/config
applications:
sudo pacman -S firefox
sudo pacman -S alacritty