Can Desktops Be Assigned Own Wallpaper Image?
Posted: 11 Oct 2013, 11:29
Greetings!
I'd like to know whether Porteus desktops can have their own unique wallpaper when you switch desktops? I'm not a programmer, but a user at Linux Mint forums said that with slight modification this might work on Porteus:
#!/bin/bash
# The Poor Man's Desktop/Workspace solution (version 2)
# Requires: wmctrl
# Make sure you edit the WORKSPACE configuration parameters to suit.
# make sure that only one instance of this script is running
lockfile=/tmp/.wspm.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
echo "wspmDEBUG: Locking succeeded" >&2
######### EDIT THESE VALUES #########################################################################
###
### WORKSPACE_WALL -> image file or backdrop list (slideshow images)
### WORKSPACE_STYLE -> 0=auto, 1=centered, 2=tiled, 3=stretched, 4=scaled, 5=zoomed
### WORKSPACE_CYCLETIMER -> for background slideshow, spceify how often in minutes to cycle image
###
### Note: You need one set of configuration parameters for each available workspace
###
### Workspace #1
WORKSPACE_WALL[1]="/home/toz/Pictures/avatars/avatar.png"
WORKSPACE_STYLE[1]=1
WORKSPACE_CYCLETIMER[1]=0
### Workspace #2
WORKSPACE_WALL[2]="/home/toz/Pictures/avatars/avatar.png"
WORKSPACE_STYLE[2]=2
WORKSPACE_CYCLETIMER[2]=0
### Workspace #3
WORKSPACE_WALL[3]="/home/toz/Pictures/avatars/avatar.png"
WORKSPACE_STYLE[3]=3
WORKSPACE_CYCLETIMER[3]=0
### Workspace #4
WORKSPACE_WALL[4]="/home/toz/.config/xfce4/desktop/backdrop.list"
WORKSPACE_STYLE[4]=0
WORKSPACE_CYCLETIMER[4]=1
#####################################################################################################
######### DO NOT EDIT BELOW #########################################################################
CURRENT_WORKSPACE=$(($(wmctrl -d | grep \* | cut -d' ' -f1)+1))
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${WORKSPACE_WALL[$CURRENT_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style -s "${WORKSPACE_STYLE[$CURRENT_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/backdrop-cycle-timer -s "${WORKSPACE_CYCLETIMER[$CURRENT_WORKSPACE]}"
while true
do
sleep 1
NEW_WORKSPACE=$(($(wmctrl -d | grep \* | cut -d' ' -f1)+1))
if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
wmctrl -s $(($NEW_WORKSPACE)-1)
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${WORKSPACE_WALL[$NEW_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style -s "${WORKSPACE_STYLE[$NEW_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/backdrop-cycle-timer -s "${WORKSPACE_CYCLETIMER[$NEW_WORKSPACE]}"
CURRENT_WORKSPACE=$NEW_WORKSPACE
fi
done
rm -f "$lockfile"
else
echo "wspmDEBUG: Lock failed - exit" >&2
exit 1
fi
=========================================
Or:
#!/bin/sh
# Script "seed" (an ideaware more than anything, at this point)
# /root/Choices/ROX-Filer/changePPin2.sh
# (c) musher0, 22 August 2013
#
# Goal: associate a backdrop with a desktop
# Dependencies: replaceit, rox, wmctrl
####
# Go to folder
cd /root/Choices/ROX-Filer/
# Create a 2nd backdrop
cp -f PuppyPin PuppyPin2
# Define some alternative pictures
B1="/root/my-documents/mes-images/coyloups/coyote-in-snow-storm.jpg"
B2="/root/my-documents/mes-images/coyloups/coyote_jw1208-2.jpg"
# Choose one
BCKDRP="<backdrop style=\"Centred\">$B1</backdrop>"
# Change the old for the new
replaceit --input=/root/Choices/ROX-Filer/PuppyPin2 --wholeline backdrop "$BCKDRP"
# Activate the new backdrop
rox -p="/root/Choices/ROX-Filer/PuppyPin2"
sleep 0.1s
wmctrl -s 1 &
# Template line from PuppyPin
# <backdrop style="Centred">/root/my-documents/mes-images/coyloups/coyote-in-snow-storm.jpg</backdrop>
Hope this is helpful if such a feature isn't already in Porteus!
Jim in NYC
I'd like to know whether Porteus desktops can have their own unique wallpaper when you switch desktops? I'm not a programmer, but a user at Linux Mint forums said that with slight modification this might work on Porteus:
#!/bin/bash
# The Poor Man's Desktop/Workspace solution (version 2)
# Requires: wmctrl
# Make sure you edit the WORKSPACE configuration parameters to suit.
# make sure that only one instance of this script is running
lockfile=/tmp/.wspm.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
echo "wspmDEBUG: Locking succeeded" >&2
######### EDIT THESE VALUES #########################################################################
###
### WORKSPACE_WALL -> image file or backdrop list (slideshow images)
### WORKSPACE_STYLE -> 0=auto, 1=centered, 2=tiled, 3=stretched, 4=scaled, 5=zoomed
### WORKSPACE_CYCLETIMER -> for background slideshow, spceify how often in minutes to cycle image
###
### Note: You need one set of configuration parameters for each available workspace
###
### Workspace #1
WORKSPACE_WALL[1]="/home/toz/Pictures/avatars/avatar.png"
WORKSPACE_STYLE[1]=1
WORKSPACE_CYCLETIMER[1]=0
### Workspace #2
WORKSPACE_WALL[2]="/home/toz/Pictures/avatars/avatar.png"
WORKSPACE_STYLE[2]=2
WORKSPACE_CYCLETIMER[2]=0
### Workspace #3
WORKSPACE_WALL[3]="/home/toz/Pictures/avatars/avatar.png"
WORKSPACE_STYLE[3]=3
WORKSPACE_CYCLETIMER[3]=0
### Workspace #4
WORKSPACE_WALL[4]="/home/toz/.config/xfce4/desktop/backdrop.list"
WORKSPACE_STYLE[4]=0
WORKSPACE_CYCLETIMER[4]=1
#####################################################################################################
######### DO NOT EDIT BELOW #########################################################################
CURRENT_WORKSPACE=$(($(wmctrl -d | grep \* | cut -d' ' -f1)+1))
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${WORKSPACE_WALL[$CURRENT_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style -s "${WORKSPACE_STYLE[$CURRENT_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/backdrop-cycle-timer -s "${WORKSPACE_CYCLETIMER[$CURRENT_WORKSPACE]}"
while true
do
sleep 1
NEW_WORKSPACE=$(($(wmctrl -d | grep \* | cut -d' ' -f1)+1))
if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
wmctrl -s $(($NEW_WORKSPACE)-1)
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${WORKSPACE_WALL[$NEW_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style -s "${WORKSPACE_STYLE[$NEW_WORKSPACE]}"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/backdrop-cycle-timer -s "${WORKSPACE_CYCLETIMER[$NEW_WORKSPACE]}"
CURRENT_WORKSPACE=$NEW_WORKSPACE
fi
done
rm -f "$lockfile"
else
echo "wspmDEBUG: Lock failed - exit" >&2
exit 1
fi
=========================================
Or:
#!/bin/sh
# Script "seed" (an ideaware more than anything, at this point)
# /root/Choices/ROX-Filer/changePPin2.sh
# (c) musher0, 22 August 2013
#
# Goal: associate a backdrop with a desktop
# Dependencies: replaceit, rox, wmctrl
####
# Go to folder
cd /root/Choices/ROX-Filer/
# Create a 2nd backdrop
cp -f PuppyPin PuppyPin2
# Define some alternative pictures
B1="/root/my-documents/mes-images/coyloups/coyote-in-snow-storm.jpg"
B2="/root/my-documents/mes-images/coyloups/coyote_jw1208-2.jpg"
# Choose one
BCKDRP="<backdrop style=\"Centred\">$B1</backdrop>"
# Change the old for the new
replaceit --input=/root/Choices/ROX-Filer/PuppyPin2 --wholeline backdrop "$BCKDRP"
# Activate the new backdrop
rox -p="/root/Choices/ROX-Filer/PuppyPin2"
sleep 0.1s
wmctrl -s 1 &
# Template line from PuppyPin
# <backdrop style="Centred">/root/my-documents/mes-images/coyloups/coyote-in-snow-storm.jpg</backdrop>
Hope this is helpful if such a feature isn't already in Porteus!
Jim in NYC