LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-30-2009, 03:26 PM   #1
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Trouble with FvwmButtons


I am setting up FvwmButtons, and I have quite a few applications swallowed in it (For now: gkrellm, xclock, stalonetray). The problem is that the cells in FvwmButtons are equally sized, and I cannot find a way to set the size to what you want. I have a screenshot in the attachment.

As you can see, gkrellm is overlapping xclock and some icons, xclock is stretched, and stalonetray has much more room than it needs. Is there a way to set the size of a button in pixels?

Here is a section from my .fvwm2rc:

Code:
And the screenshot:# FvwmButtons

Style "FvwmButtons" NoTitle, !Handles, Sticky, WindowListSkip, CirculateSkip, \
!Iconifiable, Colorset 2, IconColorset 2, FocusColorset 1, BorderWidth 4, \
FixedSize

DestroyModuleConfig FvwmButtons: *
*FvwmButtons: Geometry 92x950+0+0
*FvwmButtons: Colorset 2
*FvwmButtons: Columns 2
*FvwmButtons: Rows 8
*FvwmButtons: (1x1, Icon "/usr/share/icons/hicolor/32x32/apps/gvim.png" \
	Action(Mouse 1) "Exec exec gvim")
*FvwmButtons: (1x1, Icon "/usr/share/icons/hicolor/32x32/apps/firefox.png" \
	Action(Mouse 1) "Exec exec firefox")
*FvwmButtons: (1x1, Icon "/usr/share/icons/hicolor/32x32/apps/gimp.png" \
	Action(Mouse 1) "Exec exec gimp")
*FvwmButtons: (1x1, Icon "/usr/share/icons/hicolor/32x32/apps/evolution.png" \
	Action(Mouse 1) "Exec exec evolution")
*FvwmButtons: (1x1, Icon "/usr/share/icons/oxygen/32x32/apps/inkscape.png" \
	Action(Mouse 1) "Exec exec inkscape")
*FvwmButtons: (1x1, Icon "/usr/share/icons/gnome/32x32/apps/terminal.png" \
	Action(Mouse 1) "Exec exec gnome-terminal")
*FvwmButtons: (2x3, Size 92 386, Frame 0, Swallow(NoClose,UseOld) gkrellm \
	'Exec exec gkrellm')
*FvwmButtons: (2x1, Size 92 92, Frame 0, Swallow(NoClose,UseOld) xclock \
	'Exec xclock -update 1')
*FvwmButtons: (2x1, Frame 0, Swallow(NoClose,UseOld) stalonetray \
	'Exec exec stalonetray --geometry 96x48+0+0 --grow-gravity S \
	--max-width 96 --parent-bg true')
And the screenshot:

Last edited by MTK358; 03-26-2010 at 04:17 PM.
 
Old 10-01-2009, 12:15 PM   #2
sploot
Member
 
Registered: Sep 2009
Location: Phoenix, AZ
Distribution: Gentoo, Debian, Ubuntu
Posts: 121

Rep: Reputation: 27
Add this to your configuration file. Should control the box sizes using an algorith that attempts to allow all items to fit.

Code:
*FvwmButtons: BoxSize smart
The default is:

Code:
*FvwmButtons: BoxSize dumb
Hope this helps.
 
Old 10-02-2009, 11:21 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Didn't make any difference.
 
Old 10-02-2009, 02:53 PM   #4
sploot
Member
 
Registered: Sep 2009
Location: Phoenix, AZ
Distribution: Gentoo, Debian, Ubuntu
Posts: 121

Rep: Reputation: 27
I think it is likely that the size you have declared for the gkrellm daemon to run in (inside the fvwmbuttons) is too small for the program running. Thus it is spilling over onto other buttons. Try increasing the size of the space allocated in fvwmbuttons.

Code:
*FvwmButtons: (2x3, Size 92 386, Frame 0, Swallow(NoClose,UseOld) gkrellm \
	'Exec exec gkrellm')
Also, I have discovered that setting the boxsize to smart is only effective if you don't specify the geometry of the boxes. So it would make no impact for your configuration. Sorry for the bad advice on that point.
 
Old 10-02-2009, 03:17 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 404Reputation: 404Reputation: 404Reputation: 404Reputation: 404
An alternate way is to define as many columns and rows as pixels. For example, you could do something like:

Code:
*FvwmButtons: Columns 92
*FvwmButtons: Rows 950
Then you could set the buttons to, let's say, 46x46, xclock to 92x92, and so on. You could even do something like:

Code:
Style "FvwmButtons" NoTitle, !Handles, Sticky, WindowListSkip, CirculateSkip, \
!Iconifiable, Colorset 2, IconColorset 2, FocusColorset 1, BorderWidth 4, \
FixedSize

# Tihs is cause bash doesn't understand dots in the names of vars
SetEnv vp_height $[vp.height]
Piperead 'echo SetEnv gk_height $(($[vp_height] - 4*46 - 92))'

DestroyModuleConfig FvwmButtons: *
*FvwmButtons: Geometry 92x$[vp.height]+0+0
*FvwmButtons: Colorset 2
*FvwmButtons: Columns 92
*FvwmButtons: Rows $[vp.height]
*FvwmButtons: (46x46, Icon "/usr/share/icons/hicolor/32x32/apps/gvim.png" \
  Action(Mouse 1) "Exec exec gvim")
*FvwmButtons: (46x46, Icon "/usr/share/icons/hicolor/32x32/apps/firefox.png" \
  Action(Mouse 1) "Exec exec firefox")
*FvwmButtons: (46x46, Icon "/usr/share/icons/hicolor/32x32/apps/gimp.png" \
  Action(Mouse 1) "Exec exec gimp")
*FvwmButtons: (46x46, Icon "/usr/share/icons/hicolor/32x32/apps/evolution.png" \
  Action(Mouse 1) "Exec exec evolution")
*FvwmButtons: (46x46, Icon "/usr/share/icons/oxygen/32x32/apps/inkscape.png" \
  Action(Mouse 1) "Exec exec inkscape")
*FvwmButtons: (46x46, Icon "/usr/share/icons/gnome/32x32/apps/terminal.png" \
  Action(Mouse 1) "Exec exec gnome-terminal")
*FvwmButtons: (92x$[gk_height], Frame 0, Swallow(NoClose,UseOld) gkrellm \
  'Exec exec gkrellm')
*FvwmButtons: (92x92, Frame 0, Swallow(NoClose,UseOld) xclock \
  'Exec xclock -update 1')
*FvwmButtons: (92x46, Frame 0, Swallow(NoClose,UseOld) stalonetray \
  'Exec exec stalonetray --grow-gravity S \
  --max-width 92 --parent-bg true')
Just an example on how you can do some calculations from within fvwm.
 
Old 10-02-2009, 03:37 PM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Not specifying the sizes of the buttons didn't seem to help.

I would still like some alternative to the pixel-by-pixel approach, because the slightest change will require me to rewrite the whole thing.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fvwm: easy problem with fvwmbuttons frenchn00b Linux - General 2 02-09-2008 07:59 AM
Sound Trouble + Modem Trouble on Knoppix 4.0 AJones Linux - Software 0 01-05-2007 12:06 PM
Trouble with SCSI, Trouble with Sata humbletech99 Linux - Hardware 0 05-24-2006 04:05 AM
trouble ahead, trouble behind....trouble with mplayer Goonie Linux - Software 3 07-02-2003 02:29 AM
Kernel Trouble (Not actually trouble though) chem1 Linux - General 4 10-01-2002 01:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration