·¢ÐÅÈË: hanyu.bbs@bbs.swjtu.edu.cn (²»ÔÙ°®Äã¡£¡£), ÐÅÇø: cnunix
±ê Ìâ: 5
·¢ÐÅÕ¾: ½õ³ÇæäÕ¾ (Mon Aug 31 04:21:23 1998)
תÐÅÕ¾: Lilac!ustcnews!news.zsu.edu.cn!swjtunews!swjtubbs
³ö ´¦: xnjd21.swjtu.edu.cn
µÚÈýÕÂ X Window Manager -- FVWM
»ù±¾µÄ»úÆ÷×é̬É趨Íê³ÉÖ®áá, ½ÓÏÂÀ´±ãÊǽϾ«²ÊµÄ X Window Manager (ÒÔϼò³Æ
XWM)µÄ²¿·ÝÁË , ÒòΪËû¾ö¶¨ÁËÄãµÄ X Window µÄ»Ãæ, °üÀ¨Æô¶¯»Ãæ, ±³¾°¸ùÊÓ´°
(root window)µÄͼ°¸É«²Ê, ¸÷Ôª¼þµÄ×ÖÐÍÓëÉ«²Ê, ¼° Popup Menu , GoodStuff,
Stratup program.. µÈ,¿ÉÒÔÒÀ¸öÈ˵ÄϲºÃ¼ÓÒÔ±àÐÞ, ΨһÃÀÖв»×ãµÄÊÇ XWM µÄÉ趨µµ
ÊÇÒ»¸ö text file , Ëû²»Ïñ MS-Window V3.1 Ò»°ã, ì¶(³Ìʽ¹ÜÀíÔ±//Ö÷Ⱥ×é//¿ØÖÆ̨)
ÖпÉÒÔÕÒµ½ËùÒªÉ趨µÄͼʾ, °üÀ¨ »¬Êó, ×ÀÃæ..µÈ, µ« X Window ÈÔÈ»ÓÐ±È MS-Window
¸üÎüÒýÈËÃǵĵط½, ´ýÎÒÃÇÀ´ÍæË÷¡£INITIALLATIVE / CONFIGURATIVE FILE
ÏÖÔÚÎÒÃÇÒÔ FVWM ÕâÒ»¸ö XWM À´×öÒ»¸ö½éÉÜ, Èô»¹ÓÐÓ¡Ïó, ¸Õ²Å±ÊÕßÓÐÌá¹ýÉ趨µµÎª
text file, ¶ø´Ë text file µÄµµÃûΪºÎÄØ? ÓÖ·ÅÔںδ¦ÄØ? ÕâÊÇÎÒÃÇÒªÏÈÁ˽âµÄ¡
£(1) $HOME/.fvwmrc
±ãÊÇÔÚÄãµÄ Home Directory Ï嵀 .fvwmrc ÕâÒ»¸öµµ°¸, (Ò»°ãʹÓÃÕßÓ¦¸ÃûÓиÃ
µµ), ¶øÈôÄ㲢ûÓд˵µ°¸µÄ»°, XWM ±ã»áȥѰÕÒ FVWM Ô¤ÉèµÄµµ°¸, ¼´
(2) /usr/lib/X11/fvwm/system.fvwmrc
´ËµµÎª FVWM XWM µÄÔ¤ÉèÉ趨µµ, ¶øÈôÄ㲻ϲ»¶¸ÃÉ趨µµËù±íÏÖµÄÊÓ´°µÄ»°, Äã¿É
ÒÔ¸´ÖÆÒ»·Ýµ½ÄãµÄ Home Directory Ï嵀 .fvwmrc µµ°¸Ö®áá, ÔÙÐ޸ļ´¿É¡£
cp /usr/lib/X11/fvwm/system.fvwmrc $HOME/.fvwmrc
CONFIGURATION
COLOR
É趨ÊÓ´°¸÷Ôª¼þ֮ɫ²Ê¡£¹Øì¶É«²ÊµÄÃèÊöÓжþÖÖ·½Ê½
(1) ÀûÓÃ Color Name:
(2) ÀûÓÃ RGB Öµ:
¾ÙÒ»¸öÀý×Ó, ¼ÙÉèÎáÈËÒªÉ趨 Popup Menu µÄ±³¾°É«Îª light sky blue, ¶øÎÒÃÇÒÑ
Öª(×¢Ò»)
RGB Color Name
135 206 250 (Ê®½øλ) light sky blue
87 CE FA (Ê®Áù½øλ) -
Ôò²ÎÊýÉ趨Ϊ MenuBackColor light sky blue »òÕß
MenuBackColor #87CEFA (×¢Ò») ÖÁì¶ÓжàÉÙ¿ÉÓÃµÄ Color Name,
¶øÆä RGB ÖµÓÖΪºÎ? ÎÒÃÇ¿É͸¹ý
"showrgb" Õâ¸ö Command µÃÖª¡£
FONT
É趨¸÷Ôª¼þÖеÄ×ÖÐÍ, Èç Popup Menu, window title, icon .. µÈ¡£
ÀýÈç Menu µÄ×ÖÐͲÎÊýÉ趨
Font -adobe-helvetica-medium-r-*-*-14-*-*-*-*-*-*-*-
¶øÆäËû×ÖÐÍ¿É͸¹ý "xlsfonts" command µÃÖªÆäÃû³Æ, ÒÔ×ÊʹÓá£
˵Ã÷: Ò»°ãµÄ×ÖÐÍÉ趨, ͨ³£²»×ö¸ü¶¯, ¶øÔÚÆô¶¯ xterm ʱ, ΪʹÆä×ÖÐÍ´óÒ»µã,
¿ÉÔÚÃüÁîÁÐÖÐ×öÈçϵÄÐ޸ļ°¼üÈë:
xterm -fn 10x20 & ÖÁì¶ÒªÖ´ÐÐ cxterm (chinese terminal), ÐèÒªÖÐÎÄ×ÖÐÍ, ÈçÏÂ:
cxterm -fh taipeik24 -fn 12x24 & ^^^^^^^^^^^^^
FOCUS STUFF
Çл»¡¸×÷ÓÃÊÓ´°¡¹µÄ·½·¨: (1) AutoRaise delay
µ±»¬ÊóÖ¸±êÍ£ÁôÔÚÒ»¸öÊÓ´°Öг¬¹ýÁË delay (millisecond) áá,
±ã»á×Ô¶¯ÇÐ »»¸ÃÊÓ´°Îª×÷ÓÃÊÓ´°(FOCUS)¡£ Èç
AutoRaise 750 (2) ClickToFocus
ÀûÓû¬Êóì¶ÊÓ´°µÄÈÎÒ»²¿Î»µãÒ»ÏÂ(click), ¼´¿ÉÇл»×÷ÓÃÊÓ´°¡£Èç
ClickToFocus
WINDOW PLACEMENT
Random Placement µ±Ê¹ÓÃÕßÆô¶¯Ò»¸öÓ¦ÓóÌʽÊÓ´°áá, XWM »áÔÚ¸ùÊÓ´°ÖÐ
µÄÈÎÒ»¸öλ×Ó, ·ÅÖà ¸ÃÓ¦ÓóÌʽÊÓ´° ¡£
Smart Placment ÔÚ·ÅÖÃÊÓ´°Ê±, »áÏÈÔÚ¸ùÊÓ´°ÖÐÕÒÒ»¸ö¿ÕµÄµØ·½·ÅÖÃ,
¶øÈôûÓеĻ°, ÔÙʹÓÃ
User Placement »ò Random Placement¡£½¨ÒéÉè´Ë²ÎÊý¡£
PAGER
DeskTopSize 3x3 É趨 Pager µÄ´óС¡£ DeskTopScale É趨 Pager µÄÏÔʾ±ÈÀý¡£
FUNCTION
ºÏ³Éº¯ÊýµÄ¶¨Òå, Ò²¾ÍÊÇ×éÖ¯ FVWM µÄÄÚ¶¨º¯Êý, ¸øÖ®ááµÄ»¬Êó¼°°´¼üÆ¥Åä
(bound)Ö®Óá£
¾ÙÒ»¸öÀý×ÓÀ´×÷˵Ã÷, ÏÂÃæÕâ¸ö Function ÊÇ»¬ÊóµÄ×ó¼üÏà¶Ôì¶ÊÓ´°±êÌâÀ¸µÄÇé¿ö:
Function "Move-or-Raise" # º¯ÊýÃû³Æ, ÐèÓÃ"Ë«ÒýºÅ"À¨ÆðÀ´
Move "Motion" ^^^^ ^^^^^^^^
©¦ ʼþµÄÐÍ̬: ÕâÀïÖ¸µÄÊÇ¡¸ÍÏÒ·¡¹¡£ ©¸ ÄÚ¶¨º¯Êý: ÕâÀïÖ¸µÄÊÇ¡¸Òƶ¯ÊÓ´°¡¹¡£
Raise "Motion" ^^^^^ ÄÚ¶¨º¯Êý: »½ÐÑÊÓ´°
Raise "Click" ^^^^^^^
ʼþÐÍ̬: µãһϠRaiselower "DoubleClick"
^^^^^^^^^^ ^^^^^^^^^^^^^ ©¦ ʼþÐÍ̬: µã¶þÏÂ
©¸ ÄÚ¶¨º¯Êý: »½ÐѲ¢ÇÒ½«ÊÓ´°ÒÆÖÁ×îϲã»ò×îÉϲã
EndFunction # ½áÊø Function µÄ¶¨Òå £® £®
Mouse 1 T A Function "Move-or-Raise" £®
ÉÏÃæµÄÉ趨±íʾµ±»¬ÊóµÄ°´Å¥ 1 (×ó¼ü), ÔÚÊÓ´°µÄ±êÌâλÖñ»°´ÁËÖ®áá, FVWM ±ã»á
µÈ´ý 150 msec, ¼ì²é×ó¼üÊÇ·ñ±»ÊÍ·ÅÁËûÓÐ? Èç¹ûûÓÐ, ±ãÖ´ÐÐ Move µÄ¶¯×÷, µ±
Íê³ÉÁË Move µÄ¶¯×÷áá, ±ã»½ÐÑ(Raise)¸ÃÊÓ´°¡£¶øÈç¹ûÊÍ·ÅÁË, FVWM ±ã»áÒÔÁíÒ»¸ö
150 msec, µÈ´ýµÚ¶þ´ÎµÄ°´Å¦, Èç¹ûÖ»ÊǵãÒ»ÏÂ, ÔòÖ´Ðл½ÐѵĶ¯×÷; ÈôÊǵã¶þÏÂ,
Ôò½«ÊÓ´°»½ÐÑáá²¢ÇÒÒÆÖÁ×îϲã»ò×îÉϲ㡣
ÔÚÕâЩ Function µ±ÖÐ, ´æÔÚ¶þ¸öÌØÊâµÄ Function, ·Ö±ðÊÇ InitFunction ¼°
RestartFunction¡£µ± FVWM ÔÚÈκÎÒ»¸ö X session µÚÒ»´Î±»Æô¶¯Ê±, InitFunction
»á±»ºô½Ð, Ëû±»ÓÃÀ´Æô¶¯ modules, É趨±³¾°µÄ»¨Ñù, ¼°Ò»Ð©Æô¶¯µÄÓ¦ÓóÌʽ¡£¶ø
RestartFunction ÔòÊǵ± FVWM ±»ÖØÐÂÆô¶¯Ê±±»ºô½Ð, Æä×÷ÓÃͬ InitFunction ,
µ«²»°üº¬Æô¶¯µÄÓ¦ÓóÌʽ¡£
ÒÔÏÂÔòÊÇ InitFunction µÄÀý×Ó: Function "InitFunction"
Module "I" FvwmBanner # Æô¶¯»Ãæ
Module "I" xpmroot /usr/lib/X11/pixmaps/hpterm.xpm &
# É趨±³¾°»¨Ñù
Module "I" GoodStuff # Æô¶¯ GoodStuff
Module "I" FvwmPage 0 3 # Æô¶¯ Pager
Desk "I" 0 2 # Çл»ÖÁµÚ¶þ¸ö Page
Exec "I" exec rxvt -T mail -e elm &
# Æô¶¯Ò»¸ö VT100 terminal,
¸øÓè mail µÄ±êÌâ, ²¢ÇÒÖ´ÐÐ elm
Wait "I" rxvt # µÈ´ý rxvt µÄÍêÈ«Ö´ÐÐ
Desk "I" 0 0 EndFunction
ʹÓÃÕß¿ÉÒÔÔÚÕâ¸ö Function ÄÚÈÎÒâµÄ¼ÓÈë¼°ÐÞ¸Ä, ʹÓÃÕßËùÏëÒªµÄÓ¦ÓóÌʽ,
ì¶Ò»
¿ªÊ¼½øÈë X window µÄʱºò, ±ã×Ô¶¯Ö´ÐÐ, ¿É½ÚʡʹÓÃÕß²»ÉÙµÄʱ¼ä¼°´øÀ´·½±ã¡£
POPUP MENU
¡õÀý Popup Menu µÄ¶¨Òå, ¸øÖ®ááµÄ»¬ÊóÓë°´¼üÆ¥ÅäʹÓᣠ¾ÙÒ»¸öÀý×Ó Popup "Window Ops"
# ÄÚ½¨º¯Êý ì¶ Menu ÖÐÏÔʾ ËùÐèµÄÃüÁî»ò²ÎÊý# µÄÃû³Æ
Title "Window Ops" # Menu µÄ±êÌâ
Function "Move" Move-or-Raise¡¡¡¡¡¡£®¡¡¡¡¡¡£® Nop "" .
. Exec "Xterm" exec /usr/bin/X11/xterm -fn 7x14 &
. # ˵Ã÷: ±íʾµ±Ê¹ÓÃÕßÑ¡ÔñÁË [Window
# Ops/Xterm]Ö®áá, ±ã»áÖ´ÐÐ xterm -fn
# 7x14 & ¡£ EndPopup
ÖÁì¶ÓжàÉÙ¡¸ÄÚ½¨º¯Êý¡¹(°üº¬ Module, Desk, Exec, Wait, Nop, Title,
Function,.. µÈ) ¿É²éÔÄ FVWM µÄ Manual, ¼°ÔÚÃüÁîÁÐÖÐÖ´ÐÐ "man fvwm", µ±ÖÐ ÓÐÏêϸµÄ¼ÇÔØ¡£
MOUSE
¶¨Ò廬ÊóµÄ Bindding¡£ ¸ñʽ Mouse Button Context Modifiers Function ²ÎÊý Button
1 ×ó¼ü 2 Öмü 3 ÓÒ¼ü Context R for root window
W for application window T for window title
S for window side, top, button bar F for window frame # ÊÓ´°µÄת½Ç´¦
I for icon window 0-9 for title bar button
1 3 5 7 9 0 8 6 4 2 ©°©Ð¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©Ð©Ð©´
©¸©Ø¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª©Ø©Ø©¼ Modifier N for no modifier C for control
S for shift M for meta A for any modifier # ¿ÉͬʱÅäºÏ¼üÅÌÉϵŦÄÜ°´¼ü
Function FVWM µÄÄÚ½¨º¯Êý¡£ ÀýÈç: Mouse Button Context Modif Function
¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª
Mouse 1 R A Popup "Utilites"
Mouse 2 R A Popup "Window Ops"
Mouse 3 R A WindowList
±íʾʹÓÃÕßÔÚ¸ùÊÓ´°ÖÐ, °´×¡×ó¼üʱ, »áÓÐ Utilites µÄ Popup Meun, Õâʱʹ
ÓÃÕß¿ÉÒÀÐèÒª, Ñ¡ÔñÆäÖеÄijÏÄÜÀ´Ö´ÐС£¶ø Utilites Menu ¿ÉÓÉʹÓÃÕß×Ô
ÐÐÐÞ¸Ä , ¿É½«³£ÓõÄÓ¦ÓóÌʽ, ÖÃì¶ Menu ÖÐ, Èç´ËÒ»À´, ±ã²»ÐèÒªÔÚÃüÁîÁÐ
ÖмüÈëÃüÁî, ÊǸöºÜ·½±äµÄ×ö·¨, ¶ø MS-Window ±ãÎÞ·¨ÌṩÈç´ËµÄ¹¦ÄÜ¡£
GOODSTUFF
¡õÀý ¸Ã Module Ìṩһ¸ö°´Å¥µÄ´°¸ñ(panel), ·ÅÖÃÔÚ X window µÄ¸ùÊÓ´°ÖС£×¢Òâ:
GoodStuff Ö»ÓÐÔÚ FVWM ÊÓ´°¹ÜÀíϵͳÖвÅÓÐ×÷Óᣠ¸ñʽ *GoodStuff label icon command ÀýÈç
ÈôʹÓÃÕßÏëÒªÔÚ¸ùÊÓ´°ÖÐÓÐÒ»¸ö News µÄ°´Å¥(´°¸ñ, panel), ֻҪʹÓÃÕßµãһϸÃ
°´Å¦ , ±ã¿ÉÖ±½ÓÆô¶¯Ò»¸ö News µÄÊÓ´°, ÒÔ¹©Ê¹ÓÃÕ߲鿴»òÕÅÌù POST, ÔòʹÓÃÕß ¿ÉÈç´Ë×ö:
*GoodStuff News rterm.xpm Exec "News" cxterm -T News -fh taipeik20 \
-fn 10x20 -e tin -q & ˵Ã÷: ´ËÄËÐÐÃüÁî, ²»¿ÉÖжϡ£
Õâ±íʾ¸úÊÓ´°ÖÐ, »áÓÐÒ»¸ö°´Å¥, ÆäÖбêʾÖø News, ²¢ÓÐÖն˻úµÄͼÑù; µ±
ʹÓÃÕßµãÒ»ÏÂʱ, Ëû±ã»áÆô¶¯ cxterm (ÒòΪ News ÓÐÖÐÎÄ), ÇÒÖ±½ÓÖ´ÐÐ tin -q ¡£ ÆäËûÀý×ÓµÄÈçÏÂ:
*GoodStuff Kill rbomb.xpm Destroy ^^^^^^^
ɾ³ýËùÖ¸¶¨µÄÊÓ´°Ó¦ÓóÌʽ(process)¡£
*GoodStuff Oz rterm.xpm Exec "Oz" xterm -T Oz -fn 10x20 \
-e telnet oz.pool.nthu.edu.tw & ˵Ã÷: ÔÚ±¾ÎļþµÄ×îááÓÐÒ»¸ö¡õÀý,¿É¹©¸÷λ×÷Ϊһ¸ö²Î¿¼¡£
·µ»ØĿ¼
--------------------------------------------------------------------------------
--
¡ù ÐÞ¸Ä:£®hanyu ÓÚ Aug 31 21:21:23 Ð޸ı¾ÎÄ£®[FROM: 192.168.8.170]
¡ù À´Ô´:£®½õ³ÇæäÕ¾ bbs.swjtu.edu.cn£®[FROM: 192.168.8.170]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º203.706ºÁÃë