mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2024-11-16 08:09:23 +01:00
darkman-setup.bash: symlink scripts instead of directories for customizing options
This commit is contained in:
parent
f5e14af247
commit
5dc91eb4ba
@ -1,25 +1,34 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -x
|
||||||
if ! hash darkman 2> /dev/null; then
|
if ! hash darkman 2> /dev/null; then
|
||||||
echo "You don't seem to have darkman installed." 1>&2
|
echo "You don't seem to have darkman installed." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -vp ~/.local/share/
|
if [ ! -d ~/.local/share/dark-mode.d ]; then
|
||||||
|
rm ~/.local/share/{dark,light}-mode.d
|
||||||
|
mkdir -vp ~/.local/share/{dark,light}-mode.d
|
||||||
|
echo "Ensure ~/.local/share/ has directories {dark,light}-mode.d/"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d /usr/share/doc/darkman/examples ]; then
|
if [ -d /usr/share/doc/darkman/examples ]; then
|
||||||
ln -nsfv /usr/share/doc/darkman/examples/{dark,light}-mode.d ~/.local/share/
|
export EXAMPLESDIR="/usr/share/doc/darkman/examples"
|
||||||
elif [ -d /usr/local/share/doc/darkman/examples ]; then
|
elif [ -d /usr/local/share/doc/darkman/examples ]; then
|
||||||
ln -nsfv /usr/local/share/doc/darkman/examples/{dark,light}-mode.d ~/.local/share/
|
export EXAMPLESDIR="/usr/local/share/doc/darkman/examples"
|
||||||
elif [ -d ~/.local/share/doc/darkman/examples ]; then
|
elif [ -d ~/.local/share/doc/darkman/examples ]; then
|
||||||
ln -nsfv ~/.local/share/doc/darkman/examples/{dark,light}-mode.d ~/.local/share/
|
export EXAMPLESDIR="/.local/share/doc/darkman/examples"
|
||||||
elif [ -d ~/src/gitlab.com/WhyNotHugo/darkman ]; then
|
elif [ -d ~/src/gitlab.com/WhyNotHugo/darkman/examples ]; then
|
||||||
ln -nsfv ~/src/gitlab.com/WhyNotHugo/darkman/examples/{dark,light}-mode.d ~/.local/share/
|
export EXAMPLESDIR="~/src/gitlab.com/WhyNotHugo/darkman/examples"
|
||||||
else
|
else
|
||||||
echo "Darkman examples not found in expected locations."
|
echo "Darkman examples not found in expected locations."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ln -nsfv $EXAMPLESDIR/dark-mode.d/* ~/.local/share/dark-mode.d/
|
||||||
|
ln -nsfv $EXAMPLESDIR/light-mode.d/* ~/.local/share/light-mode.d/
|
||||||
|
|
||||||
|
unset $EXAMPLESDIR
|
||||||
systemctl --user disable --now darkman.service
|
systemctl --user disable --now darkman.service
|
||||||
systemctl --user mask darkman.service
|
systemctl --user mask darkman.service
|
||||||
echo "Creating an autostart seems to work better than the systemd service."
|
echo "Creating an autostart seems to work better than the systemd service."
|
||||||
|
set +x
|
||||||
|
Loading…
Reference in New Issue
Block a user