fvwm 模块命令

Module Commands


Fvwm maintains a database of module configuration lines in a form


*<ModuleName>: <Config-Resource>
where <ModuleName> is either a real module name or an alias.


This database is initially filled from config file (or from output of -cmd config command), and can be later modified either by user (via FvwmCommand) or by modules.


When modules are run, they read appropriate portion of database. (The concept of this database is similar to one used in X resource database).


Commands for manipulating module configuration database are described below.


31.12.1. Asterisk


* module_config_line


Defines a module configuration. module_config_line consists of a module name (or a module alias) and a module resource line. The new syntax allows a delimiter, a colon and optional spaces, between the module name and the rest of the line, this is recommended to avoid conflicts.


*FvwmIconBox: MaxIconSize 48x48
*FvwmPager: WindowBorderWidth 1
*FvwmButtons-TopRight: Geometry 100x100-0+0
*FvwmButtons-Bottom: Geometry +0-0
31.12.2. DestroyModuleConfig


DestroyModuleConfig module_config


Deletes module configuration entries, so that new configuration lines may be entered instead. This also sometimes the only way to turn back some module settings, previously defined. This changes the way a module runs during a fvwm session without restarting. Wildcards can be used for portions of the name as well.


The new non-conflicting syntax allows a delimiter, a colon and optional spaces between the module name and the rest of the line. In this case a module name (or alias) can't have wildcards.


DestroyModuleConfig FvwmButtons*
DestroyModuleConfig FvwmForm: Fore
DestroyModuleConfig FvwmIconBox: Max*
31.12.3. KillModule


KillModule modulename [modulealias]


Causes the module which was invoked with name modulename to be killed. The name may include wildcards. If modulealias is given, only modules started with the given alias are killed.


# kill all pagers
KillModule FvwmPager


Module FvwmEvent SoundEvent
KillModule FvwmEvent SoundEvent
31.12.4. Module


Module modulename [moduleparams]


Specifies a module with its optional parameters which should be spawned. Currently several modules, including FvwmButtons, FvwmEvent, FvwmForm, FvwmGtk, FvwmPager, FvwmScript support aliases. Aliases are useful if more than one instance of the module should be spawned. Aliases may be configured separately using * syntax. To start a module FvwmForm using an alias MyForm, the following syntax may be used:


Module FvwmForm MyForm
At the current time the available modules (included with fvwm) are FvwmAnimate (produces animation effects when a window is iconified or de-iconified), FvwmAuto (an auto raise module), FvwmBacker (to change the background when you change desktops), FvwmBanner (to display a spiffy XBM, XPM, PNG or SVG), FvwmButtons (brings up a customizable tool bar), FvwmCommandS (a command server to use with shell's FvwmCommand client), FvwmConsole (to execute fvwm commands directly), FvwmCpp (to preprocess your config with cpp), FvwmDebug (to help debug fvwm), FvwmDragWell (the place to drag&drop to), FvwmEvent (trigger various actions by events), FvwmForm (to bring up dialogs), FvwmGtk (to bring up GTK menus and dialogs), FvwmIconBox (like the mwm IconBox), FvwmIconMan (a flexible icon manager), FvwmIdent (to get window info), FvwmM4 (to preprocess your config with m4), FvwmPager (a mini version of the desktop), FvwmPerl (a Perl manipulator and preprocessor), FvwmProxy (to locate and control obscured windows by using small proxy windows), FvwmRearrange (to rearrange windows), FvwmSave (saves the desktop state in .xinitrc style), FvwmSaveDesk (saves the desktop state in fvwm commands), FvwmScript (another powerful dialog toolkit), FvwmScroll (puts scrollbars on any window), FvwmTabs (a generic tabbing module), FvwmTaskBar (a Windows like task bar), FvwmTheme (managed colorsets, obsolete), FvwmWharf (an AfterStep like button bar), FvwmWindowMenu (a configurable fvwm menu listing current windows), FvwmWinList (a window list). These modules have their own man pages. There may be other modules out on there as well.


Modules can be short lived transient programs or, like FvwmButtons , can remain for the duration of the X session. Modules are terminated by the window manager prior to restarts and quits, if possible. See the introductory section on modules. The keyword Module may be omitted if modulename is distinct from all fvwm commands.


31.12.5. ModuleListenOnly


ModuleListenOnly modulename [moduleparams]


This command works like the Module command, but fvwm never sends any messages to the module. This may be handy to write a module as a shell script that is triggered by external events without the burden to answer packets sent by fvwm. For example, a module written as a shell script may change labels of the FvwmButtons module to implement a simple clock.


31.12.6. ModulePath


ModulePath path


Specifies a colon separated list of directories in which to search for modules. To find a module, fvwm searches each directory in turn and uses the first file found. Directory names on the list do not need trailing slashes.


The ModulePath may contain environment variables such as $HOME (or ${HOME}). Further, a '+' in the path is expanded to the previous value of the path, allowing easy appending or prepending to the path.


For example:


ModulePath ${HOME}/lib/fvwm/modules:+
The directory containing the standard modules is available via the environment variable $FVWM_MODULEDIR.


31.12.7. ModuleSynchronous


ModuleSynchronous [Expect string] [Timeout secs] modulename


The ModuleSynchronous command is very similar to Module. Fvwm stops processing any commands and user input until the module sends a string beginning with "NOP FINISHED STARTUP" back to fvwm. If the optional Timeout is given fvwm gives up if the module sent no input back to fvwm for secs seconds. If the Expect option is given, fvwm waits for the given string instead. ModuleSynchronous should only be used during fvwm startup to enforce the order in which modules are started. This command is intended for use with the (currently hypothetical) module that should be in place before other modules are started.


Warning: It is quite easy to hang fvwm with this command, even if a timeout is given. Be extra careful choosing the string to wait for. Although all modules in the fvwm distribution send back the "NOP FINISHED STARTUP" string once they have properly started up, this may not be the case for third party modules. Moreover, you can try to escape from a locked ModuleSynchronous command by using the key sequence Ctrl-Alt-Escape (see the EscapeFunc).


31.12.8. ModuleTimeout


ModuleTimeout timeout


Specifies how many seconds fvwm waits for a module to respond. If the module does not respond within the time limit then fvwm kills it. timeout must be greater than zero, or it is reset to the default value of 30 seconds.


31.12.9. SendToModule


SendToModule modulename string


Sends an arbitrary string (no quotes required) to all modules, whose alias or name matching modulename, which may contain wildcards. This only makes sense if the module is set up to understand and deal with these strings though. Can be used for module to module communication, or implementation of more complex commands in modules.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值