init
Script to automatically change background
This commit is contained in:
commit
b74235d9de
18
changebackground.sh
Executable file
18
changebackground.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# This script is used to change the background of the desktop
|
||||
#
|
||||
|
||||
# Generate a background image using xstarfish
|
||||
|
||||
SCREENWIDTH=$(xdpyinfo | awk '/dimensions/{print $2}' | grep -oE ^[[:digit:]]\+)
|
||||
SCREENHEIGHT=$(xdpyinfo | awk '/dimensions/{print $2}' | grep -oE [[:digit:]]\+$)
|
||||
SIZE="${SCREENWIDTH}x${SCREENHEIGHT}"
|
||||
|
||||
if [ -f /usr/bin/xstarfish ]; then
|
||||
/usr/bin/xstarfish -g $SIZE -o /tmp/background.jpg
|
||||
else
|
||||
echo "ERROR: xstarfish not found"
|
||||
fi
|
||||
|
||||
# Change the background image
|
||||
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorHDMI-1-0/workspace0/last-image -s /tmp/background.jpg
|
||||
Loading…
Reference in New Issue
Block a user