.fvwm/config
changeset 496 b171f9bbc70f
parent 495 c922ed36372c
child 497 71ace7e991aa
equal deleted inserted replaced
495:c922ed36372c 496:b171f9bbc70f
     1 # -*- mode: fvwm; fill-column: 90 -*-
     1 # -*- mode: fvwm; fill-column: 90 -*-
     2 
     2 
     3 ################################################################
     3 ################################################################
     4 # Set paths.
     4 # Help on syntax.
     5 
       
     6 m4_define(`m4_IMGPATH', `$[FVWM_USERDIR]/images')m4_dnl
       
     7 m4_define(`m4_ICONPATH', `$[FVWM_USERDIR]/icons')m4_dnl
       
     8 
       
     9 ModulePath $[FVWM_USERDIR]:+
       
    10 ImagePath m4_ICONPATH;.xpm:m4_IMGPATH:+
       
    11 
       
    12 ################################################################
       
    13 # Startup functions.
       
    14 
       
    15 # Define places for autoloaded programs.
       
    16 # StartsOnPage [desk [x y]]
       
    17 Style "mc-main1"  StartsOnPage 0 1 0, SkipMapping
       
    18 Style "mc-main2"  StartsOnPage 0 2 0, SkipMapping
       
    19 Style "goldendict"        StartsOnPage 3 1 2, SkipMapping
       
    20 Style "XClock"  !Title, Sticky, StaysOnTop, !Iconifiable, FixedPosition, FixedSize, WindowListSkip, CirculateSkip
       
    21 
       
    22 # Run only om sturtup.
       
    23 DestroyFunc InitFunction
       
    24 AddToFunc InitFunction
       
    25 + I Exec  exec xterm -fn "-misc-fixed-medium-r-*-*-18-*-*-*-*-*-iso10646-1" \
       
    26                -name mc-main1 -geometry 136x42 -e bash -i -c "mc -x"
       
    27 + I Exec  exec xterm -fn "-misc-fixed-medium-r-*-*-18-*-*-*-*-*-iso10646-1" \
       
    28                -name mc-main2 -geometry 136x42 -e bash -i -c "mc -x"
       
    29 + I Exec  exec goldendict
       
    30 # Right offset: 80 from FvwmPager + 2*6 from border = 92.
       
    31 + I Exec  exec xclock -digit -update 1 -strftime '%F %T %a' -padding 2 -geometry 165x18-92+0 -face Monospace-9 -bg gray
       
    32 
       
    33 # Run after each restart.
       
    34 DestroyFunc RestartFunction
       
    35 AddToFunc RestartFunction
       
    36 
       
    37 # Run at sturtup and after each restart.
       
    38 # All fvwm modules exit after restart Fvwm, so you must put they there.
       
    39 DestroyFunc StartFunction
       
    40 AddToFunc StartFunction
       
    41 # + I Module FvwmDebug --xconsole
       
    42 # + I KillModule FvwmDebug
       
    43 # + I Module FvwmGtkDebug
       
    44 # + I Module FvwmConsole
       
    45 + I Module FvwmPager 0 4
       
    46 + I Module FvwmAuto 1 -menter enter_handler
       
    47 + I Module FvwmKbdd.pl
       
    48 # Add next to load desktop image (must be .xpm or .png)
       
    49 # + I Exec fvwm-root -r ~/tmp/MagicItemComp2_1280x1024.png
       
    50 
       
    51 ################################################################
       
    52 # Virtual Desktops.
       
    53 
       
    54 DesktopSize 3x3
       
    55 DesktopName 0 Main
       
    56 DesktopName 1 Net
       
    57 DesktopName 2 Work
       
    58 DesktopName 3 Media
       
    59 DesktopName 4 Games
       
    60 # Percentage of a page to scroll when the cursor hits the edge of a page.
       
    61 # With 0 0 I can't scroll to other page by hitting edge, but can move app to another page!
       
    62 # With 100 100 by hitting edge I move to next page.
       
    63 EdgeScroll 0 0
       
    64 # Tells how hard it should be to change the desktop viewport by moving the mouse over the
       
    65 # edge of the screen and how hard it should be to move a window over the edge of the screen.
       
    66 EdgeResistance 150  150
       
    67 # Width or height of the invisible window that fvwm creates on the edges of the  screen  that
       
    68 # are used for the edge scrolling feature.
       
    69 EdgeThickness 1
       
    70 
       
    71 ################################################################
       
    72 # Mouse and Focus Behavior.
       
    73 
       
    74 ClickTime 350
       
    75 MoveThreshold 3
       
    76 Style "*" SloppyFocus, MouseFocusClickRaises
       
    77 
       
    78 ################################################################
       
    79 # Program Styles.
       
    80 
       
    81 Style "*"          Icon app/x-32x32.xpm, \
       
    82                    MiniIcon app/x-flex-16x16.xpm
       
    83 Style "XTerm"      Icon app/terminal-16x16.xpm, \
       
    84                    MiniIcon app/terminal-16x16.xpm
       
    85 Style "rxvt"       Icon app/terminal-16x16.xpm, \
       
    86                    MiniIcon app/terminal-16x16.xpm
       
    87 Style "mc-*"       Icon app/mc-16x16.xpm, \
       
    88                    MiniIcon app/mc-16x16.xpm
       
    89 
       
    90 ################################################################
       
    91 # FvwmTaskBar.
       
    92 
       
    93 Style "FvwmTaskBar" NoTitle, !Handles, !Borders, Sticky, WindowListSkip, CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, !Iconifiable
       
    94 
       
    95 ################################################################
       
    96 # Screenshot Functions (uses ImageMagick).
       
    97 
       
    98 m4_define(`m4_SCREENSHOTPATH', `$[HOME]/.screenshot')m4_dnl
       
    99 m4_changequote(`<--', `-->')m4_dnl
       
   100 
       
   101 DestroyFunc FvwmWindowScreenshot
       
   102 AddToFunc   FvwmWindowScreenshot
       
   103 + I Exec import -window $[w.id] -quality 100 -silent \
       
   104          "m4_SCREENSHOTPATH/$[w.class]-`date +%F[%R]`.png"
       
   105 
       
   106 # Remember there is 5 seconds pause before screenshot makes!
       
   107 # For alternative screenshot command with delay you may use:  scrot -d <sec> <file>
       
   108 DestroyFunc FvwmDesktopScreenshot
       
   109 AddToFunc   FvwmDesktopScreenshot
       
   110 + I Exec import -window root -quality 100 -pause 5 -silent \
       
   111          "m4_SCREENSHOTPATH/Desktop-`date +%F-[%H:%M:%S]`.png"
       
   112 
       
   113 DestroyFunc FvwmScreenshot
       
   114 AddToFunc   FvwmScreenshot
       
   115 + I Exec import -quality 100 -silent \
       
   116          "m4_SCREENSHOTPATH/App-`date +%F-[%H:%M:%S]`.png"
       
   117 
       
   118 m4_changequote`'m4_dnl
       
   119 
       
   120 ################################################################
       
   121 # Basic Functions.
       
   122 
     5 
   123 # DestroyFunc FuncName
     6 # DestroyFunc FuncName
   124 # AddToFunc   FuncName
     7 # AddToFunc   FuncName
   125 # + I (Action to happen immediately)
     8 # + I (Action to happen immediately)
   126 # + C (Action to happen on a mouse 'click)
     9 # + C (Action to happen on a mouse 'click)
   127 # + D (Action to happen on a mouse 'double click')
    10 # + D (Action to happen on a mouse 'double click')
   128 # + H (Action to happen on a mouse 'hold')
    11 # + H (Action to happen on a mouse 'hold')
   129 # + M (Action to happen on a mouse 'motion')
    12 # + M (Action to happen on a mouse 'motion')
   130 
       
   131 DestroyFunc FvwmDeleteOrDestroy
       
   132 AddToFunc   FvwmDeleteOrDestroy
       
   133 + H Nop
       
   134 + M Nop
       
   135 + C Delete
       
   136 + D Destroy
       
   137 
       
   138 DestroyFunc FvwmIconifyOrShade
       
   139 AddToFunc   FvwmIconifyOrShade
       
   140 + C Iconify
       
   141 + D WindowShade
       
   142 
       
   143 DestroyFunc FvwmMaximize
       
   144 AddToFunc   FvwmMaximize
       
   145 + H Nop
       
   146 + M Nop
       
   147 + C Maximize $0 $1
       
   148 
       
   149 DestroyFunc FvwmMoveOrIconify
       
   150 AddToFunc   FvwmMoveOrIconify
       
   151 + I Raise
       
   152 + M Move
       
   153 + D Iconify
       
   154 
       
   155 ################################################################
       
   156 # Mouse binding.
       
   157 
    13 
   158 # Mouse [(window)] Button Context Modifiers Function
    14 # Mouse [(window)] Button Context Modifiers Function
   159 # Button
    15 # Button
   160 #   1 left
    16 #   1 left
   161 #   2 right
    17 #   2 right
   178 #   ’S’ for shift
    34 #   ’S’ for shift
   179 #   ’M’ for Meta
    35 #   ’M’ for Meta
   180 #   ’L’ for  Caps-Lock
    36 #   ’L’ for  Caps-Lock
   181 #   ’A’ for any modifier
    37 #   ’A’ for any modifier
   182 
    38 
       
    39 # Key [(window)] Keyname Context Modifiers Function
       
    40 # See Keyname on /usr/include/X11/keysymdef.h, without the XK_ prefix.
       
    41 
       
    42 ################################################################
       
    43 # Set paths.
       
    44 
       
    45 m4_define(`m4_IMGPATH', `$[FVWM_USERDIR]/images')m4_dnl
       
    46 m4_define(`m4_ICONPATH', `$[FVWM_USERDIR]/icons')m4_dnl
       
    47 
       
    48 ModulePath $[FVWM_USERDIR]:+
       
    49 ImagePath m4_ICONPATH;.xpm:m4_IMGPATH:+
       
    50 
       
    51 ################################################################
       
    52 # Startup functions.
       
    53 
       
    54 # Define places for autoloaded programs.
       
    55 # StartsOnPage [desk [x y]]
       
    56 Style "mc-main1"  StartsOnPage 0 1 0, SkipMapping
       
    57 Style "mc-main2"  StartsOnPage 0 2 0, SkipMapping
       
    58 Style "goldendict"        StartsOnPage 3 1 2, SkipMapping
       
    59 Style "XClock"  !Title, Sticky, StaysOnTop, !Iconifiable, FixedPosition, FixedSize, WindowListSkip, CirculateSkip
       
    60 
       
    61 # Run only om sturtup.
       
    62 DestroyFunc InitFunction
       
    63 AddToFunc InitFunction
       
    64 + I Exec  exec xterm -fn "-misc-fixed-medium-r-*-*-18-*-*-*-*-*-iso10646-1" \
       
    65                -name mc-main1 -geometry 136x42 -e bash -i -c "mc -x"
       
    66 + I Exec  exec xterm -fn "-misc-fixed-medium-r-*-*-18-*-*-*-*-*-iso10646-1" \
       
    67                -name mc-main2 -geometry 136x42 -e bash -i -c "mc -x"
       
    68 + I Exec  exec goldendict
       
    69 # Right offset: 80 from FvwmPager + 2*6 from border = 92.
       
    70 + I Exec  exec xclock -digit -update 1 -strftime '%F %T %a' -padding 2 -geometry 165x18-92+0 -face Monospace-9 -bg gray
       
    71 
       
    72 # Run after each restart.
       
    73 DestroyFunc RestartFunction
       
    74 AddToFunc RestartFunction
       
    75 
       
    76 # Run at sturtup and after each restart.
       
    77 # All fvwm modules exit after restart Fvwm, so you must put they there.
       
    78 DestroyFunc StartFunction
       
    79 AddToFunc StartFunction
       
    80 # + I Module FvwmDebug --xconsole
       
    81 # + I KillModule FvwmDebug
       
    82 # + I Module FvwmGtkDebug
       
    83 # + I Module FvwmConsole
       
    84 + I Module FvwmPager 0 4
       
    85 + I Module FvwmAuto 1 -menter enter_handler
       
    86 + I Module FvwmKbdd.pl
       
    87 # Add next to load desktop image (must be .xpm or .png)
       
    88 # + I Exec fvwm-root -r ~/tmp/MagicItemComp2_1280x1024.png
       
    89 
       
    90 ################################################################
       
    91 # Virtual Desktops.
       
    92 
       
    93 DesktopSize 3x3
       
    94 DesktopName 0 Main
       
    95 DesktopName 1 Net
       
    96 DesktopName 2 Work
       
    97 DesktopName 3 Media
       
    98 DesktopName 4 Games
       
    99 # Percentage of a page to scroll when the cursor hits the edge of a page.
       
   100 # With 0 0 I can't scroll to other page by hitting edge, but can move app to another page!
       
   101 # With 100 100 by hitting edge I move to next page.
       
   102 EdgeScroll 0 0
       
   103 # Tells how hard it should be to change the desktop viewport by moving the mouse over the
       
   104 # edge of the screen and how hard it should be to move a window over the edge of the screen.
       
   105 EdgeResistance 150  150
       
   106 # Width or height of the invisible window that fvwm creates on the edges of the  screen  that
       
   107 # are used for the edge scrolling feature.
       
   108 EdgeThickness 1
       
   109 
       
   110 ################################################################
       
   111 # Mouse and Focus Behavior.
       
   112 
       
   113 ClickTime 350
       
   114 MoveThreshold 3
       
   115 Style "*" SloppyFocus, MouseFocusClickRaises
       
   116 
       
   117 ################################################################
       
   118 # Program Styles.
       
   119 
       
   120 Style "*"          Icon app/x-32x32.xpm, \
       
   121                    MiniIcon app/x-flex-16x16.xpm
       
   122 Style "XTerm"      Icon app/terminal-16x16.xpm, \
       
   123                    MiniIcon app/terminal-16x16.xpm
       
   124 Style "rxvt"       Icon app/terminal-16x16.xpm, \
       
   125                    MiniIcon app/terminal-16x16.xpm
       
   126 Style "mc-*"       Icon app/mc-16x16.xpm, \
       
   127                    MiniIcon app/mc-16x16.xpm
       
   128 
       
   129 ################################################################
       
   130 # FvwmTaskBar.
       
   131 
       
   132 Style "FvwmTaskBar" NoTitle, !Handles, !Borders, Sticky, WindowListSkip, CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, !Iconifiable
       
   133 
       
   134 ################################################################
       
   135 # Screenshot Functions (uses ImageMagick).
       
   136 
       
   137 m4_define(`m4_SCREENSHOTPATH', `$[HOME]/.screenshot')m4_dnl
       
   138 m4_changequote(`<--', `-->')m4_dnl
       
   139 
       
   140 DestroyFunc FvwmWindowScreenshot
       
   141 AddToFunc   FvwmWindowScreenshot
       
   142 + I Exec import -window $[w.id] -quality 100 -silent \
       
   143          "m4_SCREENSHOTPATH/$[w.class]-`date +%F[%R]`.png"
       
   144 
       
   145 # Remember there is 5 seconds pause before screenshot makes!
       
   146 # For alternative screenshot command with delay you may use:  scrot -d <sec> <file>
       
   147 DestroyFunc FvwmDesktopScreenshot
       
   148 AddToFunc   FvwmDesktopScreenshot
       
   149 + I Exec import -window root -quality 100 -pause 5 -silent \
       
   150          "m4_SCREENSHOTPATH/Desktop-`date +%F-[%H:%M:%S]`.png"
       
   151 
       
   152 DestroyFunc FvwmScreenshot
       
   153 AddToFunc   FvwmScreenshot
       
   154 + I Exec import -quality 100 -silent \
       
   155          "m4_SCREENSHOTPATH/App-`date +%F-[%H:%M:%S]`.png"
       
   156 
       
   157 m4_changequote`'m4_dnl
       
   158 
       
   159 ################################################################
       
   160 # Basic Functions.
       
   161 
       
   162 DestroyFunc FvwmDeleteOrDestroy
       
   163 AddToFunc   FvwmDeleteOrDestroy
       
   164 + H Nop
       
   165 + M Nop
       
   166 + C Delete
       
   167 + D Destroy
       
   168 
       
   169 DestroyFunc FvwmIconifyOrShade
       
   170 AddToFunc   FvwmIconifyOrShade
       
   171 + C Iconify
       
   172 + D WindowShade
       
   173 
       
   174 DestroyFunc FvwmMaximize
       
   175 AddToFunc   FvwmMaximize
       
   176 + H Nop
       
   177 + M Nop
       
   178 + C Maximize $0 $1
       
   179 
       
   180 DestroyFunc FvwmMoveOrIconify
       
   181 AddToFunc   FvwmMoveOrIconify
       
   182 + I Raise
       
   183 + M Move
       
   184 + D Iconify
       
   185 
       
   186 ################################################################
       
   187 # Mouse binding.
       
   188 
   183 # Setup title-bar button actions.
   189 # Setup title-bar button actions.
   184 Mouse 1 1 A FvwmDeleteOrDestroy
   190 Mouse 1 1 A FvwmDeleteOrDestroy
   185 Mouse 1 3 A FvwmIconifyOrShade
   191 Mouse 1 3 A FvwmIconifyOrShade
   186 Mouse 1 5 A FvwmMaximize 100 100
   192 Mouse 1 5 A FvwmMaximize 100 100
   187 Mouse 2 5 A FvwmMaximize 100 0
   193 Mouse 2 5 A FvwmMaximize 100 0
   192 # except the title-bar buttons).
   198 # except the title-bar buttons).
   193 Mouse 3 FST A FvwmMoveOrIconify
   199 Mouse 3 FST A FvwmMoveOrIconify
   194 
   200 
   195 ################################################################
   201 ################################################################
   196 # Key binding.
   202 # Key binding.
   197 
       
   198 # Key [(window)] Keyname Context Modifiers Function
       
   199 # See Keyname on /usr/include/X11/keysymdef.h, without the XK_ prefix.
       
   200 
   203 
   201 # Popup MenuMyRoot menu.
   204 # Popup MenuMyRoot menu.
   202 Key F1 A M Menu MenuMyRoot Root c c
   205 Key F1 A M Menu MenuMyRoot Root c c
   203 Mouse 1 R A Menu MenuMyRoot Nop
   206 Mouse 1 R A Menu MenuMyRoot Nop
   204 
   207