JWM How to open windows centered and assign workspace?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
rmcellig1
Posts: 28
Joined: Fri Dec 25, 2020 1:03 pm
Been thanked: 1 time

JWM How to open windows centered and assign workspace?

Post by rmcellig1 »

I have two questions. I'm using fossapup and can't figure out how when I open something like an app or window, it automatically centers on the screen.

I tried this, it didn't work.

Add this line to ~.jwmrc below $HOME/.jwm/preferences

<Include>$HOME/.jwm/group</Include>

2. Create an empty file called group in ~/.jwm

3. Add this to the group file

<JWM>

<Group>
<Class>.*</Class>
<Option>centered</Option>
</Group>

</JWM>
4. Restart jwm or logout/login

My other question is how do you open an application in a specific workspace? I have been using Google to find answers to these two questions.

Thanks!!!😊

User avatar
MochiMoppel
Posts: 1233
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 437 times

Re: JWM open windows centered and assign workspace

Post by MochiMoppel »

rmcellig1 wrote: Tue Jan 25, 2022 10:18 am

I have two questions.

One per thread would be better.

Re Q1:
copy

Code: Select all

<Group>
<Option>centered</Option>
</Group>

into /root/.jwm/jwmrc-personal (e.g. right before the closing </JWM> tag), then open console and run jwm -restart
Note that this will center every new window (same effect as your <Class>.*</Class>)

Re Q2: What do mean by "workspace"? Virtual desktop?

Last edited by MochiMoppel on Tue Jan 25, 2022 11:27 am, edited 1 time in total.
User avatar
amethyst
Posts: 2414
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 504 times

Re: JWM open windows centered and assign workspace

Post by amethyst »

Does this work for application windows too? Is there an option likewise to open applications maximized (I know one can set the maximized option in some application's preferences but not all).

rmcellig1
Posts: 28
Joined: Fri Dec 25, 2020 1:03 pm
Been thanked: 1 time

Re: JWM open windows centered and assign workspace

Post by rmcellig1 »

Yes, a virtual desktop so if I want to open pale moon in virtual desktop 3, let's say maximized as an example.

User avatar
mikewalsh
Moderator
Posts: 6155
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 793 times
Been thanked: 1979 times

Re: JWM open windows centered and assign workspace

Post by mikewalsh »

MochiMoppel wrote: Tue Jan 25, 2022 10:51 am
rmcellig1 wrote: Tue Jan 25, 2022 10:18 am

I have two questions.

One per thread would be better.

Re Q1:
copy

Code: Select all

<Group>
<Option>centered</Option>
</Group>

into /root/.jwm/jwmrc-personal (e.g. right before the closing </JWM> tag), then open console and run jwm -restart
Note that this will center every new window (same effect as your <Class>.*</Class>)

Hey, thanks for that tip, Mochi. I've been meaning to float this very question for ages; just never seemed to get around to it.

Now I don't need to. Cheers!

Mike. ;)

User avatar
MochiMoppel
Posts: 1233
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 437 times

Re: JWM open windows centered and assign workspace

Post by MochiMoppel »

mikewalsh wrote: Tue Jan 25, 2022 6:27 pm

Hey, thanks for that tip, Mochi. I've been meaning to float this very question for ages; just never seemed to get around to it.

Just let it keep floating :D
Why do you want this? I understand that it can be useful for *some* windows, e.g. alerts, but for all? You'll constantly have to drag them "out of the way" so that they don't get obscured by the next window piled on top of it.

User avatar
Flash
Moderator
Posts: 976
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 51 times
Been thanked: 125 times

Re: JWM How to open windows centered and assign workspace?

Post by Flash »

rmcellig1 wrote: Tue Jan 25, 2022 10:18 am

I have two questions.
....
My other question is how do you open an application in a specific workspace? I have been using Google to find answers to these two questions.

I agree with MochiMoppel, one question per topic works better for the forum.

As for your second question: I'm not sure I understand the question, but if you're in a Rox window, tapping the ~ key will open a console in the directory where the Rox window is. Then, entering an application name in the console will start the application in the same directory.

That's probably not what you wanted but is it at least in the right direction?

Chaos coordinator :?
User avatar
MochiMoppel
Posts: 1233
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 437 times

Re: JWM open windows centered and assign workspace

Post by MochiMoppel »

rmcellig1 wrote: Tue Jan 25, 2022 2:23 pm

Yes, a virtual desktop so if I want to open pale moon in virtual desktop 3, let's say maximized as an example.

This should work:

Code: Select all

<Group>
	<Name>Navigator</Name>
	<Option>maximized</Option>
	<Option>desktop:3</Option>
</Group>
User avatar
MochiMoppel
Posts: 1233
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 437 times

Open Pale Moon in a specified desktop

Post by MochiMoppel »

MochiMoppel wrote: Wed Jan 26, 2022 12:44 pm

This should work:

Code: Select all

<Group>
	<Name>Navigator</Name>
	<Option>maximized</Option>
	<Option>desktop:3</Option>
</Group>

Maybe I should clarify this. Above code works for Pale Moon, but it also works for Firefox and maybe other Firefox siblings which all share the same Name "Navigator". So if you only want Pale Moon to open maximized in desktop 3 but not Firefox, you should replace
<Name>Navigator</Name>
with
<Class>Pale moon</Class>

If you want the setting to apply only to Firefox but not Pale Moon, then it should be
<Class>Firefox</Class>

Post Reply

Return to “Users”