mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2024-12-22 18:52:46 +01:00
darkman: simplify wallpaper scripts
This commit is contained in:
parent
59563eb528
commit
21685c538a
@ -1,11 +1,10 @@
|
||||
#!/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).
|
||||
export DISTROID=$(lsb_release -si)
|
||||
export DISTROREL=$(lsb_release -sr)
|
||||
|
||||
# Script credit @mamantoha: https://gist.github.com/mamantoha/c01363e5c791e8324d6248b09cf29bbb
|
||||
|
||||
WALLPAPER_PATH="/usr/share/wallpapers/F$(lsb_release -sr)/contents/images_dark/3840x2160.png"
|
||||
if [ "$DISTROID" == "Fedora" ]; then
|
||||
export WALLPAPER_PATH="/usr/share/wallpapers/F$DISTROREL/contents/images_dark/3840x2160.png"
|
||||
fi
|
||||
|
||||
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'")}'
|
||||
|
@ -1,4 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
WALLPAPER_PATH="/usr/share/wallpapers/F$(lsb_release -sr)/contents/images/3840x2160.png"
|
||||
|
||||
export DISTROID=$(lsb_release -si)
|
||||
export DISTROREL=$(lsb_release -sr)
|
||||
|
||||
if [ "$DISTROID" == "Fedora" ]; then
|
||||
export WALLPAPER_PATH="/usr/share/wallpapers/F$DISTROREL/contents/images/3840x2160.png"
|
||||
fi
|
||||
|
||||
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'")}'
|
Loading…
Reference in New Issue
Block a user