| Author |
Message |
Argolance

Joined: 06 Jan 2008 Posts: 1378 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Wed 08 Aug 2012, 04:46 Post subject:
JWM title bar window buttons bitmask? [SOLVED] |
|
Hello,
In earlier version of jwm, it was possible to replace default JWM window title bar buttons pictures with xbm pictures (such as ".jwm-bClose.xbm", etc.) copied inside home directory. This seems not to work with latest version of jwm.
Does somebody know how to do this nevertheless?
Cordialement.
_________________

Last edited by Argolance on Sun 12 Aug 2012, 06:17; edited 1 time in total
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Fri 10 Aug 2012, 14:09 Post subject:
|
|
You can always change the hard coded ones... Otherwise can you point to a version that works as such?
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
`f00

Joined: 06 Nov 2008 Posts: 792 Location: the Western Reserve
|
Posted: Fri 10 Aug 2012, 20:29 Post subject:
Subject description: crossings in mist |
|
reply here in eyecandy §..
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1378 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Sat 11 Aug 2012, 06:38 Post subject:
|
|
Hello,
Cannot answer to your post because thread is locked! So I do it here...
| Quote: | | Yes, it was back when Patriot was doing betas of jwm for translucency effects | I noticed that (with latest JWM versions) it is no need anymore to configure the Xorg file for tranlucency effects: they work out of the box. | Quote: | | Option "Composite" "Enable" | and | Quote: | Section "Extensions"
Option "Composite" "Enable"
EndSection |
| Quote: | | This should cover some of the versions to use masks for titlebar buttons | This thread learned me how to use the xbm pictures to replace standard window buttons. | Quote: | | I never got the fancy effects like icewm, pekwm and 'box looks can give (prelight, animation, 3D borders and so on) | Yes, it is true but, (I don't know why?), I like JWM and Rox, which are as both lungs of original Puppy...
Though it should be a great thing Joe to enhanced his wonderful WM, especially these window buttons...
Cordialement.
_________________

|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sat 11 Aug 2012, 19:49 Post subject:
|
|
use the source Luke
I use grep -i (case insensitive) to find likely candidates
grep -i 0x * --> border.c
leads to bmpfiles also in border.c, which pointed setbuttonmask to parse.c which leads to TOK_BUTTON... in lex.c and from there you can see that the tags are:
"ButtonClose",
"ButtonMax",
"ButtonMaxActive",
"ButtonMin",
but I think if you do one, you may have to do them all (looking at the code it looked like it did either/or) so something like
| Code: |
<ButtonClose>/usr/share/pixmaps/close.xbm</ButtonClose>
<ButtonMax>/usr/share/pixmaps/max.xbm</ButtonMax>
<ButtonMaxActive>/usr/share/pixmaps/maxact.xbm</ButtonMaxActive>
<ButtonMin>/usr/share/pixmaps/min.xbm</ButtonMin> |
I assume they can just be in the pixmap path, but don't have the properly sized xbm files around to test, but I did one of them for reference:
| Code: |
#define close_width 16
#define close_height 16
static unsigned char close_bits[] = {
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x30, 0x06, 0x70, 0x07,
0xE0, 0x03, 0xC0, 0x01,
0xE0, 0x03, 0x70, 0x07,
0x30, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 }; |
save as close.xbm and open in mtpaint
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 12 Aug 2012, 02:23 Post subject:
|
|
rather than editing my last post I'll just condense it:
the jwmrc (or its template or one of its include files) should have any/all of these tags containing the full path to 16x16 xbm image(s)
| Code: | <ButtonClose>/usr/share/pixmaps/close.xbm</ButtonClose>
<ButtonMax>/usr/share/pixmaps/max.xbm</ButtonMax>
<ButtonMaxActive>/usr/share/pixmaps/maxact.xbm</ButtonMaxActive>
<ButtonMin>/usr/share/pixmaps/min.xbm</ButtonMin> |
anyone want to do ttuuxxx's paw prints from his icewm theme?
| Description |
a quick example with bitmaps at max 16x16 size |
| Filesize |
613 Bytes |
| Viewed |
881 Time(s) |

|
| Description |
you can edit these in mtpaint
|

Download |
| Filename |
xbm.tar.gz |
| Filesize |
449 Bytes |
| Downloaded |
210 Time(s) |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 12 Aug 2012, 03:36 Post subject:
|
|
another example based on paws and bones
| Description |
|

Download |
| Filename |
xbm.tar.gz |
| Filesize |
463 Bytes |
| Downloaded |
206 Time(s) |
| Description |
|
| Filesize |
902 Bytes |
| Viewed |
856 Time(s) |

|
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 12 Aug 2012, 03:56 Post subject:
|
|
and mac-ish circles
| Description |
|
| Filesize |
826 Bytes |
| Viewed |
867 Time(s) |

|
| Description |
|

Download |
| Filename |
xbm.tar.gz |
| Filesize |
451 Bytes |
| Downloaded |
201 Time(s) |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1378 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Sun 12 Aug 2012, 06:16 Post subject:
|
|
Hello technosaurus,
Waou! !
Thank you a lot: this is quite perfect. I thought this would be more complicated! Possible pictures are obviously a bit poor but it is better than nothing...
Cordialement.
_________________

|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 12 Aug 2012, 14:05 Post subject:
|
|
I am 90% sure the xbm format is a holdover from early versions. It is feasible to patch it for xpm/png/jpg, but it would also make themeing more complex and add a small amount of overhead... Probably not worth it since icewm basically does that already.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
`f00

Joined: 06 Nov 2008 Posts: 792 Location: the Western Reserve
|
Posted: Sun 12 Aug 2012, 16:57 Post subject:
Subject description: next.. |
|
How hard would it be code-wise to make the three 'standard' buttons multifunction (according to which mousebutton is clicked)? This is a real convenience for mouse users and one of the reasons I regularly switch out of jwm - the scrollwheel on my old mouse died quite some time ago so shading is a bit awkward in jwm, plus I use vertical/horizontal maximize much more often than full. The close button is fine as-is since if the window needs killing, chances are the button on it won't work anyway.
I'm thinking something along the lines of
| Code: | minimize-button maximize-button close-button
m1=minimize/m2=shade m1=full/m2=vertical/m3=horizontal m(any)=close |
nice job on the variations (new looks keep things from getting stale)
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 12 Aug 2012, 23:34 Post subject:
|
|
some 3d-ish buttons
| Description |
|

Download |
| Filename |
xbm.tar.gz |
| Filesize |
406 Bytes |
| Downloaded |
193 Time(s) |
| Description |
|
| Filesize |
785 Bytes |
| Viewed |
814 Time(s) |

|
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1378 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Mon 13 Aug 2012, 03:09 Post subject:
|
|
Hello,
| Quote: | | nice job on the variations (new looks keep things from getting stale) |
As well as I think it is a pity to drink some good wine in a plastic timbale mold (even if a glass is a bit... heavier...)!
Cordialement.
| Description |
Window title bar buttons switcher (next Toutou LINUX) |
| Filesize |
29.5 KB |
| Viewed |
809 Time(s) |

|
_________________

|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7019 Location: qld
|
Posted: Tue 28 Aug 2012, 08:43 Post subject:
|
|
I have been following this thread as I made a patch requested by Mavrothal for the OLPC to enlarge the deco in JWM.
I have followed your lead Argolance and made a "switcher". It is called from the jwm settings gui in the Desktop menu. It is possible (easy really) to add more themes, or delete the stock ones.
Be aware that the xdg template I attach is for Slacko (don't know the consequences in other pups, be warned) and so optional. You probably should add the code that technosaurus posted to your jwmrc-personal file; | Code: | <ButtonClose>/usr/share/pixmaps/close.xbm</ButtonClose>
<ButtonMax>/usr/share/pixmaps/max.xbm</ButtonMax>
<ButtonMaxActive>/usr/share/pixmaps/maxact.xbm</ButtonMaxActive>
<ButtonMin>/usr/share/pixmaps/min.xbm</ButtonMin>
|
| Description |
|

Download |
| Filename |
jwm_window_decor-switcher-0.1.pet |
| Filesize |
5.36 KB |
| Downloaded |
190 Time(s) |
| Description |
BE CAREFUL with this one .. backup your original /etc/xdg/templates/_root_.jwmrc file if you use it
|

Download |
| Filename |
jwm_xdg_template-0.1-hack.pet |
| Filesize |
2.16 KB |
| Downloaded |
190 Time(s) |
| Description |
|
| Filesize |
149.48 KB |
| Viewed |
742 Time(s) |

|
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1378 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Tue 28 Aug 2012, 11:21 Post subject:
|
|
Hello,
It is a pity that JWM doesn't yet support anti aliasing: pictures are somewhat rough and I think, as JWM "lover", that it is no need sophisticated pictures to be displayed as window buttons: just smoothed simple pictures... This would be great and should be taken into account for the next releases!
Cordialement.
_________________

|
|
Back to top
|
|
 |
|