Compare commits

..

6 Commits

11 changed files with 72 additions and 5 deletions

View File

@ -1,23 +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/examples ]; then
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

1
bash/darkman/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
darkman-setup.bash

4
bash/darkman/copy-these.bash Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
mkdir -vp ~/.local/share/{dark,light}-mode.d
cp dark-mode.d/* ~/.local/share/dark-mode.d/
cp light-mode.d/* ~/.local/share/light-mode.d/

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# To change the wallpaper on all desktops, you have to run a PlasmaShell script
# and iterate over all available desktops. This examples uses the default light
# wallpaper on Manjaro (Bamboo).
# Script credit @mamantoha: https://gist.github.com/mamantoha/c01363e5c791e8324d6248b09cf29bbb
WALLPAPER_PATH="/usr/share/wallpapers/KaliMetalDark/contents/images/3840x2160.png"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "file://'$WALLPAPER_PATH'")}'

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
lookandfeeltool --apply "Kali-Purple-Dark"

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# To change the wallpaper on all desktops, you have to run a PlasmaShell script
# and iterate over all available desktops. This examples uses the default dark
# wallpaper on Manjaro (Bamboo).
# Script credit @mamantoha: https://gist.github.com/mamantoha/c01363e5c791e8324d6248b09cf29bbb
WALLPAPER_PATH="/usr/share/wallpapers/F$(lsb_release -sr)/contents/images_dark/3840x2160.png"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "file://'$WALLPAPER_PATH'")}'

View File

@ -0,0 +1 @@
../darkman-setup.bash

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# To change the wallpaper on all desktops, you have to run a PlasmaShell script
# and iterate over all available desktops. This examples uses the default light
# wallpaper on Manjaro (Bamboo).
# Script credit @mamantoha: https://gist.github.com/mamantoha/c01363e5c791e8324d6248b09cf29bbb
WALLPAPER_PATH="/usr/share/wallpapers/KaliMetal/contents/images/3840x2160.jpg"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "file://'$WALLPAPER_PATH'")}'

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
lookandfeeltool --apply "org.fedoraproject.fedora.desktop"

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
lookandfeeltool --apply "Kali-Purple-Light"

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# To change the wallpaper on all desktops, you have to run a PlasmaShell script
# and iterate over all available desktops. This examples uses the default dark
# wallpaper on Manjaro (Bamboo).
# Script credit @mamantoha: https://gist.github.com/mamantoha/c01363e5c791e8324d6248b09cf29bbb
WALLPAPER_PATH="/usr/share/wallpapers/F$(lsb_release -sr)/contents/images/3840x2160.png"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "file://'$WALLPAPER_PATH'")}'