Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
configuring FVWM
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sun May 03, 2015 1:55 pm    Post subject: configuring FVWM Reply with quote

Hi,

I have been using FVWM for a number of years ( without really changing its setup ) and I really appreciate its lean, efficient , nothing-but-WM approach.

However, I now need to transfer this to a new Gentoo and I cannot find out how/where the all the config files are so that I can reproduce the same setup.

Code:
 * installed packages
[I--] [  ] x11-themes/fvwm-crystal-3.0.6-r2 (0)
[I--] [  ] x11-themes/fvwm-themes-0.7.0 (0)
[I--] [  ] x11-themes/fvwm-themes-extra-0.7.0 (0)
[I--] [  ] x11-wm/fvwm-2.6.3 (0)


Also , rather unhelpfully, equery is not producing different output and not longer reports the two "themes" packages that are indeed installed.
Code:

[IP-] [  ] x11-wm/fvwm-2.6.5:0


The main thing I'm missing is scrolling desktop using the mouse wheel. This is something that I recall programming myself and adding to one of the configs.

FVWM is very flexible and powerful but has a painful learning curve and apparently only minimalistic on line resources.

Any ideas what files I need to copy across to the new system to keep the same functionality?

BTW, I'm mounting the same $HOME on both Gentoos so the /home/user/* is identical.

TIA, Gentree. 8)



[EDIT]

I've found the code in ~/.fvwm/themes/personal/bindings-extra but it does not seem to be happenning in the new installation.

Also, the pager seems to have been changed in the new version ( or I hacked it in the old one ).

Don't see why this is not working. :?

Code:


## Change Desktop by Scroll
DestroyFunc WheelScroll
AddToFunc WheelScroll I PipeRead 'case $0 in \
                up) test $[page.ny] -eq $$(($[desk.pagesy]-1)) -a $[page.nx] -lt $$(($[desk.pagesx]-1)) \
                        && echo GotoPage +1p 0 \
                        || echo GotoPage 0p +1p;; \
                down) test $[page.ny] -eq 0 -a $[page.nx] -gt 0 \
                        && echo GotoPage -1p $$(($[desk.pagesy]-1)) \
                        || echo GotoPage 0p -1p;; \
                esac'

_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Mon May 04, 2015 12:49 pm    Post subject: Reply with quote

You need to bind the mouse/wheel action to the function

Code:
Mouse 4     R   A   WheelScroll down
Mouse 5     R   A   WheelScroll up
Mouse (FvwmPager)   4   W   A   WheelScroll down
Mouse (FvwmPager)   5   W   A   WheelScroll up


Found the above in https://forums.gentoo.org/viewtopic-t-796070-start-0.html

I use fvwm too, it's amazing but one has to get under the hood to change the way it works.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Mon May 04, 2015 5:49 pm    Post subject: Reply with quote

thanks cboldt

You may notice that was my thread last time I went through this nightmare. The code I posted above comes from there but it no longer works.

I think default setup has been changed and the "desk" variable probably no longer exists. I'll have to dig.

FVWM infinitely flexible but also infinitely complicated to set up. You effectively need to learn a new programming language just to get it to work

This is not helped by the near total lack of support material anywhere on the web.

I find that a bit odd, there's usually someone doing stuff no matter how obscure it is. I guess the learning curve is so steep most people fall off.
:(
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Mon May 04, 2015 6:46 pm    Post subject: Reply with quote

$[desk.pagesx] and $[desk.pagesy] still exist. So do the other FVWM variables in the WheelScroll function. I haven't studied the logic in the WheelScroll function, but assuming it makes some sort of sense, the only way the function doesn't work is if the function isn't called - and that situation only arises if the Mouse binding doesn't work.

I didn't notice that you were the author of the previous! Oops!

Anyway, I'd be looking at the Mouse action bindings - probably write a simple function to debug it. My experience doesn't extend to acting on wheel activity (no wheel here), but my first step would be to make sure Mouse 4 and 5 do something.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2514

PostPosted: Mon May 04, 2015 6:58 pm    Post subject: Reply with quote

I've run into this problem too.

I used fvwm back in the early days (1.x, 2.0 back when it was called fvwm2) but have been away from it since then.

I'd love to try again but have no time to make a config from scratch, and have not yet found an acceptable file to use that actually works on a current version of fvwm.

Right now I'm stuck with xfce, which isn't too bad but not quite what I want.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Mon May 04, 2015 8:26 pm    Post subject: Reply with quote

Yes, I was using XFCE before I moved to FVWM. It was pretty good but it started getting a bit bloated with tuns of extra widgets and stuff, which was the antithesis of it's original appeal.

At some stage it got unusably slow on my deliberately basic NVidia graphics card ( the old ones with passive cooling ) and they were not at all interested in finding out why. So I set out in search of something more minimalist and got into FVWM.


I think it probably appeals to the same mentality as Gentoo does , so I would not be surprised if a fair number of the FVWM user base is here on Gentoo.

Maybe I should start a thread for us all to chip in links and configs to make a some kind of resource list.

Now I think about it, what I'm aiming to reproduce is probably something close to the way I had XFCE4 configured.

This one looks quite clean , but I have not got around to testing it yet.
http://pemarchandet.free.fr/fvwm.html

[EDIT] Well, that turns out to be a lot less clean that it appears in the screen-shot. Rather clunky on my screen and incomplete. Oh, well.
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86


Last edited by Gentree on Tue May 05, 2015 6:31 am; edited 1 time in total
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2509
Location: Canada

PostPosted: Mon May 04, 2015 8:56 pm    Post subject: Reply with quote

Gentree wrote:
thanks cboldt
I find that a bit odd, there's usually someone doing stuff no matter how obscure it is. I guess the learning curve is so steep most people fall off.
:(


It can not be that bad - back in the late 90-s it was a mainstream, after all, all my university computers were running it :) I have to dust of my old scripts, though they were pretty basic.
I still always have fvwm installed, though been a while I used it - except on headless server over vnc.
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Mon May 04, 2015 9:01 pm    Post subject: Reply with quote

That "Arctic" theme looks pretty sharp, especially considering that it's ten years old. I grabbed the fvwm.tbz2 file to check out how the theme and its parts are done, and want to "warn" anybody who might not know better, the archive will unpack into .fvwm, and puts all its configuration files into .fvwm/conf/ The archive contains other folder/directories that could clobber your existing config.
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Mon May 04, 2015 9:11 pm    Post subject: Reply with quote

I think learning curve is a part of it, but so is just the time aspect of it. It takes time to get the desktop to look and act the way you want it to, and it's considerably easier (even when you know how to use fvwm) to use some other WM that is "close enough."

I've stuck with fvwm just out of preserving work habits. I have four desktops, four windows each (in a 2x2), and about 20 apps (mostly terminals) are started when I start X. A few handy key-combos to navigate the WM (Ctl-Alt right left switches desktops, Ctl-Alt up down rotates around the windows), careful choice of apps in each desktop/window, and then the habits form.

Nothing fancy to look at, xplanet in the BG (clouds approximately up to date, random earth orientation each 15 or so minutes), three conky's, one for the local machine, one each for two others on the LAN; root-tail showing me incoming mail, auth.log, and iptables activity.

I bet I have a month full time into getting it setup - but most of that was 10 or so years ago. Who the heck is willing to put that much time into their desktop! No sane person, that's for sure!
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Tue May 05, 2015 6:42 am    Post subject: Reply with quote

A month I can believe. I seem to recall spending over a week just to get something basic configured.

thanks for the warning about the Arctic tarball, but I never untar blindly. I extract to a new directory first.

It was actually incomplete and a bit of a mess, relying on lots of stuff that was not in the archive.

What is really frustrating me is that I have a config I have been working with since 2009 and is fine, but it won't transfer across to my new Gentoo.

I must have made some changes that I can't find. :?
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Tue May 05, 2015 8:17 am    Post subject: Reply with quote

As my usage has evolved, I found it beneficial to have one config arrangement portable across multiple machines, so it's been fairly painless to export or adapt to new hardware. I make changes on one "master" machine, and the changes are propagated via rsync and a cron job. That's no help to your immediate problem, obviously.

Fvwm lends itself to "Rat's nest" configuration, with information and functions spread across many files. Just now reviewing my config (which sits on top of fvwm-themes) I see a function to disable mouse wheel. That got me to wonder if your situation might be related to that or something similar.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Tue May 05, 2015 8:46 am    Post subject: Reply with quote

yes, I've just found this as it happens.


Code:
diff -r /usr/share/fvwm/themes/default/settings/wheel/enabled /usr/share/fvwm_old/themes/default/settings/wheel/enabled
8,9c8,9
< Mouse 4 R   A Nop
< Mouse 5 R   A Nop
---
> #Mouse 4 R   A Nop
> #Mouse 5 R   A Nop


I recall that I started making changes down in /usr/share because everytime I changed something in ~/.fvwm/themes it seemed to get over-ridden. After wasting too much time battling with the documentation ( the longest man page in the history of the world ) it gave up and hacked the default profile in /usr/share.

I had a recollection of doing that but have been unable to find out what I did , so moved it all to fvwm_old and installed again. Now I can find the changes.

Effectively the mousewheel is "nopped" by default.

As you suggested the mouse was doing nothing. Thanks for your comments.

I now have the functionality I wanted ported over to the new Gentoo.

Do you know how this can be done cleanly under ~/.fvwm without getting blow-out every time I restart ?
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Thu May 21, 2015 10:08 pm    Post subject: Reply with quote

Preserving your settings depends on how you invoke fvwm. My arrangement is "on top" of fvwm-themes, so I stash all my stuff in ~/.fvwm/themes/personal.

Startup is via `startx`, with "fvwm-themes-start" being the command in .xinitrc.

Fvwm-themes does some thrashing and makes a long winded init script on the fly, chief among them being ~/.fvwm/themes/current-main/themes-rc-2. That fvwm script reads many other files into the setup, last among them will be any "startup" file you have stashed in ~/.fvwm/themes/personal.

My stash is broken into a few pieces, and by reading them from "~/.fvwm/themes/personal/startup," they get the last word.

Code:
DestroyFunc     InitFunction
AddToFunc       InitFunction
+ I Read $./applications
+ I Read $./bindings
+ I Read $./colorsets
+ I Read $./menus-extra
+ I Read $./styles
+ I Read $./title-bar/buttons
+ I Read $./modules/FvwmModules-Personal


Name of function gleaned from the fvwm man page ...

Quote:
Fvwm has three special functions for initialization: StartFunction, which is executed on startups and restarts; InitFunction and RestartFunction, which are executed during initialization and restarts (respectively) just after StartFunction.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Fri May 22, 2015 6:57 am    Post subject: Reply with quote

Thanks, that's very helpful.

I'd forgotten about .xinitrc , that is where I set my b/g image, one detail I had not fixed yet.

Code:

fvwm-root /boot/images/bg.png
#exec fvwm-themes-start
# vector fvwm into themes by Read .fvwm/themes-rc
exec fvwm


I use the interactive configuration to pick some features from e17, cde and default themes and skip the fvwm-themes-start thing.

I'll have a look at the way you've done it. I recall that last time I just gave up and hacked it because trying to plough through that man page was taking a massive investing in time that I did not have.

I've managed to reproduce the functionality that I had before but it would be good if it was done in a more structured and repeatable way.

Thanks for the tips.
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Fri May 22, 2015 10:29 am    Post subject: Reply with quote

`man fvwm` says the file that fvwm reads, if none is pointed to on the startup command line, is /.fvwm/config

Installing fvwm-themes doesn't molest that file (if it exists), but starting up with `fvwm-themes-start` bypasses that file.

At any rate, my strategy has been to collect my settings in files that won't be molested by fvwm-themes, with a 'startup' file that calls and reads my settings files, and calls and reads the commands that start programs on the desktops. I think I ended up with the filename ~/.fvwm/themes/personal/startup by figuring out or finding out what fvwm-themes was doing when it started up.

From my "fvwm personal" directory, `wc -l applications bindings colorsets globalfeel menus-extra startup styles` shows a total of 1622 lines, many of which are wholesale cribbed from elsewhere. I have a few hundred lines of module and FvwmScript coding too. Took a long time to get to this point, but maintenance is pretty easy now. Complicating things a little bit for me, I coded a single fvwm startup/config that would work across my desktop, and a couple laptops, each with different screen geometry - and part of my background is root-tail, but the files read on one machine may not exist on another, etc. That 1622 lines also has at least a few comment lines.

I don't mind sharing it, with the caveat that it's not designed to be portable to other people's systems.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Fri May 22, 2015 6:36 pm    Post subject: Reply with quote

It would be useful to have something to pick from. One thing I find very surprising is that there is so little out there in terms of examples, or any kind of web support worth speaking of.

I'd have thought that however obscure a WM is there'd be a little kernel of hardcore users somewhere.

:/
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Fri May 22, 2015 8:42 pm    Post subject: Reply with quote

I don't want to use a lot of space in "sharing" this, so some of what's here is truncated, but certainly enough to get a handle on how my fvwm startup is organized. One thing nice about fvwm is that the order of defining functions and bindings is unimportant - so, you'll see things appear, wonder "what is that?" and the answer comes later.

~/.fvwm/themes/personal/startup

Code:
ImagePath +:

*FvwmIdent: Font "xft:Comic Sans MS:pixelsize=10"
MenuStyle * Font "xft:Artsie:style=Regular"

##### Start These Applications
#################################################################

# Stuff to do at FVWM startup
# See InitFunction below

#####   Define "sticky" programs
#       Their nature can be determined by 'style' options

DestroyFunc     START_STICKY
AddToFunc       START_STICKY
+ I Function ROOT-TAIL
+ I Exec conky
+ I Test (EnvMatch host_name hypoid-2)  Exec ssh -Y hypoid conky -c .conkyrc-hypoid-2
+ I Test (EnvMatch host_name hypoid-2)  Exec ssh -Y involute conky -c .conkyrc-hypoid-2
+ I Module FvwmButtons LoadButtons
+ I SetEnv Sticky_Status ON

DestroyFunc     STOP_STICKY
AddToFunc       STOP_STICKY
+ I KillModule FvwmButtons LoadButtons
+ I Exec pkill root-tail
+ I Exec pkill conky
+ I Test (EnvMatch host_name hypoid-2)  Exec ssh -Y hypoid pkill -f conky.*hypoid-2
+ I Test (EnvMatch host_name hypoid-2)  Exec ssh -Y involute pkill -f conky.*hypoid-2
+ I SetEnv Sticky_Status OFF

DestroyFunc     TOGGLE_STICKY
AddToFunc       TOGGLE_STICKY
+ I Test   (EnvMatch Sticky_Status ON)  Function STOP_STICKY
+ I TestRc (NoMatch)                    Function START_STICKY

# [Similar set of START/STOP/TOGGLE for touchpad and micmute
#####   Start programs on desk 1   #####

DestroyFunc     START_DESK+1
AddToFunc       START_DESK+1
+ I Desk 0 1
+ I GotoPage 1 0
+ I Test (EnvMatch Screen_Size 1280x1024 EnvMatch mem_900+ yes) \
    Function SHELL-FTP
+ I GotoPage 1 1
+ I Function SHELLS-TERM-1
+ I GotoPage 0 0
+ I Test (EnvMatch mem_900+ yes EnvMatch host_name involute) \
    Function OPENOFFICE

#####   Start programs on desk 2   #####

DestroyFunc     START_DESK+2
AddToFunc       START_DESK+2
+ I Desk 0 2
+ I GotoPage 1 0
+ I Function SHELLS-TERM-2
+ I GotoPage 0 1
+ I Function LYNX-SUITE
+ I GotoPage 0 0
+ I Function PINEMAIL
+ I Test (EnvMatch Screen_Size 1280x1024 EnvMatch mem_900+ yes) \
    Function SHELL-2
+ I GotoPage 1 1
+ I Test (EnvMatch mem_900+ yes EnvMatch host_name involute) \
    Function SHELLS-ROOT
+ I Test (EnvMatch mem_900+ yes EnvMatch host_name hypoid-2) \
    Function SHELLS-ROOT

#####   Start programs on desk 3   #####

DestroyFunc     START_DESK+3
AddToFunc       START_DESK+3
+ I Desk 0 3
+ I GotoPage 0 1
+ I Test (EnvMatch host_name involute) \
    Function XAWTV
+ I GotoPage 0 0
+ I Function XPAT2
+ I GotoPage 1 0
+ I Test (X $[HOME]/bin/hurricane Envmatch mem_900+ yes) \
    Function HURRICANE
+ I GotoPage 1 1
+ I Function XMAHJONGG

#####   Start programs that will be iconic   #####
#       Their iconic nature may be established by 'style' options

DestroyFunc     START_ICONIC
AddToFunc       START_ICONIC
+ I Function IRC-ON
+ I Function PSI-ON
+ I Function PROCMAIL

#################################################################
### Now we start our programs
### - StartFunction runs on fvwm initiation and on restarts, then ..
### - InitFunction runs on fvwm initiation only
### - RestartFunction runs on restarts only
### - ExitFunction runs on exiting from fvwm
#################################################################

DestroyFunc     StartFunction
AddToFunc       StartFunction
+ I KillModule FvwmCommandS
+ I Module FvwmCommandS
+ I Exec xset r rate 200 15
+ I Exec xset dpms 1200 1200 0 +dpms

DestroyFunc     InitFunction
AddToFunc       InitFunction
+ I Read $./applications
+ I Read $./bindings
+ I Read $./colorsets
+ I Read $./menus-extra
+ I Read $./styles
+ I Read $./title-bar/buttons
+ I Read $./modules/FvwmModules-Personal

+ I Exec mouseclock -fg yellow3 -fn "-*-times-medium-r-*-*-12-*-*-*-*-*-*-*" -bd 0
+ I Test (X $[HOME]/bin/startxplanet-$[vp.width]) Exec startxplanet-$[vp.width]
+ I TestRc (NoMatch) Exec startxplanet

+ I Module FvwmButtons FvwmButtons-Pager
+ I Module FvwmButtons FvwmButtons-Bar
+ I Function START_STICKY       # Weather, Moon, etc.
+ I Function START_DESK+3       # Games and xawtv
+ I Function START_DESK+1       # WordPerfect & several term windows
+ I Function START_ICONIC       # Pop-up ICQ, IRC client, MP3 player
+ I Function START_DESK+2       # Online: lynx, pine, root windows

DestroyFunc     ExitFunction
AddToFunc       ExitFunction
+ I Exec pkill xplanet
+ I Exec pkill wpexc
+ I Exec pkill office


The "startup" file stitches most of the pieces together, with the pieces being scattered in "applications," "bindings," "colorsets," and so on; and runs the commands that populate my working environment. Before my A7N8X gave up the ghost, it opened all of that in about 20-30 seconds (just going from an impression in memory, have no recollection of timing it, because startup time wasn't important - uptime on months anyway)

~/.fvwm/themes/personal/applications

Code:
##### Functions to open applications and programs
#################################################################

SetEnv XTERM urxvt
SetEnv XTERM-CLASS URxvt

# ResizeMove parameters for Editor windows (documents) and Browsers
# Note WordPerfect Window has no Title Bar, so may look "too short"

SetEnv ED_RM_1024 "85 90 15p 2p"
SetEnv ED_RM_1280 "65 90 20  2p"
SetEnv ED_RM_1600 "65 90 20  2p"

SetEnv BR_RM_1024 "85 93 15p 5p"
SetEnv BR_RM_1280 "85 95  4  5p"
SetEnv BR_RM_1600 "85 90  4  5p"

SetEnv Screen_Size $[vp.width]x$[vp.height]
SetEnv vp_width $[vp.width]
PipeRead 'echo \
    SetEnv mem_total \
    `cat /proc/meminfo | grep MemTotal | cut -c18-21`'Mb
PipeRead 'echo \
    SetEnv mem_900+ \
    `[ $(cat /proc/meminfo | grep MemTotal | cut -c18-21) -gt 900 ] && echo yes`'
PipeRead 'echo SetEnv host_name `echo $HOSTNAME`'
PipeRead 'echo SetEnv INTERFACE `route -n | grep ^0.0.0.0 | cut -c73-`'

##### Variable Root-tail logs for hosts sharing a common "applications" file
############################################################################

SetEnv RT_FILES ""

Test (R /var/log/CLIENTS/evolute)       SetEnv RT_FILES "$[RT_FILES] /var/log/CLIENTS/evolute,orange4,"
Test (R /var/log/CLIENTS/hypoid-2)      SetEnv RT_FILES "$[RT_FILES] /var/log/CLIENTS/hypoid-2,orange4,"
Test (R /var/log/CLIENTS/hypoid)        SetEnv RT_FILES "$[RT_FILES] /var/log/CLIENTS/hypoid,orange4,"
Test (R /var/lib/games/xpat.log)        SetEnv RT_FILES "$[RT_FILES] /var/lib/games/xpat.log,green4,"
Test (R /var/log/iptables.log)          SetEnv RT_FILES "$[RT_FILES] /var/log/iptables.log,yellow4,"
Test (R /var/log/auth.log)              SetEnv RT_FILES "$[RT_FILES] /var/log/auth.log,red4,"
Test (R $[HOME]/.procmail/log)          SetEnv RT_FILES "$[RT_FILES] .procmail/log,tomato3,"
Test (R $[HOME]/.FVWM-errors)           SetEnv RT_FILES "$[RT_FILES] .FVWM-errors,red4,"

# urxvt -tint grows darker with smaller "greyXX" values
########################################################

# [skipping many program or program group definitions, the concept is repetitive
# Plenty of hard coding for terminal screen size, position, etc.

DestroyFunc     IRC-ON
AddToFunc       IRC-ON
+ I Test (EnvMatch Screen_Size 1024x768)  \
    Exec NOCOLOR=1 $[XTERM] -g 100x44-130+10 -name UBitchX
+ I Test (EnvMatch Screen_Size 1280x1024) \
    Exec NOCOLOR=1 $[XTERM] -g 100x53-130+10 -name UBitchX
+ I Test (EnvMatch Screen_Size 1600x900) \
    Exec NOCOLOR=1 $[XTERM] -g 100x53-130+10 -name UBitchX
# Does not appear during startup because it is Iconified by `style`
# + I All (BitchX) Iconify

DestroyFunc     LYNX-SUITE
AddToFunc       LYNX-SUITE
+ I Test (EnvMatch Screen_Size 1024x768)  \
    Exec $[XTERM] -name ULynx -g 100x52-200-50 -e attach lynx           # 1024x768
+ I Test (EnvMatch Screen_Size 1280x1024) \
    Exec $[XTERM] -name ULynx -g 120x65+350+85 -e attach lynx           # 1280x1024
+ I Test (EnvMatch Screen_Size 1600x900) \
    Exec $[XTERM] -name ULynx -g 110x59+520+10 -e attach lynx           # 1600x900
+ I Wait $[XTERM-CLASS]

DestroyFunc     MOZILLA
AddToFunc       MOZILLA
+ I Exec MOX_DISABLE_PANGO=1 firefox
# + I Wait Firefox*
+ I Wait Navigator
+ I Test (EnvMatch Screen_Size 1024x768)  \
    All (Navigator) ResizeMove $[BR_RM_1024]                            # 1024x768
+ I Test (EnvMatch Screen_Size 1280x1024) \
    All (Navigator) ResizeMove $[BR_RM_1280]                            # 1280x1024
+ I Test (EnvMatch Screen_Size 1600x900) \
    All (Navigator) ResizeMove $[BR_RM_1600]                            # 1600x900

DestroyFunc     ROOT-TAIL
AddToFunc       ROOT-TAIL
+ I Test (EnvMatch Screen_Size 1024x768)  \
    Exec root-tail --update -g 700x700+20-60 -fn fixed --noflicker --wordwrap $[RT_FILES]
+ I Test (EnvMatch Screen_Size 1280x1024) \
    Exec root-tail --update -g 980x900+20-60 -fn fixed --noflicker --wordwrap $[RT_FILES]
+ I Test (EnvMatch Screen_Size 1600x900) \
    Exec root-tail --update -g 1300x800+20-60 -fn fixed --noflicker --wordwrap $[RT_FILES]

DestroyFunc     SHELL-1
AddToFunc       SHELL-1
+ I Exec $[XTERM] -T Shell -g 108x62-200-80 -fn 6x10 -fg coral -cr salmon3
+ I Wait $[XTERM-CLASS]

DestroyFunc     SHELL-2
AddToFunc       SHELL-2
+ I Exec $[XTERM] -name UTerm2 -g 105x61+345+70
+ I Wait $[XTERM-CLASS]

DestroyFunc     SHELL-FTP
AddToFunc       SHELL-FTP
+ I Exec $[XTERM] -name Uftp -g 130x67+190+27
+ I Wait $[XTERM-CLASS]


Those `attach` commands are brief scripts here, that either create or attach to running sessions of screen. That's a subject of its own right, and outside of getting fvwm to predictably start, look and work the way you want. At any rate, the "applications" file has as many of these program definitions as makes sense for what you want to be able to start, either automatically or from a menu. One other tool I use is .Xdefaults, and "naming" of urxvt instances. Each desktop has a distinctive look, due to colors, images in the term windows, etc. Again, tons of hard coding (in .Xdefaults), and a little bit outside of making fvwm look like you want.

~/.fvwm/themes.personal/styles

Code:
BorderStyle InActive -- HiddenHandles Raised
BorderStyle Active -- HiddenHandles Raised NoInset
TitleStyle ActiveDown (Solid red -- flat)

Style *                 SloppyFocus, NoTitle, NoIcon, \
                        NoHandles, BorderWidth 5, \
                        NakedTransient, NoPPosition, \
                        FPClickRaisesFocused, FPPassRaiseClick

Style *Title*           Title

Style Acrobat           MiniIcon mini.pdf.xpm
Style Appointment       Sticky
Style aterm             MiniIcon mini.display.xpm
Style urxvt             MiniIcon mini.display.xpm
Style *aumix*           WindowListSkip, StartIconic, Sticky, MiniIcon mini.sound.xpm
Style *.pdf             MiniIcon mini.pdf.xpm
Style Aux*              MiniIcon mini.window.xpm
Style Bible             MiniIcon mini.book1.xpm
Style BitchX            Sticky, WindowListSkip, StartIconic, FocusFollowsMouse, MiniIcon mini.xbiff.xpm
Style UBitchX           Sticky, WindowListSkip, StartIconic, FocusFollowsMouse, MiniIcon mini.xbiff.xpm
Style Calc*             Sticky, MiniIcon mini.calc.xpm
Style Caption           WindowListSkip, MiniIcon mini.heart.xpm
Style ccdecode*         WindowListSkip

# and so on for 150 total lines.


~/.fvwm/themes/personal/bindings

Code:
DestroyFunc     Resize-and-Move
AddToFunc       Resize-and-Move
+ I Test (EnvMatch Screen_Size 1024x768)  ResizeMove $[ED_RM_1024]
+ I Test (EnvMatch Screen_Size 1280x1024) ResizeMove $[ED_RM_1280]
+ I Test (EnvMatch Screen_Size 1600x900)  ResizeMove $[ED_RM_1600]

DestroyFunc     Resize-Browser
AddToFunc       Resize-Browser
+ I Test (EnvMatch Screen_Size 1024x768)  ResizeMove $[BR_RM_1024]
+ I Test (EnvMatch Screen_Size 1280x1024) ResizeMove $[BR_RM_1280]
+ I Test (EnvMatch Screen_Size 1600x900)  ResizeMove $[BR_RM_1600]

DestroyFunc     START_TVSOUND
AddToFunc       START_TVSOUND
+ I Exec aplay -f dat < /dev/video24
+ I SetEnv TVSound_Status ON

DestroyFunc     STOP_TVSOUND
AddToFunc       STOP_TVSOUND
+ I Exec kill `lsof -t /dev/video24`
+ I SetEnv TVSound_Status OFF

DestroyFunc     TOGGLE_TVSOUND
AddToFunc       TOGGLE_TVSOUND
+ I Test (EnvMatch TVSound_Status ON) Function STOP_TVSOUND
+ I TestRc (NoMatch) Function START_TVSOUND

DestroyFunc     SETTO_MAIL
AddToFunc       SETTO_MAIL
+ I Current SetEnv MAIL_WINDOW $[w.id]

DestroyFunc     WARPTO_MAIL
AddToFunc       WARPTO_MAIL
# + I Test (!EnvIsSet MAIL_WINDOW) Current SetEnv MAIL_WINDOW $[w.id]
# + I WindowID $[MAIL_WINDOW] WarpToWindow 50 50
+ I Next (UMail) WarpToWindow 50 50

# [snippage]

# press Ctrl-Alt arrow anywhere, and scroll by one page
Key Left        A       CM      Desk -1 0 0 3
Key XF86Back    A       CM      Desk -1 0 0 3
Key Right       A       CM      Desk +1 0 0 3
Key XF86Forward A       CM      Desk +1 0 0 3
Key Up          A       CM      Scroll +0 -100000
Key Down        A       CM      Scroll +0 +100000

# go to desk, Ctrl+Alt+N
Key 1           A       CM      GotoDesk 0 0
Key 2           A       CM      GotoDesk 0 1
Key 3           A       CM      GotoDesk 0 2
Key 4           A       CM      GotoDesk 0 3
Key 0           A       CM      GotoDeskAndPage prev

# [snippage]

Key Escape      A       CSM     Quit
Key Return      FSTW    S       RaiseLower
Key Down        FSTW    M       RaiseLower
Key Up          FSTW    M       RaiseLower

Key space       A       CM      WindowList OnlySkipList, Alphabetic, NoGeometry
Key space       A       C       WindowList Alphabetic, NoGeometry
Key space       A       M       WindowList OnlyIcons, Sticky, OnTop, NoGeometry

Key a           A       CM      Popup "MenuFvwmPersonal"
Key c           A       CM      Exec xcalc -rpn
Key c           A       CSM     Function TOGGLE_STICKY
Key f           A       CM      Function FAX-RECEIVE
Key h           W       CM      Iconify
Key i           A       CM      Module FvwmIdent
Key j           A       CM      All (UProcmail) Iconify
Key m           FSTW    CM      Move
Key n           W       CM      Function Resize-and-Move
Key n           W       SM      Function Resize-Browser
Key p           A       CM      All (Psi*) Iconify
Key q           A       CM      Exec amixer -q set PCM toggle
Key r           A       CM      All (UBitchX) Iconify
Key r           A       CSM     Function SHELL-ROOT
Key s           A       CSM     Function SHELL-1
Key s           A       CM      All (UProcmail) Iconify
Key w           FST     CM      Popup "MenuFvwmWindowOps"
Key z           A       CM      Popup "MenuFvwmRoot"

Key Super_L     A       N       Menu MenuFvwmPersonal
Key Super_L     A       S       Function SHELL-1
Key Super_L     A       CS      Quit
Key Super_R     A       A       Menu MenuFvwmRoot
Key Menu        A       N       Menu MenuFvwmRoot
Key Menu        A       S       Function SHELL-1

# [more snippage - definitions for special keys on laptops, Logitech keyboard, etc. ]

##### Set Mouse Bindings
#################################################################
#     Button    Context Modifi  Function
Mouse 1         R       N       Menu MenuFvwmPersonal Nop
Mouse 2         R       N       WindowList Alphabetic, NoGeometry
Mouse 3         R       N       Menu MenuFvwmRoot Nop

Mouse 1         S       N       Function "Move-or-Raise"
Mouse 1         F       N       Function "Resize-or-Raise"

Mouse 2         FST     A       Menu "MenuFvwmWindowOps" Nop
Mouse 2         FST     N       WindowShade
Mouse 3         FST     N       Function "Resize-or-Raise"

Mouse 2         W       S       WindowShade
Mouse 3         W       S       Iconify


##### Set Scroll Behavior
#################################################################
EdgeScroll              100 100
EdgeResistance          1000
Style * EdgeMoveDelay   600
Style * EdgeMoveResistance 0
EdgeThickness           1
Emulate fvwm


So, that's the bulk of it. There is also menus-extra, which is short and I think simple enough you can figure it out, and colorsets, which is really messy. I cribbed from "themes," and hardcoded what I didn't want to lose, along with a few notes so I didn't have to revisit the fvwm man page for color stuff.

My setup has about 500 lines of FvwmModule and FvwmScript for a couple screen decorations. The setup uses a few bash aliases for making changes, or refreshing my memory how things were coded.

Code:
# Aliases relating to FVWM and its settings
# =========================================
alias cda='cd ~/.fvwm/themes/personal'
alias keys='$EDITOR ~/.fvwm/themes/personal/bindings;FvwmCommand "Read /home/cboldt/.fvwm/themes/personal/bindings"'
alias mod='cd ~/.fvwm/themes/personal/modules'
alias cfv=FvwmCommand
alias lfv='$PAGER ~/.fvwm/themes/personal/startup ~/.fvwm/themes/personal/applications'
alias qfv='$EDITOR ~/.fvwm/themes/personal/startup ~/.fvwm/themes/personal/applications'
alias startup='$EDITOR ~/.fvwm/themes/personal/startup ~/.fvwm/themes/personal/applications'
alias styles='$EDITOR ~/.fvwm/themes/personal/styles'
alias bindings='$EDITOR ~/.fvwm/themes/personal/bindings;FvwmCommand "Read /home/cboldt/.fvwm/themes/personal/bindings"'
alias hid='cfv "windowlist onlylistskip"'


Well, that is plenty long-winded, not as bas as the fvwm man page, but enough to clearly convey how my WM is organized. Feel free to adopt the techniques, ask questions, criticize, suggest improvements, and so forth.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sat May 23, 2015 6:04 am    Post subject: Reply with quote

many thanks. I'll take time to trawl though all that later. It's going to take time to digest.

It should help improve the rather minimalist I have now. I like minimalist desktops but a couple of buttons for most frequent things like email client and browser would be ergonomically useful.

I'll post if I get stuck but that looks pretty explicit.

A7N8X is a great mobo. I have two of these Nvidia dual channel Athlon boards, the other is ABIT AN7. The A7N8X is out of service now due it screwing it's own BIOS. I had to interrupt the boot a few of times due to a broken fan. I think on the third try it tries to reprogram itself to default config At that stage I had my head under the bench and did not see the warning on the screen.

After that happens, it's completely dead and you don't even get a blink from the BIOS. Of course this occurred at the worst possible moment when I was in a rush to get something out.

I need to send it off to get it re-flashed.

I suspect a huge number of perfectly good systems end up at the tip because of this kind of thing. They look completely stuffed.
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Sat May 23, 2015 10:32 am    Post subject: Reply with quote

Here's a tip for playing around - use FvwmConsole.

Code:
DestroyFunc     FVWM-CONSOLE
AddToFunc       FVWM-CONSOLE
+ I Module FvwmConsole -terminal $[XTERM] -g 100x10+2+2 -fn artsie2 -fg violet


With one of those open, you can drop in code, try it, modify the code, try again, etc. That's great for FvwmButtons work, so many details to get right.

Code:
# ===============================================================
# Playground

KillModule  FvwmButtons FvwmButtons-Tester
DestroyModuleConfig FvwmButtons-Tester: *
*FvwmButtons-Tester: Geometry +10+200
*FvwmButtons-Tester: Rows 1
*FvwmButtons-Tester: (Size 90 25, Padding 2 0, Swallow FvwmClock \
        'FvwmScript themes/personal/modules/FvwmClock')

# Module FvwmButtons FvwmButtons-Tester

KillModule  FvwmButtons FvwmButtons-Tester
DestroyModuleConfig FvwmButtons-Tester: *


The second pair of KillModule/DestroyModule is there just to allow this section of code to live in there, without commenting out all of the lines. when debugging, you'd only cut and paste 8 lines, one of those being empty.

Here is a code snippet that creates 10 launcher buttons. On my system, those 10 are hidden under a single button. Again, tons of hard coding ...

Code:
KillModule FvwmButtons FvwmButtons-Apps
DestroyModuleConfig FvwmButtons-Apps: *

*FvwmButtons-Apps: Columns 2
*FvwmButtons-Apps: ButtonGeometry 20x20
*FvwmButtons-Apps: Colorset $[cs_module_gradient1]
*FvwmButtons-Apps: Frame 1
*FvwmButtons-Apps: Geometry +5000+5000

*FvwmButtons-Apps: (Icon 16x16/file-manager.xpm, \
        Action(Mouse 1) 'Exec exec $[XTERM] -T MC-Title -e mc', \
        Action(Mouse 2) 'Exec exec $[XTERM] -e mc', \
        Action(Mouse 3) 'Exec exec $[XTERM] -e mc')
*FvwmButtons-Apps: (Icon 16x16/terminal.xpm, \
        Action(Mouse 1) 'Exec exec  $[XTERM]', \
        Action(Mouse 2) 'Exec exec  $[XTERM] +sb -C', \
        Action(Mouse 3) 'Exec exec  $[XTERM] -e ssh cboldt.is-a-geek.net')
*FvwmButtons-Apps: (Icon 16x16/editor.xpm, \
        Action(Mouse 1) 'Exec exec  $[XTERM] -e nano', \
        Action(Mouse 2) 'Exec exec emacs', \
        Action(Mouse 3) 'Exec exec  $[XTERM] -e hexcurse')
*FvwmButtons-Apps: (Icon 16x16/ghostview.xpm, \
        Action(Mouse 1) 'Exec exec gv', \
        Action(Mouse 2) 'Exec exec gv', \
        Action(Mouse 3) 'Exec exec acroread')
*FvwmButtons-Apps: (Icon 16x16/image-viewer.xpm, \
        Action(Mouse 1) 'Exec exec qiv', \
        Action(Mouse 2) 'Exec exec display', \
        Action(Mouse 3) 'Exec exec xview')
*FvwmButtons-Apps: (Icon 16x16/image-processor.xpm, \
        Action(Mouse 1) 'Exec exec display', \
        Action(Mouse 2) 'Exec exec bitmap', \
        Action(Mouse 3) 'Exec exec display')
*FvwmButtons-Apps: (Icon 16x16/monitoring.xpm, \
        Action(Mouse 1) 'Exec exec  $[XTERM] -e top', \
        Action(Mouse 2) 'Exec exec  $[XTERM] -e top', \
        Action(Mouse 3) 'Exec exec  $[XTERM] -e top')
*FvwmButtons-Apps: (Icon 16x16/help.xpm, \
        Action(Mouse 1) 'Exec exec xman', \
        Action(Mouse 2) 'Exec exec xman', \
        Action(Mouse 3) 'Exec exec xman')
*FvwmButtons-Apps: (Icon 16x16/calculator.xpm, \
        Action(Mouse 1) 'Exec exec xcalc -rpn', \
        Action(Mouse 2) 'Exec exec xcalc', \
        Action(Mouse 3) 'Exec exec xcalc')
*FvwmButtons-Apps: (Icon 16x16/www.xpm, \
        Action(Mouse 1) 'Exec exec  $[XTERM] -T Lynx-Title -e lynx', \
        Action(Mouse 2) 'Function MOZILLA', \
        Action(Mouse 3) 'Exec exec  $[XTERM] -T Lynx-Title -e lynx')
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Sat May 23, 2015 10:40 am    Post subject: Reply with quote

My A7N8X probably just needs a set of caps, and it'd be good to go. I think it was a bout 4 years ago it gave up. Some time before that, we had another desktop have a MoBo go bad, that had a K-8 chip on it, so I replaced that system with something relatively current, hijacked her K-8 and bought a $30 MoBo to replace the A7N8X (which is local photo/music/file server). Decided just a few months ago to update, so the server now has a AM2+ board and AM2 chip. Gigabyte F2A88XM-D3H and "Trinity" chip. Few year old technology, still a big boost for me. MoBo, CPU, and 8G of RAM for $140.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
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