Chinaunix首页 | 论坛 | 博客
  • 博客访问: 348844
  • 博文数量: 222
  • 博客积分: 9349
  • 博客等级: 中将
  • 技术积分: 2135
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-07 13:45
文章分类

全部博文(222)

文章存档

2010年(222)

分类: LINUX

2010-08-14 09:47:17


如 taviso 所说:FvwmButtons 可能是 FVWM 中最多才多艺的一个模块了。

#####
# FvwmButtons is an incredible piece of software.
#
# It can create freeform panels of any size, shape (including Non-Rectangular windows),
# Colour and function. It can swallow other applications, even applications not designed
# for docking, have "panels" that slide out consisting of other panels, has a "startup-notification"
# like feature, hundreds of possible bindings, uses the powerful fvwm Colorsets feature, and
# can even change dynamically and respond to window manager events.
#
# The widgets can be transparent, use Xft fonts, and using fvwm's font definitions can render drop shadows
# at any direction, offset, size and colour. Buttons can all use different Colorsets, and can have different
# reliefs, shapes, anything!
#
# FvwmButtons is even tolerant to errors in configuration, and can workaround bad or impossible
# definitions!
#
# As it's an fvwm module, it has 100% integration with the window manager and can use
# internal fvwm commands, functions, etc.
#
# as you can tell, i am a big FvwmButtons fan :)
#
# I've written a quick introduction into making panels with FvwmButtons, you can read it here
#
#
###########
taken from taviso's fvwm2rc file.

诚如那人所说的,但在这篇简介中只涉及如何设置 FvwmButtons 的最基础的部分。 像上面提到的那样,你想要多少个 FvwmButtons 就能创建多少个,在桌面上做任何你想 做的事。我将建立一组简单的按钮 MyButtons 让你熟悉一下语法。在 一章中,我会给一个更复杂的例子,让你对如何配置它有个更好 的认识。

FvwmButtons 的基本布局是矩形,但如 taviso 所说,你可以将它配置成任意形状。 用宽x高的形式定义 FvwmButtons 的大小,然后再用行列数分割成一个个小格子。这很 重要,因为每个 FvwmButtons 面板中的按钮都可以占用任意数目的行列,允许做任意大 小的按钮。而在每个按钮中又能建立标题、图标、动作,甚至让它包含其它应用程序( 更多内容在附录中的高级主题中)。按钮从左上角填充到右下角,如下图所示

我为这份指南做的例子非常基础,只是让你了解基本语法。这是一个只有一栏的按钮 ,有个标题,还有一些快速启动按钮用来启动某些程序。

#####
# MyButtons
###########
Style "MyButtons" NoTitle, !Handles, !Borders, Sticky, WindowListSkip, \
CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, !Iconifiable

DestroyModuleConfig MyButtons: *
*MyButtons: Geometry 60x420+0+0
*MyButtons: Colorset 9
*MyButtons: Rows 38
*MyButtons: Columns 1
*MyButtons: Frame 0
*MyButtons: Font "Shadow=3:xft:Sans:Bold:pixelsize=14:minspace=True:antialias=True"
*MyButtons: (1x2, Frame 0, Title(Center) "FVWM")
*MyButtons: (1x5, Frame 0, Icon 48x48/terminal.png, \
Action(Mouse 1) "FvwmATerm", \
Action(Mouse 3) "FvwmXTerm")
*MyButtons: (1x5, Frame 0, Icon 48x48/xmms.png, \
Action(Mouse 1) "FvwmXmms")
*MyButtons: (1x5, Frame 0, Icon 48x48/vim.png, \
Action(Mouse 1) "FvwmGvim")
*MyButtons: (1x5, Frame 0, Icon 48x48/gimp.png, \
Action(Mouse 1) "FvwmGimp")
*MyButtons: (1x5, Frame 0, Icon 48x48/firefox.png, \
Action(Mosue 1) "FvwmFireFox")
*MyButtons: (1x5, Frame 0, Icon 48x48/irc.png, \
Action(Mouse 1) "FvwmIrssi")
*MyButtons: (1x5, Frame 0, Icon 48x48/tux.png, \
Action(Mouse 1) "FvwmXLock")
*MyButtons: (1x1, Frame 0)

阅读(446) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~