Page 1 of 1

JWM How to open windows centered and assign workspace?

Posted: Tue Jan 25, 2022 10:18 am
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!!!😊


Re: JWM open windows centered and assign workspace

Posted: Tue Jan 25, 2022 10:51 am
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?


Re: JWM open windows centered and assign workspace

Posted: Tue Jan 25, 2022 11:09 am
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).


Re: JWM open windows centered and assign workspace

Posted: Tue Jan 25, 2022 2:23 pm
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.


Re: JWM open windows centered and assign workspace

Posted: Tue Jan 25, 2022 6:27 pm
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. ;)


Re: JWM open windows centered and assign workspace

Posted: Wed Jan 26, 2022 1:29 am
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.


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

Posted: Wed Jan 26, 2022 1:41 am
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?


Re: JWM open windows centered and assign workspace

Posted: Wed Jan 26, 2022 12:44 pm
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>

Open Pale Moon in a specified desktop

Posted: Thu Feb 09, 2023 7:07 am
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>