[JWM] How to disable window decorations per application?

Using applications, configuring, problems
Post Reply
Message
Author
qp0913562
Posts: 1
Joined: Sat 07 Jan 2017, 16:57

[JWM] How to disable window decorations per application?

#1 Post by qp0913562 »

Hi,

does anyone know if it is possible to disable window decorations per application with JWM?

In Openbox this apparently is possible as like in this example:

http://openbox.org/wiki/Help:Applications

Code: Select all

<application class="Firefox*">
   <maximized>yes</maximized>
   <decor>no</decor>
</application>
This example would make Firefox run maximized and without decorations.

Would this also be possible with JWM?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hello qp0913562.

The answer is yes. jwm has a file called jwmrc-personal at /root/.jwm .

Further down in it, it has what jwm calls "groups". In the example below,
the title of the window has been disabled for the xclock program.
<Group>
<Name>xclock</Name>
<Option>notitle</Option>
<!-- <Option>noborder</Option> -->
<Option>nolist</Option>
<Option>nopager</Option>
</Group>
Upon launch, the xclock program window will show borders but not
the title.

The options at the bottom mean that this window will not show in the list
of open programs and neither in the window pager in the task bar.

Notice how you enable or disable a feature in the "noborder" line. As it is
in the example, it is disabled.

If you wish to enable "noborder" for the xclock window, remove the
<!-- at the beginning, and the --> at the end. Do the reverse (put these
arrows back at the beginning and end of the line) if you want to disable
any feature.

IHTH.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Wyk72
Posts: 18
Joined: Tue 01 Sep 2009, 12:55

#3 Post by Wyk72 »

Hello musher0.

Your example works perfectly with xclock, but I can't make it work for firefox.

I added:

<Name>firefox</Name>
<Option>notitle</Option>
<Option>noborder</Option>
<Option>nolist</Option>
<Option>nopager</Option>


in the <Group> section, but Firefox opens with the usual decorators.

I've made many tries but with no luck

The outout of xwininfo -root -children is:


xwininfo: Window id: 0xf4 (the root window) (has no name)

Root window id: 0xf4 (the root window) (has no name)
Parent window id: 0x0 (none)
39 children:
0x2200149 "lxterminal": ("lxterminal" "Lxterminal") 160x282+175+258 +175+258
0x2200147 "lxterminal": () 10x10+-100+-100 +-100+-100
0x2200035 (has no name): () 1x1+-1+-1 +-1+-1
0x2200001 "lxterminal": ("lxterminal" "Lxterminal") 10x10+10+10 +10+10
0x200005f "Firefox": ("Popup" "Firefox") 411x240+47+80 +47+80
0x200005a "Firefox": ("Popup" "Firefox") 198x98+620+380 +620+380
0x2000097 "Firefox": ("Popup" "Firefox") 245x129+407+545 +407+545
0x2000072 "Firefox": ("Popup" "Firefox") 1366x352+0+92 +0+92
0x2000052 "Option for hiding title bar in FireFox - Linux - Mozilla Discourse": ("Popup" "Firefox") 436x45+930+57 +930+57
0x200004e "Firefox": ("Popup" "Firefox") 200x200+0+0 +0+0
0x200003a "Firefox": () 10x10+-100+-100 +-100+-100
0x2400001 "/root/my-applications/firefox/plugin-container": ("/root/my-applications/firefox/plugin-container" "/root/my-applications/firefox/plugin-container") 10x10+10+10 +10+10
0x200001b "Firefox": () 10x10+-100+-100 +-100+-100
0x2000003 (has no name): ("Toplevel" "Firefox") 100x100+0+0 +0+0
0x2000001 "Firefox": ("firefox" "Firefox") 10x10+10+10 +10+10
0x1e00003 "retrovol": ("retrovol" "Retrovol") 20x102+0+0 +0+0
0x1e00001 "retrovol": ("retrovol" "Retrovol") 10x10+10+10 +10+10
0x1a00001 "powerapplet_tray": ("powerapplet_tray" "Powerapplet_tray") 10x10+10+10 +10+10
0x1800003 "parcellite": () 10x10+-100+-100 +-100+-100
0x1800001 "parcellite": ("parcellite" "Parcellite") 10x10+10+10 +10+10
0x1600001 "netmon_wce": ("netmon_wce" "Netmon_wce") 10x10+10+10 +10+10
0x1400001 "freememapplet_tray": ("freememapplet_tray" "Freememapplet_tray") 10x10+10+10 +10+10
0x1200001 "firewallstatus": ("firewallstatus" "Firewallstatus") 10x10+10+10 +10+10
0x1000003 (has no name): () 1x1+-1+-1 +-1+-1
0x1000001 "Dunst": ("Dunst" "Dunst") 1366x1+0+0 +0+0
0xc00001 (has no name): () 10x10+-20+-20 +-20+-20
0x800001 "pmcputemp": ("pmcputemp" "Pmcputemp") 10x10+10+10 +10+10
0x600032 (has no name): () 1366x28+0+740 +0+740
0x600052 (has no name): () 641x48+362+-47 +362+-47
0x6008fb (has no name): () 745x484+52+52 +52+52
0x6001a2 (has no name): () 1366x740+0+0 +0+0
0x60024b (has no name): () 1366x740+0+0 +0+0
0x6000be (has no name): () 641x48+362+0 +362+0
0x600799 (has no name): () 745x484+26+26 +26+26
0x40008f (has no name): () 1x1+-1+-1 +-1+-1
0x600001 "JWM": () 1x1+0+0 +0+0
0x400003 "ROX-Filer": () 10x10+-100+-100 +-100+-100
0x400001 "ROX-Filer": ("ROX-Filer" "ROX-Filer") 10x10+10+10 +10+10
0x400047 "ROX-Filer": ("ROX-Pinboard" "ROX-Filer") 1366x768+0+0 +0+0

Firefox is the ESR version 52.9.0

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#4 Post by musher0 »

Hello Wyk72.

I would suggest you live with it?! ;) (No mockery intended. Please read on.)

As you can see in your xwininfo list above, there are "many strains" for "one
Firefox", whereas there is only "one strain" for the Xclock.

I have never used this newer Firefox, but as you probably know, browsers nowadays
are mini-OS's in their own right; they offer their own control of decorations. Maybe
Firefox's internal controls are battling it out with jwm's?

I know the old Opera offered it and now Vivaldi: you can right-click on the top menu
line and then tick a box if you want to display the browser's "borders".

So one asks the browser to do what (s)he wants instead of the WM. Same result!

IHTH.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#5 Post by bigpup »

make Firefox run maximized and without decorations
Look for Firefox add-ons to do this.

Auto Fullscreen
This one works for me.
After installing this add-on.
Firefox starts in full screen.

Here is info on it.
https://addons.mozilla.org/en-US/firefo ... src=search
Get it from Firefox add-ons.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#6 Post by tallboy »

I am aware of the fact that this answer does not give you a recipe, but some interaction may be done with wmctrl: https://linux.die.net/man/1/wmctrl
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
Wyk72
Posts: 18
Joined: Tue 01 Sep 2009, 12:55

#7 Post by Wyk72 »

Thanks, musher0, I think I'll "live with it" for the time being.

I thought it was a trivial matter: after a lot of googling around I've found that browsers have become extremely complex beasts, sometimes difficult to tame. The subject of windows decorations came out in a lot of discussions and there are options exactly for it hardcoded into the browser, but different for every version. Honestly it looks rather ... lame to me, but who am I to judge ;)


@bigpup: I've tried the addon, it works as advertised but was not exactly what I was looking for. I was simply trying to get rid of the window border/title to save a little space in the screen of my laptop.

User avatar
Wyk72
Posts: 18
Joined: Tue 01 Sep 2009, 12:55

#8 Post by Wyk72 »

tallboy wrote:I am aware of the fact that this answer does not give you a recipe, but some interaction may be done with wmctrl: https://linux.die.net/man/1/wmctrl
Indeed: this command

wmctrl -r Mozilla -b toggle,fullscreen


toggles fullscreen mode correctly,but it's not exactly what was I was looking for.

I wanted to start Mozilla as Chrome starts: without windowt title/ decorations but not fullscreen i.e.:

[/img]
Attachments
Screenshot(1).png
(91.49 KiB) Downloaded 154 times

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#9 Post by bigpup »

In Xenialpup and most newer versions of Puppy.

menu>Desktop>JWMDesk Manager>Window>Geometry>Enable

If you change to these settings you get this.
See image

However you loose the ability of having a titlebar and what it is used for.
Set at one.
There is no space to click on or put anything in the titlebar.

Just found out.
If you move mouse pointer where the titlebar would be and pointer turns into a resize pointer or the mouse point is in just the right place.
You can right click and still get the titilbar menu.
Attachments
capture12333.png
(34.85 KiB) Downloaded 406 times
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#10 Post by MochiMoppel »

Wyk72 wrote:I can't make it work for firefox.

I added:

<Name>firefox</Name>
It's

Code: Select all

<Name>Navigator</Name>
You could also use this code, which is almost identical with your Openbox example of your first post :

Code: Select all

<Class>Firefox</Class>
Large applications usually generate more than one window, e.g a browser window, an info window etc.
All windows of an application share the same "Class" name while each window type can be identified by its "Name" name.
Use the xprop command and look for the WM_CLASS(STRING) parameter.
Example: For the Bookmarks window of Firefox: you would get WM_CLASS(STRING) = "Places", "Firefox"
"Places" would be Name and "Firefox"would be Class

Note that values are case sensitive!

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#11 Post by tallboy »

One little remark to the use of 'Navigator'. It doesn't work for Palemoon, even if xprop describe otherwise

Code: Select all

WM_CLASS(STRING) = "Navigator", "Pale moon"
To make Palemoon open in a particular position on virual desktop 4, I have to use this code:

Code: Select all

wmctrl -s 3
exec /usr/bin/palemoon "$@" &
sleep 3
wmctrl -r "Pale Moon" -e 0,270,84,1200,910
(and again thank you to MochiMoppel for teaching me how to)
bigpup wrote:In Xenialpup and most newer versions of Puppy.
menu>Desktop>JWMDesk Manager>Window>Geometry>Enable
I also have the same setup in Lucid 5.2.8.7.
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#12 Post by MochiMoppel »

tallboy wrote:One little remark to the use of 'Navigator'. It doesn't work for Palemoon, even if xprop describe otherwise

Code: Select all

WM_CLASS(STRING) = "Navigator", "Pale moon"
Works perfectly here.
Don't forget to restart JWM after editing JWM's configuration file.

User avatar
Wyk72
Posts: 18
Joined: Tue 01 Sep 2009, 12:55

#13 Post by Wyk72 »

@MochiMoppel, thanks a million, using the tag

<Name>Navigator</Name>

did the trick, and my Firefox is now ... more beautiful :)

The <Class> statement did not work, I think I'm writing it wrong: can you please give me a working example?
Last edited by Wyk72 on Sun 01 Jul 2018, 23:23, edited 1 time in total.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#14 Post by rufwoof »

The <Class> statement did not work, I think I'm writing it wrong: can you please give me a working example?

Code: Select all

<Group>
 <Class>Firefox</Class>
 <Option>notitle</Option>
 <Option>noborder</Option>
 <Option>maximisized</Option>
</Group>
See https://joewing.net/projects/jwm/config.shtml

To find the names/class open a terminal and type xprop and press enter, then move the mouse over the target window and left mouse click. One of the values shown in the terminal window will be something like ...

WM_CLASS(STRING) = "Navigator", "Firefox"

The second value is the class, alternatively the above group statements could have used the Name tag instead to equal effect i.e.

Code: Select all

<Group>
 <Name>Navigator</Name>
 <Option>notitle</Option>
 <Option>noborder</Option>
 <Option>maximisized</Option>
</Group>
Usually just restarting jwm is enough for the changes to take effect i.e. run

jwm -restart

in a terminal window. For some changes/configurations however you may have to completely restart X.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#15 Post by musher0 »

Euh... "maximisized" ? I think the word does not exist.

Are you sure it shouldn't be written "maximized" ?

(Just being the benevolent proof-reader, here!)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply