Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Introduction to FvwmButtons
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
taviso
Retired Dev
Retired Dev


Joined: 15 Apr 2003
Posts: 261
Location: United Kingdom

PostPosted: Fri Apr 16, 2004 9:54 am    Post subject: Introduction to FvwmButtons Reply with quote

FvwmButtons, also known as GoodStuff, is sometimes overlooked by new fvwm users, despite being the most powerful software for creating desktop panels available today.

I've written this guide to introduce FvwmButtons to new users, and take anyone interested step by step through creating a simple panel. Hopefully this will help get you started a little quicker than the man page alone :).

This is the panel I am going to create.

http://dev.gentoo.org/~taviso/goodstuff1.png

It's very simple, has a set of nine buttons that can be bound to applications or window controls. It also has an xclock along the top.

Of course, FvwmButtons has many, many features I havn't mentioned here, but this should be enough to get started :)

Step 1: Planning

Fvwm uses a flat text based configuration, which is not an intuitive method for designing user interfaces. The solution is to use a graphics package to create a template to work from. You can use any package you like, The GIMP, xpaint, dia, or even xfig.

Here is a screenshot of me planning this panel in dia..

http://dev.gentoo.org/~taviso/goodstuff2.png

As you can see I have an outline and the approximate layout of the buttons all plotted in dia. Don't worry about this template being perfect, we are just going to use it to estimate the dimensions in the next step.

Step 2: Dimensions

Now that you have a template to work from, you can calculate what the minimum grid size you will need in order to contain your buttons.

This is a lot simpler than it sounds, we just need to know how many rows and columns we should split our panel into. Each button can take up any whole number of grid squares, so we just have to make sure we have enough.

http://dev.gentoo.org/~taviso/goodstuff3.png

As you can see, we need a minimum grid of 7 rows and 3 columns so that each button occupies a whole number of grid squares. The top button requires one row and 3 columns, the other buttons need 2 rows and 1 columns.

Step 3: Create Buttons

Now that we have the dimensions needed, we can make an absolute minimum FvwmButtons configuration to test the dimensions.

You can tweak the button geometries and grid size until everything looks right.

Code:
DestroyModuleConfig LaunchTime: *
*LaunchTime: Rows 7
*LaunchTime: Columns 3
*LaunchTime: (3x1)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)


As you can see, each configuration line for our panel starts with an asterisk, then the panel alias. Lines that dont use brackets are settings, lines that do are button definitons. The buttons defined here only have one setting, how many rows and columns they need.

You can enter this in your fvwm2rc and restart, or paste it into an FvwmConsole. I've used DestroyModuleConfig so that if you paste the configuration into FvwmConsole twice, fvwm knows that you are not trying to continue the same configuration.

Now lets try starting the panel, enter the following into your FvwmConsole

Code:
Module FvwmButtons -g 178x207 LaunchTime


The -g specifies the Geometry, it tells FvwmButtons how big you want the panel to be (and also where you want it to appear).

Hopefully, you should see a window like this

http://dev.gentoo.org/~taviso/goodstuff4.png

Not very exciting yet, but don't worry, move on to the next step where we will configure the buttons and add the bindings.

Step 4: Fill in the blanks

Swallowing is what FvwmButtons calls Reparenting, it basically means any application window can be used as a button on your panel. So lets use this concept to swallow an xclock into our new panel.

First lets find a command line for xclock that looks suitable for our panel.

Code:
xclock -bg '#31658c' -fg white -digital -face 'Aquafont:size=11' -strftime '%a, %d %b %Y %H:%M'


This is what I have used. Now lets tell our panel how to start the clock.

Code:
*LaunchTime: (3x1, Swallow "xclock" `Exec xclock -bg '#31658c' -fg white -digital -face 'Aquafont:size=11' -strftime '%a, %d %b %Y %H:%M'`)


The first setting is the Rows and Columns we want, then the Swallow command. the next argument is the name of the window FvwmButtons should look out for, followed by the Fvwm command needed to start the window.

Here is our new Panel:

Code:
DestroyModuleConfig LaunchTime: *
*LaunchTime: Rows 7
*LaunchTime: Columns 3
*LaunchTime: (3x1, Swallow "xclock" `Exec xclock -bg '#31658c' -fg white -digital -face 'Aquafont:size=11' -strftime '%a, %d %b %Y %H:%M'`)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)


Enter the configuration into your FvwmConsole, and start the panel to make sure everything has worked, hopefully you will see a window like this:

http://dev.gentoo.org/~taviso/goodstuff5.png

Now for the next button, Let's make it a launcher for The GIMP.

Code:
*LaunchTime: (1x2, Title "gimp", Icon graphics_paint_edit.png)


As you can see, we have the dimensions, a Title and an Icon. All we need now is to define an Action. Actions are responses to Clicks, so lets say we want the first mouse button to start the gimp.

Code:
Action(Mouse 1) `Exec gimp`


Lets enter this into the button definition.

Code:
*LaunchTime: (1x2, Title "gimp", Icon graphics_paint_edit.png, Action(Mouse 1) `Exec gimp`)


The configuration should now look like this:

Code:
DestroyModuleConfig LaunchTime: *
*LaunchTime: Rows 7
*LaunchTime: Columns 3
*LaunchTime: (3x1, Swallow "xclock" `Exec xclock -bg '#31658c' -fg white -digital -face 'Aquafont:size=11' -strftime '%a, %d %b %Y %H:%M'`)
*LaunchTime: (1x2, Title "gimp", Icon graphics_paint_edit.png, Action(Mouse 1) `Exec gimp`)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)
*LaunchTime: (1x2)


Test out the panel, if everything looks okay fill in the rest of the buttons.

Code:
DestroyModuleConfig LaunchTime: *                                   
*LaunchTime: Rows 7
*LaunchTime: Columns 3
*LaunchTime: (3x1, Center, Swallow "xclock" `Exec xclock -bg '#31658c' -fg white -digital -face 'Aquafont:size=11' -strftime '%a, %d %b %Y %H:%M'`)
*LaunchTime: (1x2, Title "gimp", Icon graphics_paint_edit.png, Action(Mouse 1) `Exec gimp`)
*LaunchTime: (1x2, Title "xmag", Icon telescope.png, Action(Mouse 1) `Exec xmag`)
*LaunchTime: (1x2, Title "xcalc", Icon calculator.png, Action(Mouse 1) `Exec xcalc`)
*LaunchTime: (1x2, Title "mozilla", Icon browser_ship-wheel.png, Action(Mouse 1) `Exec mozilla`)
*LaunchTime: (1x2, Title "run", Icon gears.png, Action(Mouse 1) `Exec gmrun`)
*LaunchTime: (1x2, Title "gvim", Icon gvim.png, Action(Mouse 1) `Exec gvim`)
*LaunchTime: (1x2, Title "move", Icon hardware_mouse.png, Action(Mouse 1) `Pick Move`)
*LaunchTime: (1x2, Title "close", Icon bomb.png, Action(Mouse 1) `Pick Close`)
*LaunchTime: (1x2, Title "shade", Icon window.png, Action(Mouse 1) `Pick WindowShade True`)


Start the panel and you should see something like:

http://dev.gentoo.org/~taviso/goodstuff6.png

Step 5: Finalise Panel

Test all your buttons, make sure everything is working, Hopefully it is and you can setup Colorsets, Fonts, Frames, Padding and any other setting you want!

Code:
Colorset 30 fg black, bg #c6c3c6, RootTransparent buffer, Tint #efebef 65

DestroyModuleConfig LaunchTime: *                                   
*LaunchTime: Rows 7
*LaunchTime: Columns 3
*LaunchTime: Font "xft:Bitstream Vera Sans Mono:style=Roman:size=8"
*LaunchTime: Colorset 30
*LaunchTime: Frame 1
*LaunchTime: (3x1, Center, Swallow "xclock" `Exec xclock -bg '#31658c' -fg white -digital -face 'Aquafont:size=11' -strftime '%a, %d %b %Y %H:%M'`)
*LaunchTime: (1x2, Title "gimp", Icon graphics_paint_edit.png, Action(Mouse 1) `Exec gimp`)
*LaunchTime: (1x2, Title "xmag", Icon telescope.png, Action(Mouse 1) `Exec xmag`)
*LaunchTime: (1x2, Title "xcalc", Icon calculator.png, Action(Mouse 1) `Exec xcalc`)
*LaunchTime: (1x2, Title "mozilla", Icon browser_ship-wheel.png, Action(Mouse 1) `Exec mozilla`)
*LaunchTime: (1x2, Title "run", Icon gears.png, Action(Mouse 1) `Exec gmrun`)
*LaunchTime: (1x2, Title "gvim", Icon gvim.png, Action(Mouse 1) `Exec "gvim" gvim`)
*LaunchTime: (1x2, Title "move", Icon hardware_mouse.png, Action(Mouse 1) `Pick Move`)
*LaunchTime: (1x2, Title "close", Icon bomb.png, Action(Mouse 1) `Pick Close`)
*LaunchTime: (1x2, Title "shade", Icon window.png, Action(Mouse 1) `Pick WindowShade True`)


Try out the new Panel!

Code:
Module FvwmButtons -g 178x207 LaunchTime


Hopefully you should see something similar to this:

http://dev.gentoo.org/~taviso/goodstuff7.png

Now all you have to do is set any Style options you want, and decide how to start your panel. Did you notice the extra argument to Exec on the gvim button? Try pressing it, notice the button will stay down until a window called gvim appears! You can do this for all the buttons, if you like it.

Maybe you would like LaunchTime to always be visible?

Code:
Style LaunchTime StaysOnTop


And lets start it everytime we login

Code:
AddToFunc StartFunction
+ I Module FvwmButtons -g 178x207 LaunchTime


And finally, lets add it to a menu:

Code:
AddToMenu MyRootMenu
+ "Start LaunchTime" Module FvwmButtons -g 178x207 LaunchTime


edit: 21/05/2004 changed wording of planning section, using dia instead.
_________________
--------------------------------------
Gentoo on Alpha, is your penguin 64bit?
--------------------------------------------------------


Last edited by taviso on Fri May 21, 2004 1:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
blue.sca
l33t
l33t


Joined: 28 Aug 2003
Posts: 680
Location: Mainz, Germany

PostPosted: Fri Apr 16, 2004 10:11 am    Post subject: Reply with quote

YOU ARE TOO COOL ;)

thank you, you brought me to fvwm and now you will get me deeper and deeper :D
_________________
geek by nature, linux by choice
i want my avatar back... thank you
:wq
Back to top
View user's profile Send private message
X
Apprentice
Apprentice


Joined: 30 Apr 2002
Posts: 192
Location: Lexington KY

PostPosted: Fri Apr 16, 2004 4:08 pm    Post subject: Reply with quote

Thanks.

That was an informative document.
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2527
Location: Denmark

PostPosted: Sat Apr 17, 2004 8:35 am    Post subject: Reply with quote

8O 8O 8O 8O 8O

I think i can do some cool things with this .... 8O
Thanks !
:wink:
_________________
linux: #232767
Back to top
View user's profile Send private message
tommy_fila
Guru
Guru


Joined: 19 Nov 2003
Posts: 450
Location: Phoenix, AZ

PostPosted: Sun Apr 18, 2004 8:22 pm    Post subject: Reply with quote

Great work! Thank you so much for your contributions to the community! Keep it coming! :D :D
_________________
"What goes on in life, that goes for eternity."
Back to top
View user's profile Send private message
Chickpea
l33t
l33t


Joined: 03 Jun 2002
Posts: 846
Location: Vancouver WA

PostPosted: Sat Apr 24, 2004 6:52 pm    Post subject: Reply with quote

This is the best explanation of FvwmButtons I have read. I finally understand what those geometry numbers
Code:
*FvwmButtons: (2x1)
in the button definitions mean. This will make it so much easier

Thanks!
Back to top
View user's profile Send private message
Souperman
Guru
Guru


Joined: 14 Jul 2003
Posts: 449
Location: Cape Town, South Africa

PostPosted: Wed May 19, 2004 7:10 pm    Post subject: Reply with quote

Chickpea wrote:
This is the best explanation of FvwmButtons I have read. I finally understand what those geometry numbers
Code:
*FvwmButtons: (2x1)
in the button definitions mean. This will make it so much easier

Thanks!

Woot! I've also been struggling to figure out just what those dimensions are. Thanks Tavis! :D
_________________
moo
Back to top
View user's profile Send private message
monotux
l33t
l33t


Joined: 09 Sep 2003
Posts: 751
Location: Stockholm, Sweden

PostPosted: Tue Jun 29, 2004 1:55 am    Post subject: Reply with quote

wow, this was some really good reading!
I've been struggling to understand how your "FvwmShelf" works (so I can take some of it's functions hehe), but now I decided to make one of myself, and it actually works!

thanks, man :)
_________________
Computer science is no more about computers than astronomy is about telescopes.
Back to top
View user's profile Send private message
Moloch
Apprentice
Apprentice


Joined: 17 Mar 2003
Posts: 293
Location: Albuquerque, NM, US

PostPosted: Tue Jun 29, 2004 2:36 am    Post subject: Reply with quote

Wow pertty, I may have to try FVWM. I've been using KDE cause I'm too lazy. I don't mind an initial setup, but I need an quick and easy way to add new applications with an icon.
Back to top
View user's profile Send private message
kosine
n00b
n00b


Joined: 02 Oct 2003
Posts: 57

PostPosted: Fri Sep 24, 2004 10:12 pm    Post subject: Goodstuff! Reply with quote

a good tutorial, help me a lot to understand your FvwmShelf
Back to top
View user's profile Send private message
paramthegreat
Tux's lil' helper
Tux's lil' helper


Joined: 12 Aug 2002
Posts: 78

PostPosted: Sat Oct 01, 2005 6:07 pm    Post subject: tooltips on fvwm buttons Reply with quote

what code do i need to add to make the buttons have a tooltip. i am making a button bar that has 1 row and 9 buttons. i do not want to add titles as i want the bar to be fairly small.
thanx,
paul
_________________
Parminder
guptaparminder at yahoo dot com
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Oct 03, 2005 4:25 pm    Post subject: Re: tooltips on fvwm buttons Reply with quote

paramthegreat wrote:
what code do i need to add to make the buttons have a tooltip. i am making a button bar that has 1 row and 9 buttons. i do not want to add titles as i want the bar to be fairly small.
thanx,
paul
FvwmButtons don't currently have a tooltip option. You can use ActiveTitle, but most likely this isn't what you are looking for.
Back to top
View user's profile Send private message
soigres
l33t
l33t


Joined: 09 Dec 2004
Posts: 648
Location: Milano, Italy

PostPosted: Fri Oct 14, 2005 4:00 pm    Post subject: Reply with quote

i want an autohide taskbar on the left side... can i put there the fvwmtaskbar or is it better to make my own taskbar with fvwmbuttons and fvwmwindowmenu? i can use Swallow or Panel options in fvwmbuttons to have windows list... not? or what else?
Back to top
View user's profile Send private message
taviso
Retired Dev
Retired Dev


Joined: 15 Apr 2003
Posts: 261
Location: United Kingdom

PostPosted: Sat Oct 22, 2005 10:11 am    Post subject: Reply with quote

soigres wrote:
i want an autohide taskbar on the left side... can i put there the fvwmtaskbar or is it better to make my own taskbar with fvwmbuttons and fvwmwindowmenu? i can use Swallow or Panel options in fvwmbuttons to have windows list... not? or what else?


Yes, you should make your own taskbar with FvwmIconMan and FvwmButtons, there is a faq about autohiding panels here
_________________
--------------------------------------
Gentoo on Alpha, is your penguin 64bit?
--------------------------------------------------------
Back to top
View user's profile Send private message
soigres
l33t
l33t


Joined: 09 Dec 2004
Posts: 648
Location: Milano, Italy

PostPosted: Sat Oct 22, 2005 10:13 am    Post subject: Reply with quote

taviso wrote:
soigres wrote:
i want an autohide taskbar on the left side... can i put there the fvwmtaskbar or is it better to make my own taskbar with fvwmbuttons and fvwmwindowmenu? i can use Swallow or Panel options in fvwmbuttons to have windows list... not? or what else?


Yes, you should make your own taskbar with FvwmIconMan and FvwmButtons, there is a faq about autohiding panels here
yes... done yet!!! thank you! it's fantastic, fvwm has benn the only way to make it!!!
now my little problem is that mazimized windows don't go over gkrellm
Back to top
View user's profile Send private message
njmartin88
n00b
n00b


Joined: 16 Feb 2006
Posts: 9
Location: Bradford, Unighted Kingdom

PostPosted: Wed Dec 27, 2006 3:34 pm    Post subject: Reply with quote

Surprised nobody has asked this yet. Maybe because its a stupid question :lol: but...

Where did you get your icons from?

EDIT: Never mind, found it looking through your .fvwm2rc. Thanks for this great HOWTO.
Back to top
View user's profile Send private message
spadearcher
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2006
Posts: 131
Location: Seattle

PostPosted: Thu Jan 11, 2007 8:34 am    Post subject: Reply with quote

I've been trying to implement Taviso's instructions above for creating a panel of buttons, but am failing to understand exactly what I do in response to the following step:

"You can enter this in your fvwm2rc and restart, or paste it into an FvwmConsole. I've used DestroyModuleConfig so that if you paste the configuration into FvwmConsole twice, fvwm knows that you are not trying to continue the same configuration.

"Now lets try starting the panel, enter the following into your FvwmConsole

"Code:
"Module FvwmButtons -g 178x207 LaunchTime""

Specifically, what do I label what I "paste" and into which "FvwmConsole" -- FvwmConsole directory or existing FvwmConsole file, or create a new one in the FvwmConsole directory, and where do I insert the "Module..." code line???

I'm at a real loss to understand what I am actually expected to do at this point. Am I really being that dense?
Back to top
View user's profile Send private message
ThomasAdam
Guru
Guru


Joined: 20 Mar 2005
Posts: 448
Location: England

PostPosted: Thu Jan 11, 2007 7:05 pm    Post subject: Reply with quote

spadearcher wrote:
I've been trying to implement Taviso's instructions above for creating a panel of buttons, but am failing to understand exactly what I do in response to the following step:

"You can enter this in your fvwm2rc and restart, or paste it into an FvwmConsole. I've used DestroyModuleConfig so that if you paste the configuration into FvwmConsole twice, fvwm knows that you are not trying to continue the same configuration.

"Now lets try starting the panel, enter the following into your FvwmConsole

"Code:
"Module FvwmButtons -g 178x207 LaunchTime""

Specifically, what do I label what I "paste" and into which "FvwmConsole" -- FvwmConsole directory or existing FvwmConsole file, or create a new one in the FvwmConsole directory, and where do I insert the "Module..." code line???

I'm at a real loss to understand what I am actually expected to do at this point. Am I really being that dense?


Well, FvwmConsole is a module -- it's a way of communicating with FVWM directly, as opposed to putting commands into your .fvwm2rc file and then restarting FVWM to re-read those changes.

Of course, as it's a module you have to tell FVWM to start it. You aren't necessarily going to want to run it as FVWM starts up -- and as such, many people add it to a menu, as in:

Code:

AddToMenu MyMenu "FvwmConsole" "Module FvwmConsole"


Then with that loaded, you can paste whatever you like into it, and let FVWM evaluate it. Depending on where your error redirects go, you'll either see them directly in the FvwmConsole window, or else they'll get logged, typically to ~/.xsession-errors.

-- Thomas Adam
Back to top
View user's profile Send private message
spadearcher
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2006
Posts: 131
Location: Seattle

PostPosted: Thu Jan 11, 2007 7:27 pm    Post subject: Reply with quote

Thomas: Please, a bit more further clarification regarding "FvwmConsole," where to find it, etc.

Here's the path through which I've located items labeled "FvwmConsole:"

/root/fvwm-2.5.19/modules/FvwmConsole.

That of course is a directory. Within that are files labeled "FvwmConsole" and others variously labeled "FvwmConsole" *.

Do I create a new FvwmModule for this purpose, or add my code to one of the existing ones?

What am I missing in my undersanding of all this, which is presented by you and Taviso as fairly simple and straight-forward?

Thanks (yet again) for your help.
Back to top
View user's profile Send private message
ThomasAdam
Guru
Guru


Joined: 20 Mar 2005
Posts: 448
Location: England

PostPosted: Thu Jan 11, 2007 7:39 pm    Post subject: Reply with quote

spadearcher wrote:
Thomas: Please, a bit more further clarification regarding "FvwmConsole," where to find it, etc.


Oddly enough, it's a module distributed with FVWM. Providing you have installed FVWM, and not tampered with ModulePath (if you don't know what that is or does, you can't have), then FVWM will find this module in a path that it knows about, and load it for you.

Hence why the only thing you need to do is issue:

Code:

Module FvwmConsole


from within your .fvwm2rc file somewhere. As I say, people like to use a menu or key-bindings to do this for this specific module.

spadearcher wrote:

Here's the path through which I've located items labeled "FvwmConsole:"

/root/fvwm-2.5.19/modules/FvwmConsole.

That of course is a directory. Within that are files labeled "FvwmConsole" and others variously labeled "FvwmConsole" *.


But that's unlikely to be where FVWM looks for the module it knows and loads about, and even looks for. The following command will list the default ModulePath (set at installation time):

Code:

fvwm-config -m


spadearcher wrote:

What am I missing in my undersanding of all this, which is presented by you and Taviso as fairly simple and straight-forward?


You're overcomplicating what is but a simple thing to understand. The reason FVWM has modules is to reduce the size of the overall binary, to not load what is unnecessary code to performing its basic operation (which is managing windows of course), and to not enforce loading of optional features not all users are going to want.

FVWM has a very good module interface, which means all sorts of modules have been written. FVWM ships with a fair few in its distribution, one of them happens to be FvwmConsole, which does what I described in my last post -- it allows actions to be issued to FVWM as though they were in one's .fvwm2rc file. The reason why this is useful is because it allows for quick testing, and not continually having to restart FVWM is a good thing, plus it allows for state-maintenance (i.e you don't have to do anything else other than issue a command, without affecting anthing else that's running).

Modules in FVWM *must* be spawned via FVWM -- this is because internally, there's two sets of pipes, one that listens to the module, and one that sends data to it. You can appreciate I think the situation whereby if you don't launch a module from FVWM, FVWM has no way of communicating with it.

Does that help answer your question?

-- Thomas Adam
Back to top
View user's profile Send private message
spadearcher
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2006
Posts: 131
Location: Seattle

PostPosted: Thu Jan 11, 2007 8:43 pm    Post subject: Reply with quote

Thomas: I'm beginning to see a glimmer of light at the end of the tunnel.

Executing "fvwm-config -m" gets me "/usr/local/libexec/fvwm/2.5.19"

When I go there I see a listing of many files, of which three are designated "FvwmConsole," FvwmConsoleC" and "FvwmConsoleC.pl" respectively.

Again, to get back to where I started from, into which do I paste Taviso's multi-lined button code?

Also -- and here I'm really dumb -- what action do you mean by the verb "issue" when you instruct me regarding what to do with "Module FvwmConsole"? (As I'm a lawyer, I'm aware that ordinary words in each profession often become "terms-of-art" with special meanings.)

You're up late again! Regards, Jim
Back to top
View user's profile Send private message
ThomasAdam
Guru
Guru


Joined: 20 Mar 2005
Posts: 448
Location: England

PostPosted: Thu Jan 11, 2007 8:58 pm    Post subject: Reply with quote

spadearcher wrote:
Thomas: I'm beginning to see a glimmer of light at the end of the tunnel.


There's hope for me yet then. ;P

spadearcher wrote:

Executing "fvwm-config -m" gets me "/usr/local/libexec/fvwm/2.5.19"

When I go there I see a listing of many files, of which three are designated "FvwmConsole," FvwmConsoleC" and "FvwmConsoleC.pl" respectively.


Indeed you would. And here's the kick: you can think of ModulePath as being analogous to how PATH works at the shell level -- FVWM searches the paths listed for the specific module loaded -- and as soon as it finds one, it loads it. But, since changing this variable causes more headaches than you could know -- many don't -- and hence FVWM only ever really looks in one location.

spadearcher wrote:

Again, to get back to where I started from, into which do I paste Taviso's multi-lined button code?


Actually into the console called "FvwmConsole" would be a start. :P As I said before, it's slightly chicken and egg in that you have to add to something in FVWM a means of launching FvwmConsole. I'll reiterate again that you can do this by:

1. Adding it to a pre-existing or new menu:

Code:

AddToMenu MyMenu "FvwmConsole" "Module FvwmConsole"


Where "MyMenu" is better off being a menu you already use. Note what the above is saying -- it's telling FVWM that when you click on the menu item called "FvwmConsole" that the associated action ("Module FvwmConsole") is to load the specified module, which FVWM will gladly do, having checked ModulePath for its existence.

2. A Key-binding:

Code:

Key X A CM Module FvwmConsole


Will launch FvwmConsole when you press "CTRL-ALT-X" anywhere in FVWM.

3. At Startup:

Code:

AddToFunc StartFunction I Module FvwmConsole


Although you're not likely wanting to do this unless you want it to start up along with FVWM each time.

So, as I said before the job of FvwmConsole is to send commands to FVWM to invoke a response. FvwmConsole looks exactly like a terminal window (in fact, this is all it is, since all FvwmConsole does is fork a terminal instance and execve() some stuff). If you wanted, to, for instance, tell FVWM to launch xcalc, you could type in:

Code:

Exec exec xcalc


("Exec" is a FVWM command, remember).

Along simialr veins, the same is true of the module configuration you were wanting to paste into it. Since I can't be bothered to look for it, here's a contrived example:

Code:

DestroyModuleConfig g:*
*g: Rows 1
*g: Columns 1
*g: (1x1, Title "Click Me", Action "KillModule FvwmButtons g")

Module FvwmButtons g


If you were to paste that in FvwmConsole, FVWM would interpret each line, and launch the specified FvwmButtons alias.

spadearcher wrote:

Also -- and here I'm really dumb -- what action do you mean by the verb "issue" when you instruct me regarding what to do with "Module FvwmConsole"? (As I'm a lawyer, I'm aware that ordinary words in each profession often become "terms-of-art" with special meanings.)


See above. There is no legalese with me -- and I'd advise you, unless explicitly stated, not to interpret language into it -- it's going to be hard for all concerned, otherwise. :P

spadearcher wrote:

You're up late again! Regards, Jim


I'm an insomniac.

-- Thomas Adam
Back to top
View user's profile Send private message
spadearcher
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2006
Posts: 131
Location: Seattle

PostPosted: Thu Jan 11, 2007 10:27 pm    Post subject: Reply with quote

Thomas: Further to your instructions:

If I wanted to paste a "module configuration" into "FvwmConsole," of the three I located -- "FvwmConsole," FvwmConsoleC" and "FvwmConsoleC.pl" -- when I "cat" them the first two do not seem to be text files. Only the last one is. Therefore if I attempt to paste the "module configuration" (which is in text format ) into "FvwmConsole" (which does not appear to be in text format), how does that work or how do I manage it?

I am quite coversant already with adding instructions to my pre-exiting menu, so that should be no problem. It might also be useful to have the button panel I am trying to configure appear on startup. My main problem as I perceive it, now is (yet again) how and where to paste the "module configuration." It may not appear so yet, but you're being very helpful, and I believe I really am learning along the way (albeit slowly). Thanks again. Jim
Back to top
View user's profile Send private message
ThomasAdam
Guru
Guru


Joined: 20 Mar 2005
Posts: 448
Location: England

PostPosted: Thu Jan 11, 2007 10:34 pm    Post subject: Reply with quote

spadearcher wrote:
Thomas: Further to your instructions:

If I wanted to paste a "module configuration" into "FvwmConsole," of the three I located -- "FvwmConsole," FvwmConsoleC" and "FvwmConsoleC.pl" -- when I "cat" them the first two do not seem to be text files. Only the last one


When you what? You shouldn't be cat'ing anything into anything -- as I said in my previous posts, when you launch FvwmConsole from FVWM, it opens up its own window into which you can paste whatever you want -- it's that window you want.

Since you've asked about them, FvwmCommand, and FvwmConsoleS are realated. Without explaining to you how they work, suffice it to say that FvwmCommand also allows you to communicate with FVWM, but can be done so externally from FVWM -- say inside a shell script, for instance. But for the purposes of what you're trying to do, you really want FvwmConsole.

If you follow the instructions I've given you, you'll see for yourself that a window called FvwmConsole opens up.

[...]

-- Thomas Adam
Back to top
View user's profile Send private message
spadearcher
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2006
Posts: 131
Location: Seattle

PostPosted: Thu Jan 11, 2007 11:12 pm    Post subject: Reply with quote

Thomas: OK, you've said the magic words!

"...when you launch FvwmConsole from FVWM, it opens up its own window into which you can paste whatever you want -- it's that window you want." Previously I was trying to work via the command line, not from within FVWM. I have now created a "FvwmConsole" menu item from within FVWM (which I could also have accomplished via the command line by modfying my "menus-extra" file), and -- as you predicted -- I now have a screen in which to paste my configuation code. How very simple! Why didn't you say so in the first place!!! (Lame joke.)

Now I can proceed, and you can go to bed -- if you ever really do so!

Also re your comment "You shouldn't be cat'ing anything into anything," I use the "cat" command to read files without or prior to editing them., i.e., "cat (file-name)" | more.

Thanks ever so much. Jim
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum