How to save workspace configurations?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Ernie Pantuso
Level 2
Level 2
Posts: 62
Joined: Tue Jun 26, 2012 11:46 am

How to save workspace configurations?

Post by Ernie Pantuso »

Is there ANY way to save which windows are open in which workspace when I reboot?

I wrote a script (using Zenity and wmctrl) that helps me manage and switch between several different workspaces (each of which has its own name and purpose). It's a real lifesaver for me but every time I reboot and launch Chrome, every window launches in the current workspace and I spend 10 minutes sending each window to the appropriate workspace! If there's no way to do this in Xfce, what about Cinnamon or Mate? (I understand that KDE will do this but I can't stand KDE so that's not really an option for me.) I also read that elementary OS does this but I'm not eager to switch distros. Help? Suggestions?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
HaveaMint
Level 6
Level 6
Posts: 1085
Joined: Fri Feb 02, 2018 9:56 pm

Re: How to save workspace configurations?

Post by HaveaMint »

Ernie Pantuso wrote: Tue Feb 12, 2019 9:32 pm .
Will this do what your wanting. Use the save session on exit.
xfce.png
"Tune for maximum Smoke and then read the Instructions".
ajgringo619

Re: How to save workspace configurations?

Post by ajgringo619 »

I had the same problem. I use this script to start/configure my desktop:

Code: Select all

#!/bin/bash
# This script moves my preferred programs to their proper desktops

# Define program windows that we want to move
window=( Chromium Evolution Console VirtualBox HomeBank LibreOffice )

# Move programs
for i in "${!window[@]}"
do

  # Wait till we get at least one matching window
  until [ -n "$(wmctrl -l | grep "${window[$i]}" 2>&1)" ]
  do
    sleep 1
  done

  # Send it to the appropriate desktop
  wmctrl -r "${window[$i]}" -t $i

done
The window= variable uses a keyword in the title of the program you're trying to manage.
Ernie Pantuso
Level 2
Level 2
Posts: 62
Joined: Tue Jun 26, 2012 11:46 am

Re: How to save workspace configurations?

Post by Ernie Pantuso »

@HaveaMint - The first time I tried that, it worked. The second time, not only did it NOT work, but things went kinda haywire and I couldn't even shut down. I finally had to sudo su, then shutdown -r now just to shut the system down. It gave me a weird message about validation matching or something like that. (I know, I should have written it down.)

Thanks for that, @ajgringo619! I'm no bash expert (had a heckuva time writing my script for managing workspaces!) but it looks like you're just looking for any Chromium window and moving it to a particular workspace? Maybe I can find a way to adapt that but my issue is that I have maybe a couple dozen Google Chrome Windows and they need to be moved to one of 9 or 10 workspaces.

I guess if nothing else, I have something that loops through all the open windows, prompting me for which workspace to move it to. That would save me a little time.
ajgringo619

Re: How to save workspace configurations?

Post by ajgringo619 »

You should be able to be more specific in what you're looking for with the window title. Since I only use tabs and not separate windows for Chromium, a simple tag of "Chromium" works every time.
Ernie Pantuso
Level 2
Level 2
Posts: 62
Joined: Tue Jun 26, 2012 11:46 am

Re: How to save workspace configurations?

Post by Ernie Pantuso »

The window titles & tabs are going to change all the time. I could maybe look for certain keywords but it’d be very tough to hard code it.
User avatar
Eclipsenow+
Level 2
Level 2
Posts: 92
Joined: Mon Oct 07, 2019 3:26 am

Re: How to save workspace configurations?

Post by Eclipsenow+ »

Sorry, I'm not sure if it's rude to bump a topic up after a year, but this topic interests me.

I've been locked into iMac's way of doing things and never really bothered to learn about workspaces.
Once I switch it's something I'm keen to get into, but only if what I want to setup can be saved.
I assume workspaces can save:-
Files on desktops you're working on for different things? I've got work, hobbies, and blogging workspaces and files I'll probably set up.
Backgrounds for each workspace? My greenie blogging one can have a rainforest shot, my business space an image of a steampunk desk that gets me in the mood to do paper work, etc?
Software - what software opens on each workspace?

Does all this stuff save?
Cinnamon 20 on (2011?) ASUS i7-2670QM CPU @ 2.2GHz 4 Cores; 8 threads, 32G RAM, GeForce GT 540M
Locked

Return to “Xfce”