Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
X

Journal shamino0's Journal: .fvwm2rc for a (more or less) MWM-like look-and-feel

ImagePath $HOME/images:/usr/share/icons

EdgeResistance 250 100
EdgeScroll 100 100
ClickTime 250

# make sure these fonts exist on your system:
WindowFont -adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1
IconFont -adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1

HilightColor black #0b0
DeskTopSize 1x1
ColormapFocus FollowsMouse
Emulate MWM

TitleStyle ActiveUp   (CGradient 20 #fff #0b0 -- Raised) \
           ActiveDown (CGradient 20 #fff #0b0 -- Raised) \
           Inactive   (CGradient 20 #fff #b00 -- Raised)
MenuStyle "*" Foreground black, Background grey70, Greyed grey40, MWM
MenuStyle "*" Font -adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1
MenuStyle "*" HilightBack grey85, ActiveFore red

# default Styles:
Style "*" BorderWidth 6, HandleWidth 6
Style "*" Icon unknown1.xpm, Color black/#b00
Style "*" MWMButtons, MWMBorder, MWMFunctions, MWMDecor, HintOverride
Style "*" DecorateTransient, NoPPosition
Style "*" IconBox 0 0 -0 -0, IconFill left bottom
Style "*" SloppyFocus
Style "*" RandomPlacement, SmartPlacement

# Styles for various Fvwm modules:
Style "Fvwm*" NoTitle, Sticky, WindowListSkip
Style "Fvwm*" BorderWidth 2, CirculateSkipIcon, CirculateSkip

# Styles for your common terminal emulator programs:
Style "XTerm" Icon xterm.xpm

# Styles for various common programs:
Style "*lock" NoTitle, NoHandles, Sticky, WindowListSkip
Style "xbiff" NoTitle, Sticky, WindowListSkip
Style "xcalc" Icon xcalc.xpm, NoButton 2,RandomPlacement
Style "xmh"   Icon mail1.xpm, NoIconTitle,StickyIcon
Style "xmh"   RandomPlacement, NoButton 2
Style "xman"  Icon xman.xpm, RandomPlacement
Style "xmag"  Icon mag_glass.xpm, RandomPlacement

# some simple default key bindings:
Key Next  A SCM  Next [*] Focus
Key Prior A SCM  Prev [*] Focus

# some simple default mouse bindings:
#   for the root window:
Mouse 1 R A Menu RootMenu Nop
Mouse 2 R A WindowList
Mouse 3 R A Menu Window-Ops Nop

#   for the title bar buttons:
Mouse 0 1 A Menu Window-Ops2 Close
Mouse 0 2 A Maximize-Func
Mouse 0 4 A Iconify

#   for other parts of the window/borders/icons:
Mouse 1 FS   A  Resize-or-Raise
Mouse 1 T    A  Move-or-Raise-or-Maximize
Mouse 1 I    A  Move-or-Iconify
Mouse 2 I    A  Iconify
Mouse 2 FST  A  Menu Window-Ops2 Nop
Mouse 3 TSIF A  RaiseLower

##################### Initialization Functions #####################
AddToFunc InitFunction    "I" exec xsetroot -solid '#7af'

AddToFunc RestartFunction "I" exec xsetroot -solid '#7af'

######################## Menus ###################
AddToMenu RootMenu "Root Menu"        Title
+                  "XTerm"            Exec exec xterm
+                  ""                 Nop
+                  "Programs"         Popup Red_Hat_Linux
+                  "Utilities"        Popup Utilities
+                  ""                 Nop
+                  "Refresh Screen"   Refresh
+                  "Recapture Screen" Recapture
+                  ""                 Nop
+                  "Exit Fvwm"        Popup Quit-Verify

AddToMenu Red_Hat_Linux "Programs" Title
PipeRead "wmconfig --output fvwm2"

AddToMenu Utilities "Utilities"  Title
+                   "Top"        Exec exec xterm -T Top -n Top -e top
+                   "Calculator" Exec exec xcalc
+                   "Xman"       Exec exec xman
+                   "Xmag"       Exec exec xmag
+                   "Editres"    Exec exec editres
+                   ""           Nop
+                   "Emacs"      Exec exec emacs
+                   "Mail"       MailFunction xmh "-font fixed"
+                   ""           Nop
+                   "XLock"      Exec exec xlock -mode random
+                   ""                 Nop
+                   "Reset X defaults" Exec xrdb -load $HOME/.Xdefaults

AddToMenu Window-Ops "Window Ops"     Title
+                    "Move"           Move
+                    "Resize"         Resize
+                    "Raise"          Raise
+                    "Lower"          Lower
+                    "(De)Iconify"    Iconify
+                    "(Un)Stick"      Stick
+                    "(Un)Maximize"   Maximize
+                    ""               Nop
+                    "Delete"         Delete
+                    "Close"          Close
+                    "Destroy"        Destroy
+                    ""               Nop
+                    "Refresh Window" RefreshWindow

AddToMenu Window-Ops2 "&Move"         Move
+                     "&Resize"       Resize
+                     "R&aise"        Raise
+                     "&Lower"        Lower
+                     "(De)&Iconify"  Iconify
+                     "(Un)&Stick"    Stick
+                     "(Un)Ma&ximize" Maximize
+                     ""              Nop
+                     "&Delete"       Delete
+                     "&Close"        Close
+                     "Destroy"       Destroy
+                     ""              Nop
+                     "ScrollBar"     Module FvwmScroll 2 2
+                     "Print"         PrintFunction
+                     "Print Reverse" PrintReverseFunction

AddToMenu Quit-Verify "Quit Fvwm2"    Quit
+                     "Restart Fvwm2" Restart fvwm2

######################## Sample Functions ##########################

AddToFunc MailFunction "I" Next [$0] Iconify -1
+                      "I" Next [$0] Focus
+                      "I" None [$0] Exec $0 $1

AddToFunc Move-or-Raise "I" Raise
+                       "M" Move
+                       "D" Lower

AddtoFunc Move-or-Raise-or-Maximize "I" Raise
+                                   "M" Move
+                                   "D" Maximize 100 100

AddToFunc Move-or-Raise2 "M" Raise
+                        "M" Move
+                        "D" Lower

AddToFunc Maximize-Func "C" Maximize 0 100
+                       "D" Maximize 100 100

AddToFunc Move-or-Iconify "I" Raise
+                         "M" Move
+                         "D" Iconify

AddToFunc Resize-or-Raise "I" Raise
+                         "M" Resize
+                         "D" Lower

AddToFunc Resize-or-Raise2 "M" Raise
+                          "M" Resize
+                          "D" Lower

AddToFunc PrintFunction "I" Raise
+                       "I" Exec xdpr -id $w

AddToFunc PrintReverseFunction "I" Raise
+                              "I" Exec xdpr 1/2 -h -rv -id $w

AddToFunc Iconify-and-Raise "I" Iconify
+                           "I" Raise

# RLOGIN machine fg bg
AddToFunc RLOGIN "I" Exec xterm -fg $1 -bg $2 -e rlogin $0 -8

# TELNET machine fg bg
AddToFunc TELNET "I" Exec xterm -fg $1 -bg $2 -e telnet $0

AddToFunc FocusAndWarp "I" Focus
+                      "I" WarpToWindow 2p 2p

AddToFunc DeiconifyFocusAndWarp "I" Iconify -1
+                               "I" FocusAndWarp

AddToFunc ChangeDefaultFocus "I" Style "*" $0
+                            "I" Recapture

It is easier to write an incorrect program than understand a correct one.

Working...