|
楼主 |
发表于 2009-9-1 19:42:05
|
显示全部楼层
fvwm的配置文件.. 和我的系统绑定的很深, 不过比FVWM-Crystal的简单了很多 .
有几个文件我直接用的FVWM-Crystal的, 还要habak和trayer.
#
# FVWM theme for Sword's T43. by Sword <swordhui@263.net>
#
# modified from FVWM-Crystal.
#
#begin print some logs.
#Exec printf "Hello, world\n"
#Set image path.
ImagePath /usr/share/pixmaps:/usr/share/icons/hicolor:/usr/share/fvwm-crystal/fvwm/icons/Default:+
#set icon size.
SetEnv IconPixs "32"
SetEnv MyIconSize "$[IconPixs]x$[IconPixs]"
#position.
SetEnv YBarPos "+3"
SetEnv YMenuPos "40"
SetEnv XNetPos "4"
SetEnv XGFXPos "40"
SetEnv XMediaPos "76"
SetEnv XIMPos "112"
SetEnv XSCIPos "148"
SetEnv XWinePos "184"
SetEnv XGamePos "219"
SetEnv XSysPos "255"
#cursor
CursorStyle ROOT cursor.png 0 0
#Style
DefaultIcon $[MyIconSize]/apps/def_icon.png
Style * IconTitleRelief 1
Style * MwmBorder
Style * HandleWidth 3
Style * DepressableBorder
Style * IconBox 400 3 -1 -1,\
IconGrid 40 40, IconFill l t, IconSize -1 -1 32 32
Style * NoIconTitle
Style * IconBackgroundRelief 1
Style * IconBackgroundPadding 1
#appls.
Style Fvwm* !Title, !Handles, Sticky, \
WindowListSkip, \
BorderWidth 0
Style FvwmButtons !Title, !Handles, Sticky, \
WindowListSkip
Style xload !Title, Sticky, WindowListSkip
Style xclock !Title, Sticky, WindowListSkip
Style xmms !Title, Sticky
Style xterm Icon $[MyIconSize]/apps/xterm-my.png
Style trayer !Title, Sticky, WindowListSkip,!Handles
Style Conky !Title, Sticky, WindowListSkip,!Handles
#Main Menu
MenuStyle * Fvwm
MenuStyle * BorderWidth 1
MenuStyle * Animation
MenuStyle * MenuFace TiledPixmap marble.png
#Test menu.
AddToMenu Test@boxes@^blue^
+ Xterm%$[MyIconSize]/apps/xterm-my.png% Exec xterm -g 100x50
+ GoogleEarth%$[MyIconSize]/apps/def_icon.png% Exec /home/sword/google-earth/googleearth
+ Poweroff%$[MyIconSize]/apps/def_icon.png% Exec xterm -e sudo telinit 0
+ Reboot%$[MyIconSize]/apps/def_icon.png% Exec xterm -e sudo telinit 6
+ RootMenu Popup MenuFvwmRoot
+ BmpMenu Popup TestBmpMenu
AddToMenu TestBmpMenu
+ DynamicPopupAction Function MakePngIconMenu
AddToFunc MakePngIconMenu
+ I DestroyMenu recreate TestBmpMenu
+ I AddToMenu TestBmpMenu
+ I PipeRead 'for i in /usr/share/fvwm-crystal/fvwm/icons/Default/48x48/apps/*; \
do \
name=`basename $i`;\
echo "+ $name%$[MyIconSize]/apps/$name% Exec echo $i";\
done'
#bind key F1.
Key F1 R A Menu Test Root c c
Key F2 R A WindowList Root c c
Mouse 3 R A Exec xterm -g 100x50
Mouse 1 R A Menu Test
Mouse 2 R A Exec firefox
#minimize.
Mouse 3 T A Iconify True
Mouse 3 I A Iconify False
Mouse 1 I A Iconify False
#place.
Mouse 1 1 N Iconify True
Mouse 1 2 N Close
Mouse 1 4 N Maximize
Mouse 1 6 N WindowShade
Mouse 1 8 N Stick
#FVWM-Crystal
SetEnv Icon_Theme "Default"
SetEnv FVWM_SYSTEMDIR "/usr/share/fvwm-crystal/fvwm"
#color defines
Read colorset-definition
Read Original.cs
# Includes and FVWM modules {{{1
Module FvwmCommandS
# Desktop settings {{{1
EdgeScroll 0 0
HideGeometryWindow Move, Resize
OpaqueMoveSize 100
EdgeThickness 1
SetEnv AppPanelGeom "3"
#menus for Snes9x games
AddToMenu MenuSnes9xGame
+ DynamicPopupAction Function MakeSnes9xGame
AddToFunc MakeSnes9xGame
+ I DestroyMenu recreate MenuSnes9xGame
+ I AddToMenu MenuSnes9xGame
+ I PipeRead 'for i in /home/sword/sfc_roms/*.gz; \
do \
name=`basename $i`;\
echo "+ $name%$[MyIconSize]/apps/$name% Exec /usr/games/bin/osnes9x $i";\
done'
#Application-Menu: Net Tools/Browser/mail client
AddToMenu MenuNet
+ firefox%$[MyIconSize]/apps/firefox-my.png% Exec firefox
+ links%$[MyIconSize]/apps/links2.png% Exec links -g
#Application-Menu: GFX
AddToMenu MenuGFX
+ gimp%$[MyIconSize]/apps/gimp.png% Exec gimp
+ gliv%$[MyIconSize]/apps/gimp.png% Exec gliv
+ ida%$[MyIconSize]/apps/ida.png% Exec ida
#Application-Menu: Media(Audio,Video)
AddToMenu MenuMedia
+ xmms%$[MyIconSize]/apps/xmms-my.png% Exec xmms
#Application-Menu: IM
AddToMenu MenuIM
+ pidgin%$[MyIconSize]/apps/pidgin.png% Exec pidgin
+ skype%$[MyIconSize]/apps/skype.png% Exec skype
#Application-Menu: Sci
AddToMenu MenuSCI
+ celestia%$[MyIconSize]/apps/celestia.png% Exec celestia
+ xcalce%$[MyIconSize]/apps/skype.png% Exec xcalc
#Application-Menu: Wine
AddToMenu MenuWine
+ notepad%$[MyIconSize]/apps/wine.png% Exec notepad
+ regedit%$[MyIconSize]/apps/wine.png% Exec regedit
+ winecfg%$[MyIconSize]/apps/wine.png% Exec winecfg
+ SourceInsight%$[MyIconSize]/apps/wine.png% Exec wine ~/.wine/drive_c/Program\ Files/Source\ Insight\ 3/Insight3.exe
#Application-Menu: Games
AddToMenu MenuGames
+ frozen-bubble%$[MyIconSize]/apps/frozen-bubble.png% Exec /usr/games/bin/frozen-bubble
+ barrage%$[MyIconSize]/apps/barrage.png% Exec /usr/games/bin/barrage
+ snes9x%$[MyIconSize]/apps/snes9x.png% Popup MenuSnes9xGame
+ mine%$[MyIconSize]/apps/wine.png% Exec winemine
#Application-Menu: Sys
AddToMenu MenuSys
+ gentoo%$[MyIconSize]/apps/gentoo.png% Exec gentoo
+ aterm%$[MyIconSize]/apps/aterm.png% Exec aterm
#Application Menu.
All (ApplicationPanel) Close
DestroyModuleConfig ApplicationPanel: *
*ApplicationPanel: Geometry +$[AppPanelGeom]$[YBarPos]
*ApplicationPanel: BoxSize smart
*ApplicationPanel: ActiveColorset $[cs_panel_active]
*ApplicationPanel: Colorset $[cs_panel_inactive]
*ApplicationPanel: Rows 1
*ApplicationPanel: Padding 1 1
*ApplicationPanel: Frame 1
*ApplicationPanel: Pixmap "none"
*ApplicationPanel: (Icon $[MyIconSize]/apps/firefox-my.png, \
Action (Mouse 3) `Exec firefox`, \
Action (Mouse 1) `Menu MenuNet root $[XNetPos]p $[YMenuPos]p` \
)
#GFX
*ApplicationPanel: (Icon $[MyIconSize]/apps/gimp.png, \
Action (Mouse 3) `Exec gimp`, \
Action (Mouse 1) `Menu MenuGFX root $[XGFXPos]p $[YMenuPos]p` \
)
#Media (Audio, Video)
*ApplicationPanel: (Icon $[MyIconSize]/apps/xmms-my.png, \
Action (Mouse 3) `Exec xmms`, \
Action (Mouse 1) `Menu MenuMedia root $[XMediaPos]p $[YMenuPos]p` \
)
#IM/Networks menu.
*ApplicationPanel: (Icon $[MyIconSize]/apps/pidgin.png, \
Action (Mouse 3) `Exec pidgin`, \
Action (Mouse 1) `Menu MenuIM root $[XIMPos]p $[YMenuPos]p` \
)
#SCI menu.
*ApplicationPanel: (Icon $[MyIconSize]/apps/celestia.png, \
Action (Mouse 3) `Exec celestia`, \
Action (Mouse 1) `Menu MenuSCI root $[XSCIPos]p $[YMenuPos]p` \
)
#Wine menu.
*ApplicationPanel: (Icon $[MyIconSize]/apps/wine.png, \
Action (Mouse 1) `Menu MenuWine root $[XWinePos]p $[YMenuPos]p` \
)
#Games Menu
*ApplicationPanel: (Icon $[MyIconSize]/apps/frozen-bubble.png, \
Action (Mouse 3) `Exec /usr/games/bin/frozen-bubble`, \
Action (Mouse 1) `Menu MenuGames root $[XGamePos]p $[YMenuPos]p` \
)
#System Menu
*ApplicationPanel: (Icon $[MyIconSize]/apps/gentoolinux.png, \
Action (Mouse 3) `Exec gentoo`, \
Action (Mouse 1) `Menu MenuSys root $[XSysPos]p $[YMenuPos]p` \
)
# Settings of trayer {{{2
DestroyFunc NotificationArea-Trayer
AddToFunc NotificationArea-Trayer
+ I SetEnv trayer_width_t "request"
+ I SetEnv trayer_heigth_t "pixel"
+ I SetEnv trayer_edge "top"
+ I SetEnv trayer_align "right"
+ I SetEnv trayer_marge "240"
+ I SetEnv trayer_dist "3"
+ I SetEnv trayer_width_w ""
# Settings of Trayer {{{1
AddToFunc ExitFunction I Exec exec killall trayer
DestroyFunc TrayerPanel
AddToFunc TrayerPanel
+ I Exec exec trayer \
--SetDockType false \
--widthtype $[trayer_width_t] \
--heighttype $[trayer_heigth_t] \
--height 32 \
--edge $[trayer_edge] \
--align $[trayer_align] \
--transparent true \
--SetPartialStrut true \
--alpha $[TrayerAlpha] \
--tint $[TrayerTint] \
--margin $[trayer_marge] \
--distance $[trayer_dist] \
$[trayer_width_w]
#Init functions.
DestroyFunc InitFunction
AddToFunc InitFunction
# + I Module FvwmBanner
+ I Echo "Init Function"
+ I Exec pidgin
DestroyFunc StartFunction
AddToFunc StartFunction
+ I Echo "Start Function"
+ I Exec habak /home/sword/wallpapers
+ I Module FvwmButtons ApplicationPanel
+ I NotificationArea-Trayer
+ I TrayerPanel
+ I Exec conky -o -y 0 -d
DestroyFunc RestartFunction
AddToFunc RestartFunction
+ I Echo "Restart"
DestroyFunc SessionInitFunction
AddToFunc SessionInitFunction
+ I Echo "Session Init"
DestroyFunc SessionRestartFunction
AddToFunc SessionRestartFunction
+ I Echo "Session Restart"
DestroyFunc ExitFunction
AddToFunc ExitFunction
+ I Echo "Exit Function"
+ I Exec killall -9 trayer
+ I Exec killall -9 conky
如果玩出新花样可以交流交流 |
|