dotfiles/scripts/30-dwm.sh
2023-03-06 13:45:41 +01:00

46 lines
1.2 KiB
Bash

#!/bin/sh
# This file configures builds and installs DWM.
[ "${NO_GRAPHICS:-no}" = "yes" ] && return 0
# install dependencies
$SUDO $PM $PM_INSTALL $PM_NOCONFIRM \
feh \
network-manager-applet \
alsa-utils \
dstat \
curl \
flameshot
# 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
# dwm boot/manage scripts
chmod +x ./files/dwm/*.sh
$SUDO cp ./files/dwm/dwm-start.sh /usr/local/bin/dwm-start
$SUDO cp ./files/dwm/dwm-sync.sh /usr/local/bin/dwm-sync
# funny tool
$SUDO cp ./files/dwm/shutdown-seq.sh /usr/local/bin/portal-sys-kill
# DM entry
$SUDO cp ./files/dwm/dwm.desktop /usr/share/xsessions/dwm.desktop
# 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