blob: 72b5db4059ad9fe29ec80eb6e42d07bfbd0333fd (
plain) (
blame)
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
|
#!/bin/sh
set -e
if [ "$(id -u)" -eq 0 ] ; then
echo "Run as normal user w/ sudo access"
exit 1;
fi
codedir="$HOME/scm"
okshdir="${codedir}/pub/ibara-oksh"
rivercfgdir="${codedir}/wl/rivercfg"
yaydir="${codedir}/pub/yay"
GRAPHICS="${GRAPHICS:-yes}"
THUNDERBOLT="${THUNDERBOLT:-yes}"
PACKAGES="${PACKAGES:-yes}"
FONTS="${FONTS:-yes}"
YAY="${YAY:-yes}"
BRAVE="${BRAVE:-yes}"
OKSH="${OKSH:-yes}"
RIVER="${RIVER:-yes}"
V4L2LOOPBACK="${V4L2LOOPBACK:-yes}"
LOGIND="${LOGIND:-yes}"
DWM="${DWM:-no}"
DPW="${DPW:-yes}"
dpwdir="${codedir}/me/dpw"
dwmdir="${codedir}/x/dwm"
dwmStdir="${codedir}/x/st"
dwmDmenudir="${codedir}/x/dmenu"
dwmSesdir="${codedir}/x/session"
pkgs="
alsa-utils
ansible
arandr
base
base-devel
bind
bluez
bluez-tools
bluez-utils
btrfs-progs
buildah
chromium
cmake
colordiff
ctags
dosfstools
dunst
ed
efibootmgr
ethtool
evince
evolution
exfat-utils
fastfetch
feh
firefox
fuse
fuzzel
gdb
gdisk
gimp
git
git-lfs
hdparm
htop
inkscape
iotop
iperf3
kdenlive
less
libconfig # dmenu-pinentry
libfido2
libvirt # If you want
libxcb
libxkbcommon
lvm2
lxappearance
man-pages
mandoc
minisign
mpd
multipath-tools # kpartx
ncdu
ncmpc
ncspot
neovim
net-tools
networkmanager
nload
nm-connection-editor
noto-fonts-emoji
nsd # for drill a dig replacement
ntfs-3g
openbsd-netcat
openssh
oxygen
oxygen-icons
oxygen-icons-svg
pass
pass-otp
pavucontrol
picard # musicbrainz
picom
pixz
podman
pulseaudio
pulseaudio-bluetooth
pv
pwgen
python-pip
python-pyscard # for pip3 install --user ykman
qemu
qt5ct # https://wiki.archlinux.org/title/qt#Appearance
rclone
redshift
ripgrep
rsync
scrot
sddm
seahorse
shellcheck
smartmontools
speedtest-cli
swig # ykman
tmux
usbutils
v4l2loopback-dkms
vim
virt-manager
vlc
wayland-protocols
whois
wireguard-tools
wireless_tools
wl-clipboard
wlroots0.17
wlroots0.18
wlroots0.19
xclip
xdotool
xfce4
xfce4-goodies
xfsprogs
xorg-apps
xorg-server
xorg-xwayland
xournalpp
zathura
zathura-djvu
zathura-pdf-mupdf
zathura-ps
zstd
"
if [ "$PACKAGES" = "yes" ] ; then
#shellcheck disable=SC2046
sudo pacman -S --needed $(echo "$pkgs" | awk '{print $1}' | tr '\n' ' ')
fi
if [ "$LOGIND" = "yes" ] ; then
fn="/etc/systemd/logind.conf"
bak="$fn.$(date +%s)"
sudo cp "$fn" "$bak"
sudo sed -i -E -e 's/^.*KillUserProcesses=.*$/KillUserProcesses=yes/g' "$fn"
sudo sed -i -E -e 's/^.*HandleLidSwitch=.*$/HandleLidSwitch=ignore/g' "$fn"
if sudo diff -q "$fn" "$bak" >/dev/null ; then
sudo rm "$bak"
fi
fi
grep -q '^KillUserProcesses=yes' /etc/systemd/logind.conf || \
echo "You may want to set KillUserProcesses=yes in /etc/systemd/logind.conf"
grep -q '^HandleLidSwitch=ignore' /etc/systemd/logind.conf || \
echo "You may want to set HandleLidSwitch=ignore in /etc/systemd/logind.conf"
if [ "$THUNDERBOLT" = "yes" ] ; then
sudo sh -c 'cat > /etc/udev/rules.d/99-removable.rules <<EOF
# /etc/udev/rules.d/99-removable.rules
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"
EOF'
fi
if [ "$V4L2LOOPBACK" = yes ] ; then
sudo sh -c 'cat > /etc/modprobe.d/v4l2loopback.conf <<EOF
options v4l2loopback video_nr=10,11,12 card_label="OBS Virtual Camera,Extra Loopback 1,Extra Loopback 2"
EOF'
sudo sh -c 'cat > /etc/modules-load.d/v4l2loopback.conf <<EOF
v4l2loopback
EOF'
fi
if [ "$OKSH" = yes ] ; then
if ! [ -d "$okshdir" ] ; then
git clone https://github.com/ibara/oksh "$okshdir"
fi
cd "$okshdir"
git checkout oksh-7.6
./configure
make
sudo make install
cd -
if ! grep /usr/local/bin/oksh /etc/shells ; then
sudo sh -c 'echo /usr/local/bin/oksh >> /etc/shells'
fi
if ! grep -qF 'export ENV=$HOME/.kshrc' ~/.profile; then
echo 'export ENV=$HOME/.kshrc' >> ~/.profile
fi
set +x
if ! grep "^$(id -un)" /etc/passwd | grep /usr/local/bin/oksh ; then
printf "Change shell to oksh? [y]es/[n]o: "
read -r resp
if [ "$resp" = "y" ] ; then
chsh -s /usr/local/bin/oksh
fi
fi
set -x
fi
if [ "$FONTS" = yes ] ; then
if ! [ -d ~/.fonts ]; then
git clone https://git.riedstra.dev/mitch/fonts ~/.fonts
fi
fi
if [ "$RIVER" = yes ] ; then
if ! [ -d "$rivercfgdir" ] ; then
git clone https://git.riedstra.dev/wl/rivercfg "$rivercfgdir"
fi
cd "$rivercfgdir"
sudo pacman -S river foot swaylock waybar wlr-randr bemenu bemenu-wayland swaybg grim slurp
./link.sh
cd -
wlcustomdir="$rivercfgdir"/../wlcustom
if ! [ -d "$wlcustomdir" ] ; then
git clone https://git.riedstra.dev/wl/wlcustom "$wlcustomdir"
fi
cd "$wlcustomdir"
sudo make install
cd -
fi
if [ "$DPW" = yes ] ; then
if ! [ -d "$dpwdir" ] ; then
git clone https://git.riedstra.dev/mitch/dpw "$dpwdir"
fi
cd "$dpwdir"
make PREFIX="$HOME" install
cd -
fi
if [ "$YAY" = yes ] ; then
if ! [ -d "$yaydir" ] ; then
git clone https://aur.archlinux.org/yay.git "$yaydir"
fi
cd "$yaydir"
yay --version || makepkg -si
cd -
fi
if [ "$BRAVE" = yes ] ;then
if [ "$YAY" == yes ] ; then
yay -Sy brave-bin
else
echo "You need to install yay ( env YAY=yes ./distro/arch.sh or so )"
echo "In order to install brave via this script"
fi
fi
if [ "$DWM" = yes ] ; then
sudo pacman -S picom
if ! [ -d "$dwmdir" ] ; then
git clone https://git.riedstra.dev/x/dwm "$dwmdir"
fi
cd "$dwmdir"
make
sudo make clean install
cd -
if ! [ -d "$dwmStdir" ] ; then
git clone https://git.riedstra.dev/x/st "$dwmStdir"
fi
cd "$dwmStdir"
make
sudo make clean install
cd -
if ! [ -d "$dwmDmenudir" ] ; then
git clone https://git.riedstra.dev/x/dmenu "$dwmDmenudir"
fi
cd "$dwmDmenudir"
make
sudo make clean install
cd -
if ! [ -d "$dwmSesdir" ] ; then
git clone https://git.riedstra.dev/x/session "$dwmSesdir"
fi
cd "$dwmSesdir"
sudo make install
cd -
if ! [ -f ~/.xinitrc ] ; then
cat > ~/.xinitrc <<EOF
export ENV=\$HOME/.kshrc
export SSH_ASKPASS=dmenu_askpass
xsetroot -grey &
xset r rate 300 50 &
dwm
EOF
chmod +x ~/.xinitrc
fi
fi
if [ "$GRAPHICS" = yes ] ; then
case $(lspci | grep VGA) in
*Intel*)
# OpenCL Drivers
pacman -S --needed intel-compute-runtime
;;
*AMD*)
# OpenCL Drivers
echo "Note ROCM isn't supported by all AMD GPUs"
pacman -S --needed rocm-opencl-runtime
;;
*Nvidia*)
echo "Note older GPUs need 'nvidia' and/or 'nvidia-lts' instead of nvidia-open"
pacman -S --needed nvidia-open nvidia-open-lts nvidia-utils opencl-nvidia
;;
*)
echo "No GPU detected"
esac
fi
echo "You may wish to run systemctl enable sddm if you haven't already"
|