Xfce Forum

Sub domains
 

You are not logged in.

#1 2010-05-08 02:18:22

nimnull22
Member
Registered: 2009-03-04
Posts: 11

Bind or attach application to certain workspace

Dear All.
Last message I have found in your forum about how to attach application to some workspace was from last year.

So I decide to ask again.
Is there any native Xfce settings that can attach an application to some workspace, in order to see them there after start?

Thanks.

Offline

#2 2010-05-08 11:19:18

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Bind or attach application to certain workspace

Somewhere in Xfce's Window Manager, or WM Tweaks dialogue windows, there's an option to 'remember last workspace'.

Failing that, there's Devil's Pie, or Compiz Config Settings Manager's Place Windows plugin.

Offline

#3 2010-05-08 22:04:24

nimnull22
Member
Registered: 2009-03-04
Posts: 11

Re: Bind or attach application to certain workspace

It is:
"Remember and recall previous workspace when switching via keyboard shortcuts"

It doesn't remember which workspace an application belongs to.

So, nothing has changed, still one need to use side tools.
I do not understand, is it too difficult to implement "Send To Workspace N" after start and keep it in "application.desktop" file? For example "preferred workspace=2 or 4"?

Any way, if I can send application to another workspace by choosing "Send To Workspace N" with mouse, then I should also do it by sending an appropriate command to WM. Why not to implement it?

Offline

#4 2010-05-08 22:24:34

nimnull22
Member
Registered: 2009-03-04
Posts: 11

Re: Bind or attach application to certain workspace

I've found what I need - wmctrl.

Thanks.

Offline

#5 2010-05-09 07:34:38

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Bind or attach application to certain workspace

What exactly can wmctrl do, that the, "Move to workspace N", keyboard shortcut in Xfwm4, can't do?

Regardless, it's still pretty far from what you were originally asking for - that would be Devil's Pie: a deamon, that alters window hints/positions, as they're created.

Offline

#6 2010-05-09 14:38:00

nimnull22
Member
Registered: 2009-03-04
Posts: 11

Re: Bind or attach application to certain workspace

I start my program ones per week and not going to keep DAEMON for it.
I was looking something naturally embedded in xfce - still nothing.
It is not too difficult to add a script which will organize windows between workspaces - works quickly, does not stay in memory.

Thanks.

Offline

#7 2010-05-09 15:05:35

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Bind or attach application to certain workspace

That's what I'm saying: Xfwm4's inbuilt keyboard shortcuts are functionally the same as what you are doing with wmctrl, are they not?

Offline

#8 2010-05-09 15:13:10

nimnull22
Member
Registered: 2009-03-04
Posts: 11

Re: Bind or attach application to certain workspace

Yes, they are. Of course.

But I need to select a window and press 2 buttons.

I do not want to do it. I want my script start what I told it and place it where I told it. That is all.

Offline

#9 2010-05-09 15:20:11

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Bind or attach application to certain workspace

Well now I am curious. Can I see a sample of your wmctrl scripts, please?

Offline

#10 2010-05-10 16:44:56

nimnull22
Member
Registered: 2009-03-04
Posts: 11

Re: Bind or attach application to certain workspace

Script, actually is very simple:

#! /bin/bash

evolution &
sleep 2
wmctrl -r Evolution -t 2

exit 0

One needs to adjust "sleep" because, it needs to wait until window will be created, so 1-3 sec.

One also can put this script name to "evolution.desktop" under "exec", and have it on menu.

Offline

#11 2010-05-10 16:52:42

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Bind or attach application to certain workspace

Aww man, I don't know how adding an ampersand never occurred to me. Thanks for that; I was wanting to do something similar, a while back.

Offline

#12 2010-05-16 22:10:49

KitchM
Member
Registered: 2009-08-15
Posts: 304

Re: Bind or attach application to certain workspace

Thanks, nimnull22.  Maybe this can work for me, too.  We've been waiting for a solution for a long time, as you found out.

Could you explain for everyone how you used it exactly?  I understand the script format, but I do not understand what you meant when you wrote "One also can put this script name to "evolution.desktop" under "exec", and have it on menu.".

I assume the user is to place the info into a file.  Is the place where you wrote "evolution" in the script, simply the place where anyone inserts any program name?  Also, where should the file be saved?  How does one automate multiple program startups when starting Xfce?  Must one run wmctrl at some point?

Thanks again.

Offline

#13 2010-05-17 03:15:49

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Bind or attach application to certain workspace

Copy the application's launcher from /usr/share/applications/ to ~/.local/share/applications/; open it up in a text editor; scroll down to the exec line and replace the path to the binary (/usr/bin/evolution), with your wrapper script (~/bin/evolution_workspace.sh).

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 557.93 KiB (Peak: 574.41 KiB) ]