Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 Oct 2014, 19:38
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
JWM title bar window buttons bitmask? [SOLVED]
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
Argolance


Joined: 06 Jan 2008
Posts: 1839
Location: PORT-BRILLET (Mayenne - France)

PostPosted: 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.

_________________


Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: 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?
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
`f00


Joined: 06 Nov 2008
Posts: 809
Location: the Western Reserve

PostPosted: Fri 10 Aug 2012, 20:29    Post_subject:
Sub_title: crossings in mist
 

reply here in eyecandy §..
Back to top
View user's profile Send_private_message 
Argolance


Joined: 06 Jan 2008
Posts: 1839
Location: PORT-BRILLET (Mayenne - France)

PostPosted: 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
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: 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

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: 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?
example.png
 Description   a quick example with bitmaps at max 16x16 size
 Filesize   613 Bytes
 Viewed   1485 Time(s)

example.png

xbm.tar.gz
Description  you can edit these in mtpaint
gz

 Download 
Filename  xbm.tar.gz 
Filesize  449 Bytes 
Downloaded  553 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Sun 12 Aug 2012, 03:36    Post_subject:  

another example based on paws and bones
xbm.tar.gz
Description 
gz

 Download 
Filename  xbm.tar.gz 
Filesize  463 Bytes 
Downloaded  551 Time(s) 
example.png
 Description   
 Filesize   902 Bytes
 Viewed   1401 Time(s)

example.png


_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Sun 12 Aug 2012, 03:56    Post_subject:  

and mac-ish circles
example.png
 Description   
 Filesize   826 Bytes
 Viewed   1432 Time(s)

example.png

xbm.tar.gz
Description 
gz

 Download 
Filename  xbm.tar.gz 
Filesize  451 Bytes 
Downloaded  543 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
Argolance


Joined: 06 Jan 2008
Posts: 1839
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sun 12 Aug 2012, 06:16    Post_subject:  

Hello technosaurus,
Waou! Very Happy !
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
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: 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.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
`f00


Joined: 06 Nov 2008
Posts: 809
Location: the Western Reserve

PostPosted: Sun 12 Aug 2012, 16:57    Post_subject:
Sub_title: 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
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Sun 12 Aug 2012, 23:34    Post_subject:  

some 3d-ish buttons
xbm.tar.gz
Description 
gz

 Download 
Filename  xbm.tar.gz 
Filesize  406 Bytes 
Downloaded  533 Time(s) 
example.png
 Description   
 Filesize   785 Bytes
 Viewed   1388 Time(s)

example.png


_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
Argolance


Joined: 06 Jan 2008
Posts: 1839
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Mon 13 Aug 2012, 03:09    Post_subject:  

Hello,
Quote:
nice job on the variations (new looks keep things from getting stale)
Smile
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.
084856_414x476_easyshot.jpg
 Description   Window title bar buttons switcher (next Toutou LINUX)
 Filesize   29.5 KB
 Viewed   1373 Time(s)

084856_414x476_easyshot.jpg


_________________

Back to top
View user's profile Send_private_message Visit_website 
01micko


Joined: 11 Oct 2008
Posts: 7835
Location: qld

PostPosted: 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>   
jwm_window_decor-switcher-0.1.pet
Description 
pet

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

 Download 
Filename  jwm_xdg_template-0.1-hack.pet 
Filesize  2.16 KB 
Downloaded  527 Time(s) 
jwm-stuff.png
 Description   
 Filesize   149.48 KB
 Viewed   1318 Time(s)

jwm-stuff.png


_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
Argolance


Joined: 06 Jan 2008
Posts: 1839
Location: PORT-BRILLET (Mayenne - France)

PostPosted: 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
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0870s ][ Queries: 13 (0.0041s) ][ GZIP on ]