darkman-setup.bash: a simple script to setup darkman

This commit is contained in:
Aminda Suomalainen 2024-07-16 12:35:28 +03:00
parent 10c59347f0
commit 1e6bf757b1
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q

21
bash/darkman-setup.bash Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
if ! hash darkman 2> /dev/null; then
echo "You don't seem to have darkman installed." 1>&2
exit 1
fi
mkdir -vp ~/.local/share/
if [ -d /usr/share/doc/darkman/examples ]; then
ln -nsfv /usr/share/doc/darkman/examples/{dark,light}-mode.d ~/.local/share/
elif [ -d /usr/local/share/doc/darkman/examples ]; then
ln -nsfv /usr/local/share/doc/darkman/examples/{dark,light}-mode.d ~/.local/share/
elif [ -d ~/.local/share/doc/darkman/examples ]; then
ln -nsfv ~/.local/share/doc/darkman/examples/{dark,light}-mode.d ~/.local/share/
else
echo "Darkman examples not found in expected locations."
exit 1
fi
systemctl --user enable --now darkman.service