selfcompiled JWM shows different (Solved)

Moderators: 666philb, Forum moderators

Post Reply
Eastler_Dart
Posts: 80
Joined: Wed Aug 05, 2020 3:34 am
Has thanked: 1 time
Been thanked: 8 times

selfcompiled JWM shows different (Solved)

Post by Eastler_Dart »

Hello all :-)

in the puppy 'Fossapup64'
i had self compiled the windowmanager jwm,
with some edits in the source, to get
hotkeys in the Window/System-menu.

The sources are from packages.ubuntu.com, jwm-2.4.0
should be the same, as installed in original FossaPup.

After compile, and copy the resulting jmw to /usr/bin
and restart X, the new jwm is running an operating
nearly as expected.

One exception I see:
The menubutton on the Taskbar doesn't write the Text 'Menu',
the new jwm writes 'M...u' instead.
Taking some screenshots with original jwm and mine jwm
shows, that the main Menu-texts are shown a little smaller
from the new jwm. That seem the reason, which makes
the menubutton also smaller, and the text 'Menu' is
too big to put in. Thats way the new jwm writes 'M...u'.

2 Screenshots here:

My new JWM:
http://eastler.de/tmp/jwmEastlerMenuButton.png

the original JWM:
http://eastler.de/tmp/jwmOriginalMenuButton.png

Has someone a idea, where I have to look, why my compile
shows the font a little smaler than the original jwm ?.

User avatar
Jasper
Posts: 1597
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 677 times
Been thanked: 359 times

Re: selfcompiled JWM shows different

Post by Jasper »

I am not sure, but have you checked here?

**EDIT** my screengrab is from FP64-95.

Are you using the updated build FP64-96-CE?

There are configurable options available and I expect there is a font size somewhere contained within.

Dry Falls
Posts: 59
Joined: Thu Jul 29, 2021 7:40 pm
Has thanked: 14 times
Been thanked: 28 times

Re: selfcompiled JWM shows different

Post by Dry Falls »

Eastler_Dart wrote: Sat Mar 11, 2023 4:50 pm

The sources are from packages.ubuntu.com, jwm-2.4.0
should be the same, as installed in original FossaPup.

That problem with the menu button display was fixed in jwm-2.4.2. It's nothing you did but a built-in bug. Try recompiling with newer source and it should be fine.

df

dimkr
Posts: 1910
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 36 times
Been thanked: 833 times

Re: selfcompiled JWM shows different

Post by dimkr »

JWM 2.4.x uses pango to fix some text rendering issues. Maybe this can explain the difference.

If you want JWM 2.4.x, update to JWM 2.4.3. It includes fixes for two issues that affect Puppy:

https://github.com/joewing/jwm/pull/572
https://github.com/joewing/jwm/pull/577

Eastler_Dart
Posts: 80
Joined: Wed Aug 05, 2020 3:34 am
Has thanked: 1 time
Been thanked: 8 times

Re: selfcompiled JWM shows different

Post by Eastler_Dart »

very interesting answers :-)

Great thanks Jasper. Allthough I did not change any config files
(I simply swap new and original /usr/bin/jwm), it gave me the
hint, to check, which config files the new jwm uses :-)
but no luck, the new one uses the same configs as the original.

Great thanks to Dry Falls and dimkr
I think, that is my way . . . . my big way :roll:
I have edited several source-files, to get what I want.
With new sources I have to find all my changed files.

Is it interesting for you / others, to have key-shortcuts
in the window/system-menu ?

Here a screenshot, what is ment:
Image
hitting anywhere leftAlt+Space opens the window menu,
then a simple w, m, n, s, x or y acts with
restore, maximize, minimize, close, x- and y-maximize
(but you see, its german, the keys are from german words)

Again great thanks to all, when I get time, i will do it
with newer source.

Eastler_Dart
Posts: 80
Joined: Wed Aug 05, 2020 3:34 am
Has thanked: 1 time
Been thanked: 8 times

Re: selfcompiled JWM shows different

Post by Eastler_Dart »

Yeah :-)
as expectet, with the sources of JWM_2.4.2 (got from archive.ubuntu.com)
all works as whished :-)
And that sources comes with a .configure Script,
the 2.4.0 before didn't had any.

Great Thanks again for your help
User avatar
Jasper
Posts: 1597
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 677 times
Been thanked: 359 times

Re: selfcompiled JWM shows different (Solved)

Post by Jasper »

@Eastler_Dart

Can you share your updated JWM build as a PET file?

Eastler_Dart
Posts: 80
Joined: Wed Aug 05, 2020 3:34 am
Has thanked: 1 time
Been thanked: 8 times

Re: selfcompiled JWM shows different (Solved)

Post by Eastler_Dart »

here ist the petfile with ONLY the binary
(you need to have jwm with all his config-/imge- files in your system)
http://eastler.de/tmp/jwm-2.4.2_WithKey ... Binary.pet

You can check it with
jwm -h
in console, the output should be:
#: jwm -h
JWM v2.4.2 by Joe Wingbermuehle
with some little adds to
keystrokes in WinMenu

compiled options: confirm icons jpeg nls pango png shape svg xbm xft xinerama xpm xrender
system configuration: /usr/etc/system.jwmrc
usage: jwm [ options ]
-display X Set the X display to use
-exit Exit JWM (send _JWM_EXIT to the root)
-f file Use specified configuration file
-h Display this help message
-p Parse the configuration file and exit
-reload Reload menu (send _JWM_RELOAD to the root)
-restart Restart JWM (send _JWM_RESTART to the root)
-v Display version information

(the additional second and third lines:
with some little adds to
keystrokes in WinMenu

shows you, that the new jwm is active.

have fun, Eastler

User avatar
Jasper
Posts: 1597
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 677 times
Been thanked: 359 times

Re: selfcompiled JWM shows different (Solved)

Post by Jasper »

@Eastler_Dart

Thanks for sharing this :thumbup2:

I am a bit confused as I believed the Hot-Keys had been already set ie Left Alt - Space <Key>

I did try the combo's you mentioned/showed earlier but I did not see a response. :oops:

Do I need to configure these shortcuts myself?

Eastler_Dart
Posts: 80
Joined: Wed Aug 05, 2020 3:34 am
Has thanked: 1 time
Been thanked: 8 times

Re: selfcompiled JWM shows different (Solved)

Post by Eastler_Dart »

on the Desktop, have a window of a programm (Geany, Console etc) open,
press leftAlt+Space and release them, the windowmenu should open (as if you rightclick in the Windowtitlebar),
now, when Windowmenu is open and active it listen to the keyboard and should
react on single n key with minimize and so on.

Ahhhh, the action to leftAlt+space has to be defined in /root/.jwm/jwm-personal
with <Key mask="A" key="space">window</Key>
line 41-58 in my /root/.jwm/jwm-personal :
<Key key="F12">root:3</Key>

<Key mask="A" key="Tab">next</Key>
<Key mask="A" key="F4">close</Key>
<Key mask="A" key="F10">maximize</Key>
<Key mask="A" key="F6">minimize</Key>
<Key mask="A" key="#">desktop#</Key>
<Key mask="A" key="F1">root:3</Key>
<Key mask="A" key="F2">window</Key>
<Key mask="A" key="space">window</Key>

<Key keycode="160">exec:amixer sset Master toggle</Key>
<Key keycode="176">exec:amixer sset Master 1+,1+</Key>
<Key keycode="174">exec:amixer sset Master 1-,1-</Key>
<Key keycode="178">exec:defaultbrowser</Key>
<Key keycode="236">exec:defaultbrowser</Key>
<!-- <Key keycode="111">exec:defaultscreenshot</Key> nimmt die CursorHoch Taste -->
<Key key="Print">exec:mtpaint -s</Key>

if you don't want to put this/use this keycode, Fossapup has the same action already
built in with Keys leftAlt+F2 (the line above my code for leftAlt+Space)

So test, if jwm at the moment works, do a rightklick in windowtitlebar
(the winmenu opens), hit n key, the Window should get minimized.
If that works, you can decide about leftAlt+Space additionally include.

The text, which get showed in the Windowmenu you can edit,
if you know how to edit the file:
/usr/share/locale/[??]/LC_MESSAGES/jwm.mo
at the point [??] in the filepath you have to set
your language-short, in mine its de for Germany(Deutschland).
A hint, which language is active in your system you'll get with:
echo "${LANG:0:2}, take also a look at echo "$LANG", if your
country-code has more than 2 letters.
You have to translate the jwm.mo to jwm.po (with msgunfmt),
edit the jwm.po with a text-editor
and then retranslate the edited jwm.po back to jwm.mo (with msgfmt).
As a hint, here is the part out of mine jwm.po,
which belongs to the windowmenu:

Code: Select all

msgid "Menu type"
msgstr "Menü-Typ"

msgid "Menus"
msgstr "Menüs"

msgid "Close"
msgstr "Schließen     [s]"

msgid "Minimize"
msgstr "Minimieren    [n]"

msgid "Move"
msgstr "Verschieben   [v]"

msgid "Resize"
msgstr "Größe ändern  [g]"

msgid "Restore"
msgstr "Wiederherstellen [w]"

msgid "Maximize"
msgstr "Maximieren    [m]"

msgid "Maximize-x"
msgstr "Maximieren-x  [x]"

msgid "Maximize-y"
msgstr "Maximieren-y  [y]"

msgid "More themes"
msgstr "Mehr Themes"

msgid "Mouse <b>left</b> click"
msgstr "Maus <b>Links</b>klick"

As you see, jwm comes with the simple words for the action
which are shown if no jwm.mo file exists. The translations-
string I set includes the hints [n] etc.

hope it helps

(edited: added the command names for generating jwm.po / jwm.mo)

User avatar
Jasper
Posts: 1597
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 677 times
Been thanked: 359 times

Re: selfcompiled JWM shows different (Solved)

Post by Jasper »

@Eastler_Dart

Thank you once again for taking the time to provide me with the step by step instructions :thumbup:

Eastler_Dart
Posts: 80
Joined: Wed Aug 05, 2020 3:34 am
Has thanked: 1 time
Been thanked: 8 times

Re: selfcompiled JWM shows different (Solved)

Post by Eastler_Dart »

. .. . I have to go to supermarket and by a new brain . . . :o

Sorry, what I didn't have done is a deep test of the new jwm.
Yesterday I saw, it doesn't do all like I want.
There are conflicts with the actual state of the window,
so that restore and maximize doesn't do their job
in every situation.
Give me some days, at the moment I have only less time :cry:

again sorry, Eastler

Burunduk
Posts: 244
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 122 times

Re: selfcompiled JWM shows different (Solved)

Post by Burunduk »

Eastler_Dart wrote: Tue Mar 21, 2023 7:38 am

There are conflicts with the actual state of the window,
so that restore and maximize doesn't do their job
in every situation.

Is it the situation when the last or only window is minimized and then it's not possible to restore/maximize it using a shortcut?
I've tested it without modifying the code by adding this to the .jwmrc-personal:

Code: Select all

<Key mask="A4" key="w">restore</Key>
<Key mask="A4" key="m">maximize</Key>
<Key mask="A4" key="n">minimize</Key>
<Key mask="A4" key="s">close</Key>
<Key mask="A4" key="x">maxh</Key>
<Key mask="A4" key="y">maxv</Key>
<Key mask="A4" key="v">move</Key>
<Key mask="A4" key="g">resize</Key>

The shortcuts stop working after the last window on the active desktop is minimized. All of them, not just these! And this is not related to your modifications. I've noticed this bug before but wasn't able to reliably reproduce it. Now I know how to do it. Thanks.
Unfortunately, I've no idea how to fix it. I've inserted a printf() in the event handler and it looks like JWM doesn't receive keypress events at all in this situation. Switching to another desktop that has at least one open window (and back) with a mouse restores the shortcut functionality but it's still not possible to restore/maximize a minimized window.
So, it has something to do with JWM and X server interaction. On vanilla dpup that uses Xwayland, this problem doesn't appear - the shortcuts work and a minimized window can be restored.
As a workaround, it's possible to keep an invisible window to prevent the "all minimized" situation. Hopefully you'll find a more elegant solution.

---

By the way, an ellipsis in the middle of the taskbar button labels seems to make them less readable:

before
before
taskbar1.png (6.25 KiB) Viewed 327 times

The github user @szc126 has proposed a fix for this.

after
after
taskbar2.png (8.1 KiB) Viewed 327 times

---

Update: @Eastler_Dart I've made a patch for this. You might want to test it. The maximize command now works but restore still doesn't.

Eastler_Dart
Posts: 80
Joined: Wed Aug 05, 2020 3:34 am
Has thanked: 1 time
Been thanked: 8 times

Re: selfcompiled JWM shows different (Solved)

Post by Eastler_Dart »

puhhh, I'm ready with the programmings.

Had done greater changes to jwm, so that
the Hotkeys for the Window-menu can be
defined in .jwmrc.
And, additionally jwm shows Hotkey-letters
in the Win-meny, they also can be defined
in .jwmrc.
This all should work if you, or if you not
use gettext-transations for your system.
(I can't test it under US-Language, where
no gettext is needed).

In the pet at the end of this post there is
also /usr/share/doc/jwm_withWinMenuKeys.txt
with content:

this ist compiled in FossaPup64
from the source of jwm_2.4.2.orig.tar.xz
out of archive.ubuntu.com.

The only changed thing is,
the Window-menu now react to keyboard,
and the individual definable Hotkeys
are showed in the Window-menu.

Individual means, you can define
them in /root/.jwmrc or in a rcfile
which is included in /root/.jwmrc
whereby the acting hotkey and the
get showed letter for it have to
be defined separate, in two lines
for every case.

Here a selfexplaining example
(as it works on my german FossaPup64:

<?xml version="1.0"?>

<JWM>

<TitleButtonOrder>ximtw</TitleButtonOrder>

<!-- (start xev in console, 2 windows get opened,
hit a keyboard key (with active white window),
in the second window third line you'll see the keycode)
------------------------------------------------------- -->

<!-- the keyboard hotkeys in the window menu -->
<WinMenuKeyMaximize>58</WinMenuKeyMaximize>
<WinMenuKeyMaximizeX>53</WinMenuKeyMaximizeX>
<WinMenuKeyMaximizeY>52</WinMenuKeyMaximizeY>
<WinMenuKeyMinimize>57</WinMenuKeyMinimize>
<WinMenuKeyRestore>25</WinMenuKeyRestore>
<WinMenuKeyClose>39</WinMenuKeyClose>
<WinMenuKeyMove>55</WinMenuKeyMove>
<WinMenuKeyResize>42</WinMenuKeyResize>

<!-- the characters showed as hotkey in the window menu -->
<WinMenuCharClose>s</WinMenuCharClose>
<WinMenuCharMaximize>m</WinMenuCharMaximize>
<WinMenuCharMaximizeX>x</WinMenuCharMaximizeX>
<WinMenuCharMaximizeY>>y</WinMenuCharMaximizeY>
<WinMenuCharMinimize>n</WinMenuCharMinimize>
<WinMenuCharMove>v</WinMenuCharMove>
<WinMenuCharResize>g</WinMenuCharResize>
<WinMenuCharRestore>w</WinMenuCharRestore>

<!-- ----------------------------------------------------- -->

<RootMenu label="Menu" labeled="false" height="24" onroot="3">
.
.
.
.
.

Make a copy of your .jwmrc ( cp /root/.jwmrc /root/.jwmrc_original )
Open your /root/.jwmrc with the text-editor (geany?),
copy here the lines between the --------,
paste them in your .jwmrc anywhere,
edit the values to your whishes
and save the edited .jwmrc.

Restart X
(for that I'm used to close X with Keys leftStrg+leftAlt+Backspace,
in the console hitting xwm and Enter starts X again,
the new /usr/bin/jwm gets used. )

If you also like the Hotkey combination leftAlt+Space to open
the Windowmenu of the active window, you additionally have to
add a line (<Key mask="A" key="space">window</Key>) in /root/.jwmrc:

<Key mask="A" key="Tab">next</Key>
<Key mask="A" key="F4">close</Key>
<Key mask="A" key="F10">maximize</Key>
<Key mask="A" key="F6">minimize</Key>
<Key mask="A" key="#">desktop#</Key>
<Key mask="A" key="F1">root:3</Key>
<Key mask="A" key="F2">window</Key>
<Key mask="A" key="space">window</Key>

hint: there is a Hotkey combination for that already in Fossapup64: leftAlt+F2

Here a screenshot what is ment:
Image

and here is the pet:
http://eastler.de/tmp/jwm-2.4.2_WithKey ... Binary.pet (91.31 KB)

again thanks to Burunduk, because of using newer Sources and added more programmcode your lines aren't necessary, but your hints were very helpful. A remark to them is, if you define Hotkeys in jwmrc as you showed, they are active every time, in/on other runnig windows. Thatswhy i had programmed in special code, which only listen to keyboard, if the window-menu is the active window.

@Jasper: pay attention, this new pet-link points to the same filename as the first I gove, but its a newer/other pet now. Take it, test it ad hopefully have fun. If you find something going wrong, please give me a hint here :-)

Hope this helps some people

Eastler

Post Reply

Return to “Fossapup64”