Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-09-04 16:21:31

jdd
Member
Registered: 2020-09-04
Posts: 6

sticky application.

Hello,

I come from kde and would like to have some features on my xfce setup I used to have in kde (on the very same account).

First: can I have an application automatically start in a dedicated workspace?

I have 8 of them, I want thunderbird in the first, kpat in the second, Firefox in the third and so on.

thanks
jdd

Offline

#2 2020-09-04 20:13:30

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: sticky application.

Xfce doesn't have the functionality built-in, but you can easily add in the functionality using devilspie.

For example, to get Firefox to start on the 3rd workspace, you would use a ds file such as this one:

(if
    (is (application_name) "Firefox")
    (begin
        (set_workspace 3)
    )
)

Note: there also exists gdevilspie which is a gui front-end to devilspie2 - which is easier to use. The MXLinux wiki has more information.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2020-09-05 06:30:59

jdd
Member
Registered: 2020-09-04
Posts: 6

Re: sticky application.

Yes...
Thanks, it was what I was looking for :-)
of course my distro do not offer devilspie but devilspy2 so the syntax is different :-( - LUA don't even use the # for comments :-(.
devilspie2 is pretty friendly, with the debug options showing the windows name :-)

my script become (below).

I still need to learn how to lauch devilspie2 at boot time (I added this on start apps in xfce config, but didn't yet test it - i need to deconnect for that).

Thanks
jdd

debug_print("Application: " .. get_application_name())
debug_print("Window: " .. get_window_name());

if (get_window_name() == "Mozilla Firefox") then
--  change_workspace(3)
  set_window_workspace(3);
end

if (get_window_name() == "Mozilla Thunderbird") then
--  change_workspace(1)
  set_window_workspace(1);
end

if (get_window_name() == "KPatience") then
--  change_workspace(2)
  set_window_workspace(2);
end


if (get_window_name() == "Nouvel onglet – Chromium") then
--  change_workspace(4)
  set_window_workspace(4);
end

Offline

#4 2020-09-05 07:24:53

jdd
Member
Registered: 2020-09-04
Posts: 6

Re: sticky application.

Hello,
In fact I couldn't make it work in xfce start config, but I could add it in .bashrc (devilspie2 --debug &) and it seems to work

thanks
jdd

Last edited by jdd (2020-09-05 07:40:50)

Offline

Board footer

Powered by FluxBB