~/.fvwm/.fvwm2rc

ImagePath +:/usr/share/icons:/usr/share/pixmaps:/usr/share/icons/hicolor/48x48/apps:/usr/local/share/fvwm/icons:$HOME/.fvwm/icons
EdgeResistance 250 100
EdgeScroll 100 100
EdgeThickness 10
ColormapFocus FollowsMouse
ClickTime 750
DeskTopSize 2x2
#忽略数字锁定键
IgnoreModifiers L25

# default Styles:
Style * BorderWidth 5, HandleWidth 5, DepressableBorder
Style * Icon kcmkwm.png
Style * MWMFunctions, MWMDecor, MWMButtons, HintOverride
Style * DecorateTransient, NoPPosition
Style * SloppyFocus, MouseFocusClickRaises
Style * SmartPlacement
Style * Font  -*-simsun-medium-r-*-*-14-*-*-*-*-*-*-*
Style * IconFont  -*-simsun-medium-r-*-*-12-*-*-*-*-*-*-*
Style * HilightFore black, HilightBack gainsboro
Style * IconBox 360x200+1-1, IconFill left bottom

Style * WindowShadeShrinks, WindowShadeSteps 100

TitleStyle height 22
AddTitleStyle ActiveDown VGradient 8 gold black

MenuStyle * MWM
MenuStyle * PopupDelayed, PopupDelay 160, Animation, TitleWarp
MenuStyle * Foreground gold, Background gray40
MenuStyle * ActiveFore White
MenuStyle * Font  -*-simsun-medium-r-*-*-14-*-*-*-*-*-*-*
MenuStyle * MenuFace VGradient 64 darkgray MidnightBlue
#MenuStyle * MenuFace TiledPixmap weird10dark.xpm

ButtonStyle All -- UseTitleStyle
ButtonStyle All ActiveDown VGradient 8 palevioletred black

ButtonStyle 1 Vector 7 
  65x15@0 25x55@1 45x55@0 35x85@1 75x45@0 55x45@1 65x15@0
ButtonStyle 6 16 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1

CursorStyle ROOT 58
CursorStyle TITLE 62
CursorStyle STROKE 86


# Styles for various Fvwm modules:
Style "Fvwm*"       Layer 5,  NoTitle,  Sticky, WindowListSkip
Style "Fvwm*"       BorderWidth 2, CirculateSkipIcon, CirculateSkip
Style "FvwmPager"   StaysOnTop
Style "FvwmBanner"  StaysOnTop
Style "FvwmButtons" Icon toolbox.xpm, NeverFocus
Style "FvwmConsole" SloppyFocus

# Styles for your common terminal emulator programs:
Style "xterm"       Icon /usr/share/icons/Bluecurve/48x48/apps/gnome-term-tiger.png, SloppyFocus
Style "rxvt"        NoTitle, Icon /usr/share/icons/Bluecurve/48x48/apps/gnome-term-linux.png
Style "gv"	    ClickToFocus
Style "mozilla"	    RandomPlacement, SloppyFocus
#Style "Allegro*"    Layer 5 
Style "NoResource" NoTitle BorderWidth 0, HandleWidth 0
Style "xdaliclock" NoTitle, NoHandles, Sticky, WindowListSkip, ClickToFocus, Layer 6
Style "MPlayer" NoTitle, Layer 7
Style "RealPlayer" Layer 7
Style "XSIM"	    Layer 7, NoTitle, HandleWidth 1, Sticky, WindowListSkip
Style "emacs"	    Icon gnu-animal.xpm
Style "gv"	    Icon gv.xpm
Style "Xdvi help"	NoTitle
Style "AcroRead"	VariablePosition, VariableUSPosition
Style * RaiseTransient LowerTransient StackTransientParent
#Style * NoActiveIconOverride
Style "Oracle VM VirtualBox*" MoveToPage 2

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


#Read fvwm.strokes
# some simple default key bindings:
#Key Tab A M -
Key Next         A       SCM     Next [*] Focus
Key Prior        A       SCM     Prev [*] Focus

#在不同的桌面间移动
Key F1 A M  MoveToDesk 0 0 
Key F2 A M  MoveToDesk 0 1
Key F3 A M  MoveToDesk 0 2
Key F4 A M  MoveToDesk 0 3

#Key F1 A M GotoDesk -1
#Key F2 A M GotoDesk 1
#用于实现ctrl+alt+a截屏
#Key A  A CM Exec exec gnome-screenshot -a
Key A  A CM Exec exec ~/scripts/screenshot.sh

#用于实现Win+D
#Key D A 4 All(.*) Iconify True
Key D A 4 All (AcceptsFocus CurrentPage !Iconic !Shaded, !FvwmTaskBar, !FvwmButtons, !xdaliclock)Iconify 

#Mouse 1 A M MoveToDesk 1 0
#Mouse 3 A M MoveToDesk 0
#Mouse 1 A M MoveToDesk 1

Mouse 3 A M Iconify True
Mouse 1 A M Iconify False



Key F3 M A Module FvwmConsole -terminal rxvt -geometry 45x5-0+0 -bg gold -fg midnightblue -fn "-adobe-courier-medium-r-*-*-14-*-*-*-*-*-*-*"
Key F5 A C Exec exec import -window root shot.png
Key F11 A C Exec xscreensaver-command -lock

# some simple default mouse bindings:
Mouse 1	R   	A       Menu RootMenu Nop
Mouse 3	R   	A       Menu AssistantMenu Nop
Mouse 2	R    	A      	Menu ProgramsMenu Nop

Mouse 3 WI	SC	CloseOrNot
Mouse 3	A   	MC      Menu RootMenu Nop
Mouse 3 A	S	Move

DestroyFunc CloseOrNot
AddToFunc CloseOrNot
+ C Silent Close
+ M Nop

#   for the title bar buttons:
Mouse 1	4    	A     	Iconify
Mouse 1 6	A	Close
Mouse 3	2    	A     	Maximize-Func2

#   for other parts of the window/borders/icons:
Mouse 1	F	A	Resize-or-Raise
Mouse 1	TS	A	Move-or-Raise
Mouse 1	I	A	Move-or-Iconify

######################## Initialization Functions ############################
DestroyFunc StartFunction
AddToFunc StartFunction   	
+ I Module FvwmButtons MainPanel
#+ I Module FvwmAuto 500 Raise Nop
+ I Module FvwmAnimate
+ I Module FvwmTaskBar
+ I Module FvwmPager 0 3
+ I Exec exec xdaliclock -transparent -geometry +842+0 -fg green
+ I Exec exec xloadimage -onroot -fullscreen ~/.fvwm/icons/desktop1.jpg 

+ I Exec exec xsim
+ I Exec exec naultilus.sh
#启动gnome菜单
#+ I Exec exec gnome-panel
#启动mail提醒
#+ I Exec exec mail-notification --sm-disable
#启动网络配置
+ I Exec exec ~/scripts/network.sh
#启动fetchmail
+ I Exec exec ~/scripts/fetchmail.sh

DestroyFunc InitFunction
AddToFunc InitFunction 	  
+ I Exec exec xscreensaver -no-splash

DestroyFunc ExitFunction
AddToFunc ExitFunction
+ I All (xdaliclock) Close
+ I All (xscreensaver) Close
+ I All (xsim) Close
+ I All (naultilus) Close
#+ I All (gnome-panel) Close
#+ I All (mail-notification) Close
+ I All (~/scripts/network.sh) Close
+ I All (~/scripts/fetchmail.sh) Close

######################## Menus ###################

DestroyMenu RootMenu
AddToMenu RootMenu	"Root Menu"	Title
+			"&xterm%mini.display.xpm%"	Exec exec gnome-terminal
+			"&Rxvt%mini.monitor.xpm%"	Exec exec rxvt
+			"&Big Rxvt"	Exec exec rxvt -geometry  78x43
+			""		Nop
+                       "&Programs"      Popup ProgramsMenu
+			""	        Nop
+                       "&System"        Popup SystemMenu
+			""		Nop
+                       "&Utilities"     Popup UtilitiesMenu
+			""		Nop
+                       "&File"          Popup FileMenu
+			""		Nop

+                       "Re&fresh Screen"   Refresh
+                       "Re&capture Screen" Recapture
+			""		Nop
+                       "&Lock"         Exec exec xscreensaver-command -lock
+			"&Exit Fvwm%mini.exit.xpm%"	Popup Quit-Verify

DestroyMenu ProgramsMenu
AddToMenu "ProgramsMenu" "Programs" Title
+			"&VIM"  Exec exec gvim
+			"文件管理"  Exec exec nautilus --no-desktop
+			"mo&zilla" Exec exec iceweasel
+                       "星际译王" Exec exec stardict

DestroyMenu SystemMenu
AddToMenu "SystemMenu" "System" Title
+                       "xkill" Exec exec xkill
+                       "NetWork Restart" Exec exec ~/scripts/netrestart.sh

+                       "关机"  Exec exec ~/scripts/shutdown.sh
+                       "重启"  Exec exec ~/scripts/restart.sh

DestroyMenu UtilitiesMenu
AddToMenu UtilitiesMenu  "Utilities" Title
+			"Top"		Exec exec xterm -T Top -n Top -e top
+			"Calculator"	Exec exec xcalc
+			"Xman"		Exec exec xman
+			"Xmag"		Exec exec xmag
+			""		Nop
+                       "Reset X defaults" Exec xrdb -load $HOME/.Xresources 
+  			"screenshot" 	Exec import -window root shot.png

DestroyMenu FileMenu
AddToMenu "FileMenu" "File" Title
#+                       "&Home"         Popup HomeDirMenu
+                       "&Device"         Popup DeviceMenu

#DestoryMenu HomeDirMenu
#AddToMenu  "HomeDirMenu"
#        PipeRead 'for i in $HOME/*;
#                 do echo "+ $i Exec xterm -e vim $i";done'
//添加自动挂载的设备
DestoryMenu DeviceMenu
AddToMenu  "DeviceMenu"
+ DynamicPopupAction  Function MakeMedia
 
AddToFunc MakeMedia
+ I DestroyMenu recreate DeviceMenu
+ I AddTomenu DeviceMenu Devices Title
+ I PipeRead 'for i in /media/*;
                 do echo AddToMenu DeviceMenu "$i"  Exec exec ~/scripts/umount.sh  $i;done'
   
DestroyMenu Quit-Verify 	
AddToMenu Quit-Verify 	"Really Quit Fvwm?" Title	
+		      	"Yes, Really Quit"  Quit	
+                       "Restart Fvwm2"     Restart fvwm2
+		      	"No, Don't Quit"    Nop	



######################## Sample Functions ##########################
DestroyFunc Move-or-Raise		
AddToFunc Move-or-Raise		I Raise
+				"M" Move
+  				"D" WindowShade
DestroyFunc Move-or-Raise2	
AddToFunc Move-or-Raise2	"M" Raise
+				"M" Move
+  				"D" Lower
DestroyFunc Maximize-Func		
AddToFunc Maximize-Func		"M" Maximize	 0 100
+				"C" Maximize	 0 80
+				"D" Maximize	 100 98
DestroyFunc Maximize-Func2	
AddToFunc Maximize-Func2	"M" Maximize	 100 0
+				"C" Maximize	 80 0
+				"D" Maximize	 100 98
DestroyFunc Move-or-Iconify	
AddToFunc Move-or-Iconify	I Raise
+				"M" Move
+				"D" Iconify
DestroyFunc Resize-or-Raise	
AddToFunc Resize-or-Raise	I Raise
+				"M" Resize
+				"D" Lower
DestroyFunc Resize-or-Raise2	
AddToFunc Resize-or-Raise2	"M" Raise
+				"M" Resize
+				"D" Lower
DestroyFunc Iconify-and-Raise     
AddToFunc Iconify-and-Raise     I Iconify
+                               I Raise

################## FvwmButtons button-bar ################################
#*FvwmButtonsBack bisque3
#*MainPanel: Geometry 80x18+40+4
#*MainPanel: Back SeaGreen
#*MainPanel: (Panel(down, indicator, delay 0, steps 1) 
#		PagerPanel "Module FvwmButtons PagerPanel")
#*MainPanel: Font  -*-simsun-medium-r-*-*-16-*-*-*-*-*-*-*
#*PagerPanel: Geometry 80x352
#*PagerPanel: (Swallow FvwmPager "Module FvwmPager 0 3")
#*PagerPanel: Font  -*-simsun-medium-r-*-*-16-*-*-*-*-*-*-*

########################## Icon Manager ####################################
# this FvwmIconMan setup is for swallowing in above button bar example
*FvwmIconMan*numManagers 1
*FvwmIconMan*Resolution  page
*FvwmIconMan*background  bisque3
*FvwmIconMan*foreground  black
*FvwmIconMan*font        -*-magicsong-medium-r-*-*-16-*-*-*-*-*-gb2312.1980-0
*FvwmIconMan*format      "%t"
*FvwmIconMan*action      Mouse   1 N sendcommand Focus, sendcommand "Iconify"
*FvwmIconMan*action      Mouse   2 N sendcommand "Iconify 1"
*FvwmIconMan*action      Mouse   3 N sendcommand "FvwmIdent"
*FvwmIconMan*followfocus true
*FvwmIconMan*sort        none
*FvwmIconMan*plainbutton          up black bisque3
*FvwmIconMan*selectbutton         down black bisque3
*FvwmIconMan*focusbutton          up yellow firebrick
*FvwmIconMan*focusandselectButton down yellow firebrick
*FvwmIconMan*dontshow icon=Untitled
#*FvwmIconMan*drawicons true
*FvwmIconMan*buttongeometry  300x0
*FvwmIconMan*managergeometry 1x5

########################## Window-Identifier ###############################
# Just choose colors and a fonts
*FvwmIdentBack MidnightBlue
*FvwmIdentFore Yellow
*FvwmIdentFont  -*-simsun-medium-r-*-*-14-*-*-*-*-*-*-*

########################### Pager #########################################
*FvwmPager: Geometry 150x150+1121+845
*FvwmPager: UseSkipList
*FvwmPager: Rows 4
*FvwmPager: Columns 1
*FvwmPagerBack #908090
*FvwmPagerFore #484048
*FvwmPager:Font  -*-simsun-medium-r-*-*-14-*-*-*-*-*-*-*
*FvwmPagerHilight #cab3ca
*FvwmPagerLabel 0 Main
*FvwmPagerLabel 1 Internet
*FvwmPagerLabel 2 Program
*FvwmPagerLabel 3 Amusement
*FvwmPager:SmallFont  -*-simsun-medium-r-*-*-12-*-*-*-*-*-*-*
*FvwmPagerBalloons            All
*FvwmPagerBalloonBack         Yellow
*FvwmPagerBalloonFore         Black
*FvwmPager:BalloonFont         -*-simsun-medium-r-*-*-14-*-*-*-*-*-*-*
*FvwmPagerBalloonYOffset      +2
*FvwmPagerBalloonBorderWidth  1
*FvwmPagerBalloonBorderColor  Black

##########################FvwmWinList##################################
*FvwmWinListBack #908090
*FvwmWinListFore Black
*FvwmWinListFont  -*-simsun-medium-r-*-*-14-*-*-*-*-*-*-*
*FvwmWinListAction Click1 Iconify -1,Focus
*FvwmWinListAction Click2 Iconify
*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent
*FvwmWinListUseSkipList
*FvwmWinListGeometry +0-1
                                      

#for FvwmBacker
*FvwmBackerDesk 0 -solid steelblue
*FvwmBackerDesk 1 -solid midnightblue

#for FvwmScroll
*FvwmScrollBack grey40
*FvwmScrollFore green
	
*FvwmAnimate: Delay 25
*FvwmAnimate: Effect Random
*FvwmAnimate: Width 3

Style FvwmTaskBar HandleWidth 0, BorderWidth 0
*FvwmTaskBar: UseSkipList
*FvwmTaskBar: AutoStick
*FvwmTaskBar: DeskOnly
#*FvwmTaskBar: Action Click1 DeiconifyRaiseAndFocus
*FvwmTaskBar: Action Click2 Iconify On
*FvwmTaskBar: Action Click3 Lower
#*FvwmTaskBar: Action Click3 FvwmIdent
*FvwmTaskBar: BellVolume 30
*FvwmTaskBar: MailCommand Exec exec rxvt -e mutt
*FvwmTaskBar: 3DFvwm
*FvwmTaskBar: StartName FVWM
*FvwmTaskBar: StartMenu RootMenu
*FvwmTaskBar: Font  -*-simsun-medium-r-*-*-14-*-*-*-*-*-*-*
#*FvwmTaskBar: Font  "xft:Luxi Mono"
*FvwmTaskBar: SelFont  -*-simsun-medium-r-*-*-14-*-*-*-*-*-*-*
*FvwmTaskBar: ShowTips
*FvwmTaskBar: ClockFormat 
*FvwmTaskBar: WindowButtonsRightMargin 20 

*FvwmTaskBar: Back seagreen
*FvwmTaskBar: Fore gold2
*FvwmTaskBar: FocusFore cornsilk
*FvwmTaskBar: IconBack darkgreen
*FvwmTaskBar: IconFore white
*FvwmTaskBar: StartCommand(Mouse 3) Popup RightKeyMenu 

#*FvwmTaskBar: Button Title hello, Icon mini.x.xpm, Action (Mouse 1) Module FvwmConsole
#*FvwmTaskBar: DateFormat "%A, %B %d, %Y"
#*FvwmTaskBar: WindowButtonsLeftMargin 20
#*FvwmTaskBar: HighlightFocus
#*FvwmTaskBar: AutoHide 6

Read fvwm.strokes

正在一步一步改良!

发表评论

eight + one =