-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.bash
executable file
·65 lines (49 loc) · 1.85 KB
/
bootstrap.bash
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
#!/bin/bash
set -e
# Copy to home.
cp -rf "$(dirname "$0")/." ~ && cd ~
# Elevate privileges.
if [ $EUID -ne 0 ]; then
su -c "bash $0" "$@"
exit $?
fi
# Add user to sudo group.
adduser "$USER" sudo
# Switch to testing release and add "contrib" and "non-free" repositories.
sed -i -e 's/ \(stable\|jessie\|wheezy\)/ testing/ig' /etc/apt/sources.list
sed -i -e 's/ main$/ main contrib non-free/ig' /etc/apt/sources.list
# Update the system.
apt-get update
apt-get upgrade
apt-get --download-only dist-upgrade
apt-get dist-upgrade
# Install packages.
apt-get install -y \
xorg sudo build-essential bluez-firmware \
pulseaudio pulseaudio-module-bluetooth pavucontrol \
ttf-mscorefonts-installer ttf-bitstream-vera \
ttf-dejavu ttf-liberation ttf-freefont \
tlp xbacklight uswsusp xclip autocutsel parcellite \
rxvt-unicode feh imagemagick scrot curl wget git \
vim mc dunst newsbeuter wicd-curses rtorrent acpi \
libreoffice mupdf vlc chromium keepassx
# Uncomment if wanted.
# apt-get install -y pepperflashplugin-nonfree icedtea-plugin
# Depends on rxvt-unicode in a weird way.
apt-get install -y rxvt-unicode-256color
# Configure chromium.
echo 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --enable-remote-extensions"' > /etc/chromium.d/enable-remote-extensions
# Install go.
curl https://go.dev/dl/go1.17.6.linux-amd64.tar.gz | tar -C /usr/local -xz
# Configure vim.
sh boostrap/vim.sh
# Install Iosevka font.
sh boostrap/iosevka.sh
# Install Suckless tools.
sh bootstrap/suckless.sh
# Allow "~/.scripts/backlight" to work.
chmod o+w /sys/class/backlight/intel_backlight/brightness
# Setup screen autoconfiguration.
git clone --recursive https://github.com/Ventto/mons src && make install -C src/mons/
echo -n "SUBSYSTEM==\"drm\", ACTION==\"change\", RUN+=\"sudo -u $USER /home/$USER/.scripts/screen-auto.sh\"" > /etc/udev/rules.d/screen-auto.rules
udevadm control --reload-rules