Created
February 19, 2019 20:58
-
-
Save raphaelbs/1688d3043535819cedf3ecbd3304290c to your computer and use it in GitHub Desktop.
Set Himawari as dekstop and lockscreen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# http://bit.ly/2ines3u | |
# Wallpaper's directory. | |
dir="${HOME}/.cache/himawaripy/" | |
# export DBUS_SESSION_BUS_ADDRESS environment variable | |
PID=$(pgrep gnome-session) | |
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ | cut -d= -f2-) | |
# Random wallpaper. | |
wallpaper=`find "${dir}" -type f | shuf -n1` | |
echo "Set wallpaper: ${wallpaper}" | |
# Change wallpaper. | |
# http://bit.ly/HYEU9H | |
gsettings set org.gnome.desktop.background picture-options "scaled" | |
gsettings set org.gnome.desktop.background picture-uri "file://${wallpaper}" | |
gsettings set org.gnome.desktop.background primary-color "#000000" | |
gsettings set org.gnome.desktop.background secondary-color "#000000" | |
gsettings set org.gnome.desktop.background color-shading-type "solid" | |
gsettings set org.gnome.desktop.screensaver picture-options "scaled" | |
gsettings set org.gnome.desktop.screensaver picture-uri "file://${wallpaper}" | |
gsettings set org.gnome.desktop.screensaver primary-color "#000000" | |
gsettings set org.gnome.desktop.screensaver secondary-color "#000000" | |
gsettings set org.gnome.desktop.screensaver color-shading-type "solid" | |
cp $wallpaper /usr/share/backgrounds/himawari.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, edit the file
and change
#lockDialogGroup
css to:Note 1: You may need to give access to
/usr/share/backgrounds/
folder:Note 2: You may need to add path variable to
crontab
: