useful_scripts/install_debian.sh

75 lines
2.4 KiB
Bash
Raw Normal View History

2024-03-29 04:57:07 +00:00
#!/bin/bash
# install packages I need
sudo apt update
2024-06-02 19:02:43 +00:00
sudo apt install -y \
2024-06-15 15:01:29 +00:00
xserver-xorg `# for graphics` \
2024-06-15 17:19:24 +00:00
xinit `# for graphics` \
2024-06-15 15:01:29 +00:00
i3 `# for graphics` \
2024-06-02 19:02:43 +00:00
x11-xserver-utils `# for graphics` \
2024-06-15 17:19:24 +00:00
linux-headers-amd64 `# needed for nvidia-driver installation` \
2024-03-29 04:57:07 +00:00
brightnessctl `# for keyboard backlight` \
xcompmgr `# for st opacity` \
2024-06-15 17:19:24 +00:00
x11-apps `# for st opacity` \
stterm `# st` \
2024-06-02 19:02:43 +00:00
mate-backgrounds `# for background` \
2024-03-29 04:57:07 +00:00
xwallpaper `# for background` \
pulseaudio `# for sound` \
pavucontrol `# for audio control` \
pasystray `# for audio control` \
iputils-ping `# ping etc.` \
neovim `# console editor` \
psmisc `# pstree etc.` \
2024-06-15 17:19:24 +00:00
software-properties-common `# manage repos (needed for nvidia-driver installation)` \
2024-06-02 19:02:43 +00:00
chromium \
2024-06-15 17:19:24 +00:00
conky \
2024-06-15 15:01:29 +00:00
telegram-desktop \
2024-03-29 04:57:07 +00:00
python3 \
2024-06-15 17:19:24 +00:00
python3-venv \
curl
2024-03-29 04:57:07 +00:00
2024-06-15 17:19:24 +00:00
sudo update-alternatives --set x-terminal-emulator /usr/bin/st
# start window manager
2024-06-15 15:01:29 +00:00
cat > ~/.xinitrc << EOL
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY & # because of slow Telegram start
2024-06-15 17:19:24 +00:00
xcompmgr -cC & # for st opacity
image=\$(find /usr/share/backgrounds/mate/nature/ -type f | sort --random-sort | head -1)
xwallpaper --stretch \$image
2024-06-15 15:01:29 +00:00
conky &
i3
EOL
2024-03-29 04:57:07 +00:00
2024-06-15 17:19:24 +00:00
# st opacity
if ! grep transset ~/.bashrc &> /dev/null; then
cat >> ~/.bashrc << EOL
term=\$(cat /proc/\$PPID/comm)
if [[ \$term == "x-terminal-emul" ]]; then
transset 0.6 --id \$WINDOWID > /dev/null
fi
EOL
fi
sudo add-apt-repository contrib non-free-firmware non-free -y
2024-06-15 15:01:29 +00:00
sudo apt update
2024-06-15 17:19:24 +00:00
sudo apt install nvidia-driver linux-image-amd64 -y
2024-03-29 04:57:07 +00:00
2024-06-15 15:01:29 +00:00
for tool in create_systemd_service.py create_systemd_timer.py set_brightness.sh
2024-03-29 04:57:07 +00:00
do
if ! command -v $tool &> /dev/null
then
sudo cp $tool /usr/local/bin
fi
done
git config --global user.name "Digital Studium"
git config --global user.email "digitalstudium001@gmail.com"
sudo timedatectl set-timezone Europe/Moscow
2024-06-15 17:19:24 +00:00
sudo sed -i s/desktop/override/g /etc/conky/conky.conf
sudo sed -i s/top_left/top_right/g /etc/conky/conky.conf
2024-06-15 15:01:29 +00:00
sudo bash -c "echo 'PATH=\$PATH:\$(find /opt/ -executable -type f | grep -v \.so | xargs dirname | uniq | paste -s -d : | xargs -I _ echo _)' > /etc/profile.d/opt.sh"
2024-03-29 04:57:07 +00:00
2024-06-15 17:19:24 +00:00