玛宁 发表于 2006-1-10 16:22:25

偶的FVWM桌面^_^

整个设计都是为了能以最大限度的使用屏幕空间。
屏幕下端的TaskBar是FvwmButton吞下FvwmPager, FvwmIconMan, XClock和Conky。
Window最小化后的截图Icon用的是ImageMagick。
偶的Laptop是WXGA,要在XGA下用的话就要改变屏幕下方两个Console的尺寸。
还有,因为字体太小,不适合用中文。

偶的Blog - Ultra Compact FVWM Configuration - For the Laptops

玛宁 发表于 2006-1-10 16:31:54


#####################################################################
# ____________________________
# ( _________________________)
# ) (__ _ _ _ _
# ( __)( \/ )( \/\/ )/\/# ) ( \ / \ // # (___) \/ \/\/(_/\/\_) 2.5.10
#
# For The Laptops
#
#####################################################################

#********************************************************************
# Set Environment variables
#********************************************************************
SetEnv fvwm_home $[HOME]/.fvwm
SetEnv fvwm_wallpapers $[HOME]/multimedia/pictures/wallpapers.1280x768

#********************************************************************
# Virtual Desktops
#********************************************************************
DesktopSize 3x1
DesktopName 0 Desktop
EdgeScroll 100 100
EdgeResistance 150 150
EdgeThickness 0
EwmhBaseStruts 0 0 0 12

#********************************************************************
# Mouse and Focus Behavior
#********************************************************************
ClickTime 350
MoveThreshold 3
Style * SloppyFocus, MouseFocusClickRaises
IgnoreModifiers L25

#********************************************************************
# Global Styles and options
#********************************************************************
OpaqueMoveSize -1
HideGeometryWindow Never
CursorStyle root left_ptr
CursorStyle position left_ptr
CursorStyle title left_ptr
CursorStyle default left_ptr
CursorStyle menu left_ptr

Style * TileCascadePlacement, ResizeOpaque
Style * StickyIcon
Style * RaiseTransient, StackTransientParent, DecorateTransient,
#Style * NoIcon, MiniIcon none, EWMHMiniIconOverride
Style * GrabFocusOff, NoIconTitle, MiniIcon none, EWMHMiniIconOverride, IconBox 1280x768+0+0, IconFill left top

Style "RootLogs" NoTitle, !Handles, !Borders, Sticky, WindowListSkip, CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, !Iconifiable

#********************************************************************
# DestroyFunc FuncName
# AddToFunc FuncName
# + I (Action to happen immediately)
# + C (Action to happen on a mouse 'click)
# + D (Action to happen on a mouse 'double click')
# + H (Action to happen on a mouse 'hold')
# + M (Action to happen on a mouse 'motion')
#********************************************************************
# Basic Functions
#--------------------------------------------------------------------
DestroyFunc FvwmWindow_Close
AddToFunc FvwmWindow_Close
+ C Close
+ D Destroy

DestroyFunc FvwmWindow_Iconify
AddToFunc FvwmWindow_Iconify
+ C Iconify

DestroyFunc FvwmWindow_UnIconify
AddToFunc FvwmWindow_UnIconify
+ D Iconify

DestroyFunc FvwmWindow_Maximize
AddToFunc FvwmWindow_Maximize
+ C Maximize 100 100

DestroyFunc FvwmWindow_Resize
AddToFunc FvwmWindow_Resize
+ C Resize
+ M Resize

DestroyFunc FvwmWindow_Move
AddToFunc FvwmWindow_Move
+ C Move
+ M Move

DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I Raise
+ I ThisWindow (!Iconic) SetEnv Icon-$[w.id] $[w.iconfile]
+ I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead "xwd -silent -id $[w.id] | convert -resize 10% -frame 1x1 -mattecolor black -quality 0 xwd:- png:$[FVWM_USERDIR]/icon.tmp.$[w.id].png && echo WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png || echo Nop"
+ I TestRc (Match) Test (f $[w.miniiconfile], f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) PipeRead "composite -geometry +2+4 $[w.miniiconfile] $[FVWM_USERDIR]/icon.tmp.$[w.id].png $[FVWM_USERDIR]/icon.tmp.$[w.id].png; echo Nop"
+ I Iconify

#--------------------------------------------------------------------
# Program Launching Functions
#--------------------------------------------------------------------
DestroyFunc FvwmRun_NormalTerm
AddToFunc FvwmRun_NormalTerm
+ I Exec exec urxvt -g 96x26 -bg black -fg white -sr

DestroyFunc FvwmRun_RootTerm
AddToFunc FvwmRun_RootTerm
+ I Exec exec urxvt -g 96x26 -bg black -fg white -sr -e su

DestroyFunc FvwmRun_Gaim
AddToFunc FvwmRun_Gaim
+ I Exec exec gaim

DestroyFunc FvwmRun_Firefox
AddToFunc FvwmRun_Firefox
+ I Exec exec firefox

DestroyFunc FvwmRun_Thunderbird
AddToFunc FvwmRun_Thunderbird
+ I Exec exec thunderbird

DestroyFunc FvwmRun_giFToxic
AddToFunc FvwmRun_giFToxic
+ I Exec exec giFToxic

DestroyFunc FvwmRun_Openoffice
AddToFunc FvwmRun_Openoffice
+ I Exec exec ooffice2

DestroyFunc FvwmRun_Dia
AddToFunc FvwmRun_Dia
+ I Exec exec dia

DestroyFunc FvwmRun_Inkscape
AddToFunc FvwmRun_Inkscape
+ I Exec exec inkscape

DestroyFunc FvwmRun_Gimp
AddToFunc FvwmRun_Gimp
+ I Exec exec gimp

DestroyFunc FvwmRun_GVim
AddToFunc FvwmRun_GVim
+ I Exec exec gvim

DestroyFunc FvwmRun_gFTP
AddToFunc FvwmRun_gFTP
+ I Exec exec gftp

DestroyFunc FvwmRun_GtkPod
AddToFunc FvwmRun_GtkPod
+ I Exec exec gtkpod

DestroyFunc FvwmRun_XMMS
AddToFunc FvwmRun_XMMS
+ I Exec exec xmms

DestroyFunc FvwmRun_Blender
AddToFunc FvwmRun_Blender
+ I Exec exec blender

DestroyFunc FvwmRun_Scribus
AddToFunc FvwmRun_Scribus
+ I Exec exec scribus

DestroyFunc FvwmRun_AcrobatReader
AddToFunc FvwmRun_AcrobatReader
+ I Exec exec acroread

DestroyFunc FvwmRun_MPlayer
AddToFunc FvwmRun_MPlayer
+ I Exec exec gmplayer

DestroyFunc FvwmRun_Planner
AddToFunc FvwmRun_Planner
+ I Exec exec planner

DestroyFunc FvwmRun_GConf-Editor
AddToFunc FvwmRun_GConf-Editor
+ I Exec exec gconf-editor

DestroyFunc FvwmRun_XPaint
AddToFunc FvwmRun_XPaint
+ I Exec exec xpaint

DestroyFunc FvwmRun_GTorrentViewer
AddToFunc FvwmRun_GTorrentViewer
+ I Exec exec gtorrentviewer

#--------------------------------------------------------------------
# System Functions
#--------------------------------------------------------------------
DestroyFunc StartFunction
AddToFunc StartFunction
+ I Module FvwmIconMan
+ I Module FvwmPager 0 0
+ I Module FvwmButtons BottomBar
+ I Exec exec fvwm-root -r $[fvwm_wallpapers]/Autumn.Reflections.1280x768.png
+ I Exec exec echo -e "border_margin 0\ndraw_shades no" > ~/.conkyrc
+ I Exec exec ln -sf `which urxvt` ~/.rootlogs.term
+ I Exec exec rm $[FVWM_USERDIR]/icon.tmp.*.png

DestroyFunc InitFunction
AddToFunc InitFunction
+ I Exec exec pkill -x .rootlogs.term
+ I Exec exec ~/.rootlogs.term -name "RootLogs" -ip -fg white -fade 50 -tint white -sh 25 +sb -g 105x10+5-12 -fn "*-*-*-*-*-*-*-10-*-*-*-*-*-*-*" -e tail -f ./.x.log
+ I Exec exec ~/.rootlogs.term -name "RootLogs" -ip -fg white -fade 50 -tint white -sh 25 +sb -g 105x10+641-12 -fn "*-*-*-*-*-*-*-10-*-*-*-*-*-*-*" -e tail -f /var/log/messages

DestroyFunc RestartFunction
AddToFunc RestartFunction
+ I Nop

DestroyFunc FvwmFunc_WallpaperDir
AddToFunc FvwmFunc_WallpaperDir
+ I PipeRead 'test ! -d "$0/.thumbs" && mkdir "$0/.thumbs"; for i in "$0/"*; do test -f "$0/.thumbs/${i##*/}" -a "${i}" -ot "$0/.thumbs/${i##*/}" || { convert -quality 0 -scale 42 "${i}" "png:$0/.thumbs/${i##*/}" 2>/dev/null || continue; }; done; fvwm-menu-directory --title "%d" --icon-file __PIXMAP__ --dir "$0" --exec-file "^fvwm-root -r" | sed -e "s#__PIXMAP__\\(.*\\)\\\"\\(.*/\\)\\(.*\\)\\\"#\\2.thumbs/\\3\\1\\2\\3#g"'

#********************************************************************
# Basic Bindings
#********************************************************************
Key F1 A M Menu MenuFvwmRoot
Key Tab A M WindowList Root c c NoDeskSort, SelectOnRelease Meta_L
Mouse 1 R A Menu FvwmMenu_RootMenu
Key Super_L A A Menu FvwmMenu_RootMenu
Mouse 3 R A Menu FvwmMenu_WindowOps
Key Super_L A M Menu FvwmMenu_WindowOps
Mouse 1 1 A Menu FvwmMenu_WindowOps
Mouse 1 3 A FvwmWindow_Close
Mouse 1 2 A FvwmWindow_Maximize
#Mouse 1 4 A FvwmWindow_Iconify
Mouse 1 4 A Thumbnail
Mouse 1 I A FvwmWindow_UnIconify

#********************************************************************
# Colorsets
#********************************************************************
SetEnv fvwm_color.std_foreground black
SetEnv fvwm_color.act_foreground white

# SetEnv fvwm_color.std_background #806854
SetEnv fvwm_color.std_background #806854
SetEnv fvwm_color.act_background #54382c
# Windows Colorset
#--------------------------------------------------------------------
# All BLack
Colorset 2 fg black, bg black, hi black, sh black

# Active Window
Colorset 3 fg $[fvwm_color.act_foreground], bg $[fvwm_color.act_background]

# Normal(Inactive) Window
Colorset 4 fg $[fvwm_color.std_foreground], bg $[fvwm_color.std_background]

# Inactive Windows Border
Colorset 5 bg $[fvwm_color.std_background]

# Menu(hi: top and left edge, sh: bottom and right edge and seperator)
Colorset 7 fg black, bg #ccb898, sh #807460, hi #807460

# Highlighted Menu Item
Colorset 8 fg DarkRed

# Pager
Colorset 9 fg $[fvwm_color.std_foreground], bg $[fvwm_color.std_background], hi black, sh black

# Active Pager
Colorset 10 bg $[fvwm_color.act_background], hi red, sh red

# Pager Windows
Colorset 13 bg #a49474, hi black, sh black

# Active Pager Window
Colorset 12 bg #1c2c3c, hi #1c2c3c, sh #1c2c3c

# BottomBar
Colorset 11 fg $[fvwm_color.std_foreground], bg $[fvwm_color.std_background]

# IconMan
Colorset 14 fg $[fvwm_color.std_foreground], bg $[fvwm_color.std_background], hi $[fvwm_color.std_background], sh $[fvwm_color.std_background]

# IconMan Focused, Mouse Over Window
Colorset 15 fg $[fvwm_color.act_foreground], bg $[fvwm_color.act_background], hi $[fvwm_color.std_background], sh $[fvwm_color.std_background]

Colorset 17 fg $[fvwm_color.std_foreground], bg $[fvwm_color.act_background], hi $[fvwm_color.std_background], sh $[fvwm_color.std_background]

# Conky
Colorset 16 fg $[fvwm_color.std_foreground], bg $[fvwm_color.std_background]

#********************************************************************
# Window Decor
#********************************************************************
DestroyDecor WindowDecor_Std
AddToDecor WindowDecor_Std
+ TitleStyle Height 11
+ ButtonStyle 1 ActiveUp Vector 5 50x20@3 80x50@3 50x80@3 20x50@3 50x20@3-- Flat
+ ButtonStyle 1 ActiveDown Vector 5 50x30@3 70x50@3 50x70@3 30x50@3 50x30@3-- Flat
+ ButtonStyle 1 Inactive Vector 5 50x20@3 80x50@3 50x80@3 20x50@3 50x20@3-- Flat

+ ButtonStyle 3 ActiveUp Vector 4 20x20@3 80x80@3 80x20@4 20x80@3 -- Flat
+ ButtonStyle 3 ActiveDown Vector 4 30x30@3 70x70@3 70x30@4 30x70@3 -- Flat
+ ButtonStyle 3 Inactive Vector 4 20x20@3 80x80@3 80x20@4 20x80@3 -- Flat

+ ButtonStyle 2 ActiveUp Vector 4 50x20@3 50x80@3 80x50@4 20x50@3 -- Flat
+ ButtonStyle 2 ActiveDown Vector 4 50x30@3 50x70@3 70x50@4 30x50@3 -- Flat
+ ButtonStyle 2 Inactive Vector 4 50x20@3 50x80@3 80x50@4 20x50@3 -- Flat

+ ButtonStyle 4 ActiveUp Vector 2 20x50@3 80x50@3 -- Flat
+ ButtonStyle 4 ActiveDown Vector 2 30x50@3 70x50@3 -- Flat
+ ButtonStyle 4 Inactive Vector 2 20x50@3 80x50@3 -- Flat

+ TitleStyle -- Flat
+ BorderStyle Simple -- NoInset Flat
+ ButtonStyle All -- UseTitleStyle

#********************************************************************
# Window Styles
#********************************************************************
Style "*" UseDecor WindowDecor_Std
Style "*" Font "*-*-*-*-*-*-*-10-*-*-*-*-*-*-*"
Style "*" BorderWidth 1, HandleWidth 1
Style "*" MWMBorder, FirmBorder
Style "*" Colorset 4
Style "*" HilightColorset 3
Style "*" BorderColorset 5
Style "*" HilightBorderColorset 4

#********************************************************************
# Menu Styles
#********************************************************************
MenuStyle * PopupDelayed, PopupDelay 300, PopdownImmediately
MenuStyle * PopupOffset -1 100, TitleWarp
MenuStyle * TitleUnderlines1, SeparatorsShort, TrianglesSolid
MenuStyle * AnimationOff, AutomaticHotkeysOff
MenuStyle * BorderWidth 1
MenuStyle * PopupAsSubmenu, HoldSubmenus, SubmenusRight
MenuStyle * ItemFormat "%5.i%5.5l%>"
MenuStyle * VerticalItemSpacing 1 1, VerticalTitleSpacing 1 1
MenuStyle * MenuColorset 7
MenuStyle * ActiveFore, Hilight3DOff
MenuStyle * ActiveColorset 8
MenuStyle * Font "*-*-*-*-*-*-*-10-*-*-*-*-*-*-*"

#********************************************************************
# Menus
#********************************************************************
# FvwmRootMenu
#--------------------------------------------------------------------
DestroyMenu FvwmMenu_RootMenu
AddToMenu FvwmMenu_RootMenu "Root Menu" Title
+ MissingSubmenuFunction FvwmFunc_WallpaperDir
+ "Programs" Popup FvwmMenu_Programs
+ "Console" FvwmRun_NormalTerm
+ "Root Console" FvwmRun_RootTerm
+ "FVWM Console" Module FvwmConsole
+ "" Nop
+ "Wallpapers" Popup $[fvwm_wallpapers]
+ "Restart FVWM" Restart
+ "Quit FVWM" Quit

#--------------------------------------------------------------------
# Programs Menu
#--------------------------------------------------------------------
DestroyMenu FvwmMenu_Programs
AddToMenu FvwmMenu_Programs "Programs" Title
+ "Openoffice" FvwmRun_Openoffice
+ "Scribus" FvwmRun_Scribus
+ "Acrobat Reader" FvwmRun_AcrobatReader
+ "Planner" FvwmRun_Planner
+ "Dia" FvwmRun_Dia
+ "" Nop
+ "Firefox" FvwmRun_Firefox
+ "Thunderbird" FvwmRun_Thunderbird
+ "Gaim" FvwmRun_Gaim
+ "gFTP" FvwmRun_gFTP
+ "giFToxic" FvwmRun_giFToxic
+ "GTorrentViewer" FvwmRun_GTorrentViewer
+ "" Nop
+ "Gimp" FvwmRun_Gimp
+ "Blender" FvwmRun_Blender
+ "Inkscape" FvwmRun_Inkscape
+ "XPaint" FvwmRun_XPaint
+ "" Nop
+ "GVim" FvwmRun_GVim
+ "GConf-Editor" FvwmRun_GConf-Editor
+ "" Nop
+ "XMMS" FvwmRun_XMMS
+ "MPlayer" FvwmRun_MPlayer
+ "gtkPod" FvwmRun_GtkPod
#--------------------------------------------------------------------
# fvwm Window Operation Menu
#--------------------------------------------------------------------
DestroyMenu FvwmMenu_WindowOps
AddToMenu FvwmMenu_WindowOps "Window Operations" Title
+ "Move" Move
+ "Resize" Resize
+ "(De)Iconify" Iconify
+ "(Un)Maximize" Maximize
+ "" Nop
+ "Close" Close
+ "Delete" Delete
+ "Destroy" Destroy
+ "" Nop
+ "Identify" Module FvwmIdent

#********************************************************************
# Modules
#********************************************************************
# FvwmIdent
#--------------------------------------------------------------------
DestroyModuleConfig FvwmIdent: *
*FvwmIdent: Colorset 9
*FvwmIdent: Font "*-*-*-*-*-*-*-10-*-*-*-*-*-*-*"
#--------------------------------------------------------------------
# FvwmPager
#--------------------------------------------------------------------
Style "FvwmPager" NoTitle, !Handles, Sticky, WindowListSkip, CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, !Iconifiable
DestroyModuleConfig FvwmPager: *
*FvwmPager: Geometry 60x10+0-0
*FvwmPager: BorderWidth 0
*FvwmPager: SolidSeparators
*FvwmPager: Colorset * 9
*FvwmPager: HilightColorset * 10
*FvwmPager: BalloonColorset * 9
*FvwmPager: WindowColorsets 13 12
*FvwmPager: Font none
*FvwmPager: Balloons All
*FvwmPager: BalloonFont "*-*-*-*-*-*-*-10-*-*-*-*-*-*-*"
*FvwmPager: BallonYOffset +1
*FvwmPager: Window3dBorders
*FvwmPager: UseSkipList
*FvwmPager: Rows 1
#--------------------------------------------------------------------
# FvwmIconMan
#--------------------------------------------------------------------
Style "FvwmIconMan" Sticky, WindowListSkip, CirculateSkip
DestroyModuleConfig FvwmIconMan: *
*FvwmIconMan: Title "For The Laptops!"
*FvwmIconMan: NumManagers 1
*FvwmIconMan: DrawIcons false
*FvwmIconMan: ManagerGeometry 600x1
*FvwmIconMan: ButtonGeometry 10x10
*FvwmIconMan: ReliefThickness 1
*FvwmIconMan: ShowTransient true
*FvwmIconMan: PlainButton up
*FvwmIconMan: FocusButton up
*FvwmIconMan: SelectButton up
*FvwmIconMan: Resolution global
*FvwmIconMan: Font "*-*-*-*-*-*-*-8-*-*-*-*-*-*-*"
*FvwmIconMan: Colorset 14
*FvwmIconMan: PlainColorset 17
*FvwmIconMan: FocusColorset 15
*FvwmIconMan: SelectColorset 15
#--------------------------------------------------------------------
# BottomBar
#--------------------------------------------------------------------
Style "BottomBar" NoTitle, !Handles, Sticky, WindowListSkip, CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, !Iconifiable
DestroyModuleConfig BottomBar: *
*BottomBar: Geometry 1278x10+0-0
*BottomBar: Colorset 11
*BottomBar: Rows 1
*BottomBar: Columns 1278
*BottomBar: Frame 0
*BottomBar: Font "*-*-*-*-*-*-*-8-*-*-*-*-*-*-*"
*BottomBar: (30x1, Frame 0, Title(Center) "FVWM", Action(Mouse 1) Menu FvwmMenu_RootMenu)
*BottomBar: (1x1, Frame 0, Colorset 2)
*BottomBar: (1x1, Frame 0)
*BottomBar: (60x1, Frame 0, Swallow FvwmPager)
*BottomBar: (1x1, Frame 0, Colorset 2)
*BottomBar: (1x1, Frame 0)
*BottomBar: (635x1, Frame 0, Swallow FvwmIconMan)
*BottomBar: (1x1, Frame 0)
*BottomBar: (1x1, Frame 0, Colorset 2)
*BottomBar: (216x1, Frame 0, Swallow xclock 'Exec exec xclock -bg "$[fvwm_color.std_background]" -g 225x10 -digital -norender -update 1 -padding 1 -fn *-*-*-*-*-*-*-8-*-*-*-*-*-*-* -strftime "%A, %B %d, %Y - %I:%M:%S%p"')
*BottomBar: (1x1, Frame 0, Colorset 2)
*BottomBar: (330x1, Frame 0, Swallow conky 'Exec exec conky -o -u 0.5 -f *-8-* -a top_left -x 20 -t\'${color black} C:${cpu}% R:${mem}/${memmax} S:${swap}/${swapmax} N:${upspeedf eth0}/${downspeedf eth0}k T:${acpitemp}c B:${battery}\'', Colorset 16)

线头 发表于 2006-1-10 22:53:15

这是我的,应该更能充分利用空间

玛宁 发表于 2006-1-11 07:16:17

偶比较喜欢能把window最大化后占满全屏。
偶个人的偏好是不把TaskBar藏起来,这样随时都能看到上面的系统状态。
还有像TitleBar这种无关紧要的东西应该越小越好。

线头 发表于 2006-1-11 21:57:25

我最大化的窗口100%满屏,想看taskbar只要把光标挪动到taskbar的位置它就会自动显示
感觉定义过的许多fvwm布景,这是最满意的一个

hejux 发表于 2006-1-12 00:31:21

都很牛!

seahome 发表于 2006-1-31 09:03:31

楼上的几个怎么不把中文搞清楚点啊, 模糊会伤眼睛的.

Windy_Xu 发表于 2006-1-31 22:11:01

都是牛人啊~

__element 发表于 2006-2-3 21:29:37

看得眼花花

hohoxnes 发表于 2006-2-10 23:45:08

Re: 偶的FVWM桌面^_^

,因为字体太小,不适合用中文。

偶的Blog - Ultra Compact FVWM Configuration - For the Laptops
如果字体都很小可以在X启动时加上 -dpi 96 的参数。96很适合我,但不知适不适合你,数字越大字体越大。

同时想请问楼主,我想实现一个Fullscreen功能,就是:窗体充满整个屏幕,没有边框,没有标题栏。我的思路是用快捷键Alt+Ctrl+Enter 实现上述功能代码如下。
Key Return A CM Style [Focused,当前聚焦的窗口] NoTitle, BorderWidth 0,HandleWidth 0
但是我不知道怎么表示当前聚焦的窗口,所以只实现了部分窗口的Fullscreen功能。不知楼主有没有高见。

demonlj 发表于 2006-2-11 09:52:02

还是比较喜欢将button做成dock的效果,用iconman来收最小化的,但是将icoman调整下可以直显示图标(我比较喜欢)

Zoldick 发表于 2006-3-12 09:34:09

好厉害啊!但是我怎么安装fvwm,在MagicLinux上?

后神农 发表于 2006-3-12 16:54:21

用了这么久的FVWM,发觉越来越喜欢它了 :)
也来一个最近的图吧

haijd 发表于 2006-3-12 23:53:06

楼上的,能不能把配置文件发一个?
我的信箱 haijd.yuyi(at)gmail.com

dxqwx1 发表于 2006-3-14 10:15:01

都是牛人啊,我只在《linux操作指南》书中红帽5。0看到过FVWM,使用则在beos下了。
页: [1] 2
查看完整版本: 偶的FVWM桌面^_^