dotfiles/scripts/30-dwm.sh

44 lines
1.1 KiB
Bash
Raw Normal View History

2023-10-14 22:38:07 +02:00
#!/bin/sh
# This file configures builds and installs DWM.
2023-10-14 22:38:09 +02:00
[ "${NO_GRAPHICS:-no}" = "yes" ] && return 0
2023-10-14 22:38:07 +02:00
# install dependencies
$SUDO $PM $PM_INSTALL $PM_NOCONFIRM \
feh \
network-manager-applet \
alsa-utils \
dstat \
2023-10-14 22:38:07 +02:00
curl \
flameshot
2023-10-14 22:38:07 +02:00
# clone
[ -d /tmp/dotfiles-dwm ] || git clone https://git.suckless.org/dwm /tmp/dotfiles-dwm
# config
cp ./files/dwm/config.h /tmp/dotfiles-dwm/config.h
# build, patch and install
pushd /tmp/dotfiles-dwm
# patches
curl https://dwm.suckless.org/patches/systray/dwm-systray-6.4.diff -o /tmp/dwm-systray.diff
git apply -3 /tmp/dwm-systray.diff
$SUDO make install
popd
2023-10-14 22:38:07 +02:00
# dwm boot/manage scripts
chmod +x ./files/dwm/*.sh
2023-10-14 22:38:07 +02:00
$SUDO cp ./files/dwm/dwm-start.sh /usr/local/bin/dwm-start
2023-10-14 22:38:07 +02:00
$SUDO cp ./files/dwm/dwm-sync.sh /usr/local/bin/dwm-sync
2023-10-14 22:38:07 +02:00
# DM entry
2023-10-14 22:38:07 +02:00
$SUDO cp ./files/dwm/dwm.desktop /usr/share/xsessions/dwm.desktop
2023-10-14 22:38:07 +02:00
# background
rm -rf $HOME/Pictures/background.*
curl https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/9757d496-239b-46c5-baea-6873cbfe9b3d/ddkbeml-015b05e6-6f8f-471e-a3a4-1c4360127ea6.jpg -o $HOME/Pictures/background.jpg