FVWMPERL(1) FVWMPERL(1) (NAME) FvwmPerl - perl fvwm (SYNOPSIS) FvwmPerl fvwm(1) . Module FvwmPerl [params] fvwm FvwmPerl . (DESCRIPTION) fvwm perl . perl fvwm fvwm . (INVOCATION) FvwmPerl StartFunction . . AddToFunc StartFunction I Module FvwmPerl : FvwmPerl [ --eval line ] [ --load file ] [ --preprocess [ --quote char ] [ --winid wid ] [ --cmd ] [ --nosend ] [ --noremove ] [ line | file ] ] [ --export [names] ] [ --stay ] [ --nolock ] [ alias ] . -e|--eval line perl -l|--load file perl -p|--preprocess [ file ] fvwm --preprocess . -c|--cmd line fvwm . -q|--quote char '%'. -w|--winid wid ( ). --nosend fvwm Read . fvwm . --noremove fvwm Read . . -x|--export [names] fvwm ( Eval .). --stay . -s|--stay --eval --load --preprocess. --nostay . --nolock fvwm . : ModuleSynchronous FvwmPerl --preprocess someconfig.ppp --nolock ModuleSynchronous . Module . (alias) : ModuleSynchronous FvwmPerl FvwmPerl-JustTest SendToModule FvwmPerl-JustTest eval $a = 2 + 2; $b = $a SendToModule FvwmPerl-JustTest eval cmd("Echo 2 + 2 = $b") KillModule FvwmPerl FvwmPerl-JustTest (PREPROCESSING EXAMPLE) fvwm perl FvwmPerl --preprocess . perl fvwm FvwmPerl --load . ( perl fvwm ). . FvwmPerl . ModuleSynchronize FvwmPerl AddToFunc . + I SendToModule FvwmPerl preprocess -c $* . Exec exec xterm -name xterm-%{++$i}% # use unique name . GotoDesk 0 %{ $[desk.n] + 1 }% # go to next desk . Exec exec %{ -x "/usr/bin/X11/aterm" ? "aterm" : "xterm" }% -sb # center a window Next (MyWindow) . Move \ %{($WIDTH - $[w.width]) / 2}%p %{($HEIGHT - $[w.height]) / 2}%p . Exec exec xmessage %{2 + 2}% # simple calculator . %{main::show_message(2 + 2, "Yet another Calculator"); ""}% (ACTIONS) (action) FvwmPerl : eval perl-code perl . cmd(command*)* perl fvwm . perl [FvwmPerl][eval]: . load file-name perl . $FVWM_USERDIR ( ~/.fvwm) $FVWM_DATADIR . cmd(command*)* perl fvwm . perl [FvwmPerl][load]: . preprocess [-q|--quote char] [-c|--cmd] [line | file] fvwm (file) ( --cmd) (line) . ( fvwm) perl . %\{ ... }% perl . quote perl . '@' @\{ ... }@ . <> <\{ ... }> . perl %\{$a = c; +$a}% d . *eval* *load* PreprocessNamespace _use strict_ . undef ( ) . _main_ ::_cmd()_ ::_skip()_ . *include*(_file_) . ( ) . perl _[FvwmPerl][preprocess]:_ . . perl : `$USER+, `$DISPLAY, $WIDTH, $HEIGHT, $FVWM_VERSION, $FVWM_MODULEDIR, $FVWM_DATADIR, $FVWM_USERDIR. . perl ( ) . %Repeat count count . %ModuleConfig module-name [ destroy ] . destroy . %Prefix prefix prefix . %End any-optional-comment . %Prefix "AddToFunc SwitchToWindow I" Iconify off WindowShade off Raise WarpToWindow 50 50 %End %ModuleConfig FvwmPager destroy Colorset 0 Font lucidasans-10 DeskTopScale 28 MiniIcons %End ModuleConfig FvwmPager %Prefix "All (MyWindowToAnimate) ResizeMove " 100 100 %{($WIDTH - 100) / 2}% %{($HEIGHT - 100) / 2}% %Repeat %{$count}% br w+2c w+2c w-1c w-1c %End %Repeat %{$count}% br w-2c w-2c w+1c w+1c %End %End Prefix export [func-names] fvwm ( eval load preprocess). (func-names) / . Eval . . . preprocess . fvwm: SendToModule MyPerl export PerlEval,PP FvwmPerl --export PerlEval,PPMyPerl : DestroyFunc PerlEval AddToFunc I SendToModule MyPerl eval $* DestroyFunc PP AddToFunc I SendToModule MyPerl preprocessc-c $* : ) FvwmPerl ( FvwmPerl --stay --export ) ) fvwm SendToModule ) perl perl. (FUNCTIONS) perl : cmd($fvwm_command) eval load - $fvwm_command fvwm . preprocess - $fvwm_command perl . do_eval($perl_code) eval `$perl_code` . load($filename) load $filename . preprocess(@params, ["-c $command"] [$filename]) preprocess $filename . export($func_names, [$do_unexport]) export $func_names . (true) unexport . / . `$func_names` Eval . . stop() . skip() (callback) . unlock() fvwm. fvwm ModuleTimeout (kill ). . FvwmPerl : SendModule FvwmPerl eval unlock(); sleep(60); fvwm fvwm . detach . detach() (fork ) . . fvwm ( ) . detach() ( ) fvwm . show_message($msg, $title[, $use_stderr_too=1]) X . FVWM::Module::Toolkit::*show_message* . main perl : $a, $b, ... $h @a, @b, ... @h %a, %b, ... %h FvwmPerl (eval load) . no strict 'vars'; perl (hash) : $h{id} = $h{first_name} . " " . $h{second_name} : @MyMenu::terminals = qw( xterm rxvt ); $MyMenu::item_num = @MyMenu::terminals; strictness . (MESSAGES) FvwmPerl fvwm SendToModule . . stop . unexport [func-names] export ACTIONS . dump () ( ). (EXAMPLES) : SendToModule FvwmPerl eval $h\{dir} = $ENV\{HOME} SendToModule FvwmPerl eval load($h\{dir} . "/test.fpl") SendToModule FvwmPerl load $[HOME]/test.fpl SendToModule FvwmPerl preprocess config.ppp SendToModule FvwmPerl export Eval,PerlEval,PerlLoad,PerlPP SendToModulecFvwmPerl unexport PerlEval,PerlLoad,PerlPP SendToModule FvwmPerl stop root fvwmrc . StartFunction . Module FvwmPerl --export PerlEval # find all background pixmaps for a later use PerlEval $a = $ENV\{HOME} . "/bg"; \ opendir DIR, $a; @b = grep \{ /xpm$/ } readdir(DIR); closedir DIR # build a menu of background pixmaps AddToMenu MyBackgrounds "My Backgrounds" Title PerlEval foreach $b (@b) \ { cmd("AddToMenu MyBackgrounds $b Exec fvwm-root $a/$b") } # choose a random background to load on start-up PerlEval cmd("AddToFunc \ InitFunction + I Exec exec fvwm-root $a/" . $b[int(random(@b))]) SendToModule fvwm . perl . (dash) SendToModule . : SendToModule FvwmPerl eval $$d = "$[DISPLAY]" -SendToModule FvwmPerl eval $d = "$ENV\{DISPLAY}" SendToModule FvwmPerl eval \ cmd("Echo desk=$d, display=$$d") SendToModule FvwmPerl preprocess -c \ Echo desk=%("$d")%, display=%\{$$d}% perl ~/.fvwm : SendToModule FvwmPerl load build-menus.fpl <<-->> : # this prints the current desk, i.e. "0" SendToModule FvwmPerl preprocess -c Echo "$%\{$a = "c"; ++$a}%" # this prints "$d" SendToModule FvwmPerl preprocess -c -- -Echo "$%\{"d"}%" # this prints "$d" (SendToModule expands $$ to $) SendToModule FvwmPerl preprocess -c -- -Echo "$$%\{"d"}%" # this prints "$$d" -SendToModule FvwmPerl preprocess -c -- -Echo "$$%\{"d"}%" () . (CAVEATS) FvwmPerl perl perl perl : << .>> : Module FvwmPerl --load "my.fpl" --stay Module FvwmPerl -e load("my.fpl") -s SendToModule FvwmPerl preprocess --quote @ my.pp SendToModule FvwmPerl eval preprocess(\{quote => @}, "my.ppp"); : perl FvwmPerl . fvwm perl . (SEE ALSO) fvwm(1) . perl perl fvwm perl General::FileSystem General::Parse FVWM::Module ..SH " (AUTHOR)" Mikhael Goikhman . 2026-06-28 FVWMPERL(1)