FVWMSCRIPT(1) FVWMSCRIPT(1) (NAME) FvwmScript - (SYNOPSIS) FvwmScript Fvwm . . (DESCRIPTION) FvwmScript . FvwmScript . Fvwm . FvwmScript . (Shift)-Tab Return Escape Menu PopupMenu "" . (INVOCATION) FvwmScript `Module FvwmScript name_of_script' .fvwm2rc . "name_of_script" () . "name_of_script" FvwmScript . .fvwm2rc `*FvwmScript: Path path_of_the_script_directory' FvwmScript . FvwmScript "Read" fvwm . FvwmScript ( FvwmScript fvwm ) . (CONFIGURATION OPTIONS) ( MODULE COMMANDS fvwm(1) ). . *FvwmScript: DefaultFont font . Font (fixed) . *FvwmScript: DefaultFore color . ForeColor (black) . *FvwmScript: DefaultBack color . BackColor grey85 . *FvwmScript: DefaultHilight color . HilightColor grey100 . *FvwmScript: DefaultShadow color . ShadowColor grey55 . *FvwmScript: DefaultColorset colorset colorset . *FvwmScript: DefaultCursor cursor X11 cursor . X11/cursorfont.h XC_ . (ANATOMY OF A SCRIPT) FvwmScript . . (Heading) . . . . . : swallowexec (mini scrollbars). (HEADING OF A SCRIPT) : WindowTitle string . WindowSize width height . width height . WindowPosition x y . x y . ForeColor {color} . BackColor {color} . HilightColor {color} . ShadowColor {color} . Colorset {n} . Font {font} () . UseGettext [locale_path] gettext WindowLocaleTitle LocaleTitle ChangeLocaleTitle Gettext . FvwmScript . fvwm FvwmScript (install_prefix/share/locale/*/LC_MESSAGES/FvwmScript.mo). fvwm LocalePath ( fvwm ). WindowLocaleTitle . WindowLocaleTitle string () UseGettext . (INITIALISATION) . : Init Begin Do "Exec cat tada.voc > /dev/dsp" WarpPointer 1 Set $ToDo=Restart End ToDo$ "Restart" . (PERIODIC TASKS) . : PeriodicTasks Begin If (RemainderOfDiv (GetTime) 10)==0 Then Do {Exec xcalc} End xcalc . (THE QUIT FUNCTION) ( Quit Close Delete Destroy fvwm ). : QuitFunc Begin Do {Echo bye, bye} End fvwm KillModule fvwm ( Do). fvwm (COMMANDS) . (MAIN OF A SCRIPT) . : . . . "UserAction" . : Widget id # A number between 1 and 999 inclusive Property Type string Size width height Position x y Title { string } Value int MaxValue int MinValue int Font string ForeColor { color } BackColor { color } HilightColor { color } ShadowColor { color } Colorset int Flags flagsOpt flagsOpt Flags Hidden NoReliefString NoFocus Left / Center / Right . Hidden . NoReliefString . NoFocus . Rectangle HDipstick VDipstick . NoFocus (Shift-)Tab . Left / Center / Right . ItemDraw List Menu PopupMenu PushButton . ItemDraw PushButton Center Left . LocaleTitle Title () UseGettext . . : Main Case message of SingleClic: Begin # list of instructions which will be # executed when widget receives # message "SingleClic". This message is # generated by the user. End 1 : Begin # list of instructions which will be # executed when widget receives # message 1 End End (LIST OF WIDGETS) . CheckBox: () . Title: . Value: Value 1 . Size . HDipstick: (dipstick). . Value: . MinValue: . MaxValue: . 30x11 . HScrollBar: . Value: (thumb). MaxValue: Value. MinValue: Value. . . ItemDraw: / . Title: . Icon: . MaxValue: x . MinValue: y . / . List: . List . Value: . MinValue: . Title: . : {Option 1|Option 2|...|Option N}. . . Menu: . Menu . . Value: . Title: . : {Option 1|Option 2|...|Option N}. MiniScroll: . Value: (thumb). MaxValue: Value. MinValue: Value. 19x34 . PopupMenu: . Value: . Title: : {Option 1|Option 2|...|Option N}. "Option 1|Option 2|...|Option N" . . PushButton: / . Title: : {Title of the button|Option 1|Option 2|Option3|...|Option N}. "Option 1|Option 2|...|Option N" . Icon: . . RadioButton: . Title: . Value: Value 1 . . Rectangle: . . SwallowExec FvwmScript Title (capture) . Title: . SwallowExec: . . Value: . : -1 0 1. 30x30 . TextField: . . Title: . Value: (). MinValue: . MaxValue: . . VDipstick: (dipstick). Value: . MinValue: . MaxValue: . 11x30 . VScrollBar: . Value: (thumb). MaxValue: Value. MinValue: Value. . . (INSTRUCTIONS) . HideWidget id : id. ShowWidget id: id. ChangeValue id1 id2 id1 id2. ChangeMaxValue id1 id2 id1 id2. ChangeMinValue id1 id2 id1 id2. ChangeTitle id1 id2 id1 id2. ChangeWindowTitle string string. ChangeWindowTitleFromArg numarg numarg . ChangeLocaleTitle id1 id2 ChangeTitle () UseGettext . ChangeIcon id1 id2 id1 id2. ChangeForeColor id1 {color} id1 {color}. ChangeBackColor id1 {color} id1 {color}. ChangeColorSet id1 id2 id1 id2. 0 . ChangePosition id1 x y id1 (x,y). ChangeSize id1 width height id1 (width,height). ChangeFont id1 newfont () id1 newfont. WarpPointer id id. WriteToFile filename {str1} {str2} etc str1 str2 filename. Do {command args} fvwm Do. fvwm fvwm . fvwm . . Set $var={str1} {str2} etc var$ . Quit: . SendSignal id1 id2 id2 id1. SendToScript id_script {str11} {str2} etc id_script. str1 str2 . Key Keyname Modifier id sig str1 str2 etc : SendSignal id sig " " str1 str2 ( LastString ). Keyname Modifiers Key fvwm . (ARGUMENTS) . : . - + . . "$" . (FUNCTIONS) . . : (function argument1 argument2 etc) : (GetTitle id) id . (GetValue id) id . (GetMinValue id) id . (GetMaxValue id) id . (GetFore id) RGB id RRGGBB . (GetBack id) RGB id RRGGBB . (GetHilight id) RGB id RRGGBB . (GetShadow id) RGB id RRGGBB . (GetOutput {str} int1 int2) str int1 int2 . int2 1- GetOutput . (NumToHex int) int . (HexToNum {str}) str str . (Add int1 int2) (int1+int2) . (Mult int1 int2) (int1*int2) . (Div int1 int2) (int1/int2) . (StrCopy {str} int1 int2) int1 int2 . (StrCopy {Hello} 1 2) {He} . (LaunchScript {str}) str . SendToScript ReceiveFromScript . str . (GetScriptArgument {int}) LaunchScript . int GetScriptArgument . (GetScriptFather) . (ReceivFromScript {int}) int . (RemainderOfDiv {int1 int2}): t (int1/int2) . (GetTime) . (GetPid) (PID) . (Gettext {str}) str () UseGettext . (SendMsgAndGet {comId} {cmd} bool) cmd comId FvwmScript . bool 0 FvwmScript . 1 0 . bool 1 FvwmScript ( ). 0 . (A COMMUNICATION PROTOCOL) . (Parse {str} int) str X1S1X2S2X3S3...SnXn Xn Sn Xn . Sint . int ( n<) . str ( ). SendMsgAndGet . (LastString) " " Key SendString ( (COMMANDS) ). Key ( SendString ) ( ) . (CONDITIONAL LOOPS) . "If-Then-Else" : If $ToDo=={Open xcalc} Then Do {Exec xcalc &} # List of instructions Else Begin Do {Exec killall xcalc &} # List of instructions Do {Exec echo xcalc killed >/dev/console} End "Else-Begin-End" . Begin End . "While-Do" : While $i<5 Do Begin Set $i=(Add i 1) # List of instructions End "==" "<" "<=" "==" ">=" ">" . "For-Do-Begin-End" : For $i=1 To 20 Do Begin Do {Exec xcalc &} # List of instructions End (COMMANDS) fvwm : SendToModule ScriptName SendString id sig str ScriptName : SendString id sig str FvwmScript sig id str LastString . . MyScript : Widget 50 Property Type PushButton Title {Quit} ... Main Case message of SingleClic: Begin Quit End 1 : Begin Set $str = (LastString) If $str == {Quit} Then Quit Else ChangeTitle 33 $str End End SendToModule MyScript SendString 50 1 str str "Quit" MyScript str . : SendToModule ScriptName ChangeWindowTitle newTitle [oldTitle] ScriptName newTitle . oldTitle . ( ). + I Module FvwmScript FvwmStorageSend "/dev/hda6" + I Wait FvwmStorageSend + I SendToModule FvwmStorageSend ChangeWindowTitle HDA6 + I Module FvwmScript FvwmStorageSend "/dev/hda1" + I Wait FvwmStorageSend + I SendToModule FvwmStorageSend ChangeWindowTitle HDA1 FvwmStorageSend FvwmStorageSend SendToModule FvwmStorageSend HDA1 . (EXAMPLES) fvwm . FvwmScript-BellSetup FvwmScript-KeyboardSetup FvwmScript-PointerSetup FvwmScript-ScreenSetup X . ~/.xinit-fvwmrc ( ). ".xinit-fvwmrc" .xinitrc ( .xsession) fvwm . FvwmScript-BaseConfig fvwm (opacity) move resize (snap attraction) . .FvwmBaseConfig ( HOME/.fvwm$ FVWM_USERDIR$ ) . "Read .FvwmBaseConfig" fvwm . . Ok Apply fvwm BaseConfigOkFunc BaseConfigApplyFunc . ( AddToFunc BaseConfigOkFunc I Read MyAppStyle). FvwmScript-Buttons FvwmButtons ( xload xclock FvwmPager TkDesk ). FvwmScript-Colorset . FvwmScript-Date . FvwmScript-FileBrowser . FvwmScript-Find find . FvwmScript-Quit fvwm fvwm . FvwmScript-ScreenDump . FvwmScript-WidgetDemo . FvwmScript-ComExample . (A COMMUNICATION PROTOCOL) FvwmScript ( ) . ( perl) FvwmScript "" . GetOutput . ( ). SendMsgAndGet (fifos) FvwmScript . . ( fvwm-themes-com fvwm-themes SendMsgAndGet fvwm-themes-com FvwmScript ). "" ( ) FvwmScript ( ) . SendMsgAndGet . . comId ( GetPid comId ). fifo fvwm .tmp-com-in-comId .tmp-com-out-comId . fifo .tmp-com-in-comId . FvwmScript : Set $answer = (SendMsgAndGet {comId} {cmd} bool) FvwmScript cmd fifo . cmd ( fifo ). bool 0 FvwmScript 1 0 ( fifo ). bool 1 FvwmScript ( bool ). fifo .tmp-com-out-comId . FvwmScript fifo fifo . ( Parse ). FvwmScript-ComExample fvwm-script-ComExample.pl ( fvwm ). : ... . (BUGS) FvwmScript (crash ). (AUTHOR) Frederic Cordier ( or ). (CONTRIBUTOR) Eddy J. Gurney ( ). 2026-06-28 FVWMSCRIPT(1)