Different background for each workspace?

Re: Different background for each workspace?

Postby garolou on Fri Jan 11, 2013 7:03 pm

Yes there is a small delay for the image to load after the workspace switch (less than a second on my system). The script and wallpapoz work at the command line level - the current desktop image is replaced by another one. For a minimal delay switch, the images probably would be stored in memory but that probably requires some coding at a lower level which is beyond my knowledge. Things change fast, maybe some Mint developper will look into this and a solution will appear soon.
In the meantime I can live with a small delay for a non-critical feature.

:-)
100% Linux: Mint 13 (cinnamon) laptop / Ubuntu 10.04 desktop / Ubuntu 10.04 server
garolou
Level 1
Level 1
 
Posts: 6
Joined: Fri Jan 11, 2013 12:39 am

Linux Mint is funded by ads and donations.
 

Re: Different background for each workspace?

Postby jjaythomas on Fri Jan 11, 2013 8:35 pm

That what I thought
I'm not a programer at all (except a basic cumputer class in tech college, PREMSwindows era, was MSDOS tho) :roll:
I feel old :lol:

J.Jay
jjaythomas
Level 5
Level 5
 
Posts: 597
Joined: Sun Mar 07, 2010 12:52 pm

Re: Different background for each workspace?

Postby Dngrsone on Fri Jan 11, 2013 10:33 pm

If it will make you feel any better, my BASIC class was on a TRS-80 Model III... We were fancy because one of our computers had two
720Mb floppy drives.

Sent from my SPH-D710 using Tapatalk 2
User avatar
Dngrsone
Level 3
Level 3
 
Posts: 198
Joined: Thu Nov 29, 2012 12:18 pm

Re: Different background for each workspace?

Postby jjaythomas on Sat Jan 12, 2013 12:05 am

Most in class were commodore 64er I think their was a pet also. If remember they (the school) was getting Colts next year. And other classroom had 'apple 2s

J.Jay
jjaythomas
Level 5
Level 5
 
Posts: 597
Joined: Sun Mar 07, 2010 12:52 pm

Re: Different background for each workspace?

Postby Dngrsone on Sat Jan 12, 2013 10:16 am

Ah, good times... I didn't get a C-64 until I was 19 or 20. I went all out and got the monitor and dual floppy drives.

Sent from my SPH-D710 using Tapatalk 2
User avatar
Dngrsone
Level 3
Level 3
 
Posts: 198
Joined: Thu Nov 29, 2012 12:18 pm

Re: Different background for each workspace?

Postby jjaythomas on Sat Jan 12, 2013 1:05 pm

Ah, good times... I didn't get a C-64 until I was 19 or 20. I went all out and got the monitor and dual floppy drives.

Yea I was out of HS when go into computer (dad bought me C128) I didn't but new of Tandy users! :P Were about even but you edged be out earlier :lol:

J.Jay

P.S went thru Amigaland to BEOS (actually Win 95 played back to BEOS) Back to Windowsworld finally Linux (I think desktop Linux was pretty new/geeky) :roll:

Sorry long-winded (off topic and nostalgic) (had birthday month ago :cry: ) Had older friend had one of those cassette/storage things.
jjaythomas
Level 5
Level 5
 
Posts: 597
Joined: Sun Mar 07, 2010 12:52 pm

Re: Different background for each workspace?

Postby peyrol on Sun Jan 27, 2013 4:49 pm

I'm the original poster. I have LMDE 64 bit with MATE.
I downloaded and installed Wallpapoz, and I can run the GUI.
I have defined a directory of images for each workspace, and I saved my changes.
Then I clicked Daemon->restart. I change workspaces and the background stays the same.
The image is supposed to change after one minute, but it does not.
What obvious thing am I missing? The background I get is the same one I had before,
which was selected by issuing the command: mate-appearance-properties %F

Thanks in advance.
peyrol
Level 2
Level 2
 
Posts: 58
Joined: Sun Nov 25, 2012 1:51 am

Re: Different background for each workspace?

Postby jjaythomas on Sun Jan 27, 2013 11:50 pm

sorry away doing other things for few days... :oops:

I'm the original poster. I have LMDE 64 bit with MATE.
I downloaded and installed Wallpapoz, and I can run the GUI.
I have defined a directory of images for each workspace, and I saved my changes.
Then I clicked Daemon->restart. I change workspaces and the background stays the same.
The image is supposed to change after one minute, but it does not.
What obvious thing am I missing? The background I get is the same one I had before,
which was selected by issuing the command: mate-appearance-properties %F


have you saved changes before restart daemon?
only one monitor/display? or have external monitor hooked to laptop ect.?
on mate I have not used since very early version (was very gnome2 compatible) I'll try on newer (1.4 version) of mate :)

J.Jay
P.S. the first wallpaper will be your 'wallpaper set in mate preferences' the 'walpapoz' ones doesn't take effect till the 1st change to a different desktop (& back). (you can get around that by setting wallpaper the same as 1st in walpapoz the same) :wink:
jjaythomas
Level 5
Level 5
 
Posts: 597
Joined: Sun Mar 07, 2010 12:52 pm

Re: Different background for each workspace?

Postby jjaythomas on Mon Jan 28, 2013 12:53 am

Sorry...
on mate I have not used since very early version (was very gnome2 compatible) I'll try on newer (1.4 version) of mate

can't get work on current mate (1.4) :cry: May be code just needs new name for packages? (I'm not a coder unfortunately) :oops:

Does work on LMDE (Xfce) 4.10 (currently using) 4.6 & 4.8 and Hopefully 4.12 when out. also Debians based on squeeze (still gnome2) repos such as 'solus,snow3 ect.

J.Jay
P.S. I use walpapoz 0.6.2 (I think not being worked on anymore)
jjaythomas
Level 5
Level 5
 
Posts: 597
Joined: Sun Mar 07, 2010 12:52 pm

Mint 16 / MATE

Postby gcarvell on Wed Jan 01, 2014 2:44 pm

For anyone using Linux Mint 16 with the MATE desktop, here' a small tweak to Garolou's script above (it was for Mint 13 with Cinnamon).

In function setdesktop(), change the gsettings command to read:

Code: Select all
gsettings set org.mate.background picture-filename "$desktop_dir$1"


There's still a one-second delay every time the background is updated, but it's happening outside of the script. Probably some MATE daemon's scan interval, but I couldn't track it down.

P.S. Nice to see some other old timers here. I got my start on the Apple II+ - great machine. Spent a little time on the TRS-80 Model III as well. My high school got its first computer lab the year *after* I graduated :-)
gcarvell
Level 1
Level 1
 
Posts: 1
Joined: Thu Nov 22, 2012 1:00 am

Postby Dngrsone on Wed Jan 01, 2014 5:37 pm

For what it is worth, I knuckled down and installed KDE-full over Cinnamon. I have my separate desktop wallpapers and still use the Gnome programs I prefer.

Sent from my SPH-D710 using Tapatalk
User avatar
Dngrsone
Level 3
Level 3
 
Posts: 198
Joined: Thu Nov 29, 2012 12:18 pm

Re: Different background for each workspace? openbox too

Postby jtwdyp on Thu Mar 13, 2014 6:08 am

Yes I know this is an old thread But I wanted to thank garolou for sharing his code, and share with him the modifications I made to make this work in openbox on a Mageia Linux System... Since he doesn't accept private messages, this is my best option for doing so...

garolou wrote:Hello everyone,
I just moved from Ubuntu 11.10 to Mint 13 cinnamon. The desktop environment here is more of what I'm looking for. I like the idea of having a different background for each workspace also... so I spent a day to figure out a way to do it - It's not perfect but pretty close.
The script basically monitors a 'change of workspace' and resets the background image to your choice.

Code: Select all
#!/bin/bash
# Workspace desktop image switcher WDIS 1.0
# Script to change the desktop image when switching workspaces.
# Tested on Linux Mint 13 'cinnamon'
desktop_dir="/home/username/.cinnamon/backgrounds/" # full path to images directory;
desktop_img[0]="boat.jpg"
desktop_img[1]="boat_mirror.jpg"
desktop_img[2]=""
desktop_img[3]=""
# add more images if using more workspaces

setdesktop() {
   gsettings set org.gnome.desktop.background picture-uri "file://$desktop_dir$1"
   }
xprop -root -spy _NET_CURRENT_DESKTOP | (
   while read -r; do
      desk=${REPLY:${#REPLY}-1:1}
      setdesktop ${desktop_img[$desk]}
   done
   )

Modify the paths and image names appropriately.
Let me know if there is any way I can improve the code.

Cheers


Thanks garolou. Your code helped me a LOT.

The script had to be modified to use a different background setting tool for openbox. And since I use 12 desktop areas, I had to modify the while loop to handle both 1 and 2 digit array index values.

I'd like to properly credit garolou for the initial code, but this thread is the closest I'm able to come to that. See http://murga-linux.com/puppy/viewtopic.php?p=764539#764539...

My Openbox compatible code follows:
Code: Select all
#based on an original script posted to linuxmint forum by garolou
#[url]http://forums.linuxmint.com/viewtopic.php?p=672189#p672189[/url]
# Script to change the desktop image when switching workspaces.
# Tested on Mageia release 3 (Official) for x86_64 Kernel 3.10.28-desktop-1.mga3
# desktop_dir="/usr/share/backgrounds/" # full path to images directory;
desktop_dir="$HOME/0bg/" # full path to images directory;
desktop_img[0]="ChillyLickingGood2001.jpg"
desktop_img[1]="z_optic2.png"
desktop_img[2]="metruck.jpg"
desktop_img[3]="greydragon.png"
desktop_img[4]="ShiloWannaPlay0273.jpg"
desktop_img[5]="snapshot-dragon-storm.png"
desktop_img[6]="DragonlySkyscapes-014.jpg"
desktop_img[7]="DragonlySkyscapes-016.jpg"
desktop_img[8]="FantaScene-006.jpg"
desktop_img[9]="DragonlySkyscapes-018.jpg"
desktop_img[10]="DragonlySkyscapes-019.jpg"
desktop_img[11]="jungle.png"
# add more images if using more workspaces

setdesktop() {
# =>    test
#    display "$desktop_dir$1"
# =>       Mageia
    feh  --bg-scale "$desktop_dir$1"
# =>       fatdog
#    wallpaper "$desktop_dir$1"
}
xprop -root -spy _NET_CURRENT_DESKTOP | (
   while read -r; do
       desk=${REPLY:${#REPLY}-2:2}
       case $desk in
            [0-9][0-9]) setdesktop ${desktop_img[$desk]};;
      *)desk=${REPLY:${#REPLY}-1:1};
      setdesktop ${desktop_img[$desk]};;
       esac
   done
   )

--
JtWdyP
User avatar
jtwdyp
Level 1
Level 1
 
Posts: 1
Joined: Thu Mar 13, 2014 4:49 am

Re: Different background for each workspace?

Postby lordbonislav on Wed Sep 24, 2014 8:58 am

How do I get a script working?
Linux Mint 17 Qiana Cinnamon 64-Bit
Intel Core i5 | 4GB RAM | nVidia GeForce GT 620M
User avatar
lordbonislav
Level 1
Level 1
 
Posts: 4
Joined: Fri Sep 19, 2014 11:20 am

Re: Different background for each workspace?

Postby Dngrsone on Wed Sep 24, 2014 9:19 am

Welcome to the forums.

I am assuming that you want to use one of the scripts provided in this thread.

Basically, you want to use a text editor such as gedit to create a file with the script in it. In the case of the scripts seen in this thread, one would copy the entire contents of the 'CODE' box and paste it into the text editor and then save that under a file name.

Then, you would have to modify the properties of that file so that it is executable.
User avatar
Dngrsone
Level 3
Level 3
 
Posts: 198
Joined: Thu Nov 29, 2012 12:18 pm

Re: Different background for each workspace?

Postby lordbonislav on Wed Sep 24, 2014 5:19 pm

Thank you!
Linux Mint 17 Qiana Cinnamon 64-Bit
Intel Core i5 | 4GB RAM | nVidia GeForce GT 620M
User avatar
lordbonislav
Level 1
Level 1
 
Posts: 4
Joined: Fri Sep 19, 2014 11:20 am

Re: Different background for each workspace?

Postby lordbonislav on Thu Sep 25, 2014 7:11 am

One more question. How to set the wallpaper streched in this script?
Linux Mint 17 Qiana Cinnamon 64-Bit
Intel Core i5 | 4GB RAM | nVidia GeForce GT 620M
User avatar
lordbonislav
Level 1
Level 1
 
Posts: 4
Joined: Fri Sep 19, 2014 11:20 am

Re: Different background for each workspace?

Postby Dngrsone on Thu Sep 25, 2014 8:27 am

I wouuld think that it would either be a setting in Cinnamon, or you'd want to make your wallpapers the same size as your desktop ahead of time.
User avatar
Dngrsone
Level 3
Level 3
 
Posts: 198
Joined: Thu Nov 29, 2012 12:18 pm

Linux Mint is funded by ads and donations.
 
Previous

Return to MATE

Who is online

Users browsing this forum: No registered users and 0 guests