twm配置
用过很多WM,最复杂的还要数fvwm,twm是xorg自带的WM,很少有人用它,今天有点兴趣(PS:最主要的是它不用另外安装,而且还很小),就看了点相关的资料,找了几个现成的配置文件改了改,已适应我简单的需要,感觉还不错,现把配置文件~/.twmrc沾一下放在这里,以免以后忘了杂玩儿这玩意儿了~~~
PS:背景的实现是在~/.xinitrc中使用xsetroot -solid \#123456
NoGrabServer
#NoDefaults
RestartPreviousState
DecorateTransients
TitleFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"
#ClientBorderWidth 2
BorderWidth 3
ButtonIndent 2
NoHighlight
AutoRelativeResize
#DefaultBackground
FramePadding 0
#ForceIcons
NoRaiseOnMove
OpaqueMove
Zoom 500
# This is for hiding the ugly menubar in windows who dont need em.
NoTitle
{
# "x11amp" # x11amp, the winamp lookalike, http://x11amp.ml.org.
# "xlogo" # a must have
"xosview"
"xclock"
}
Color
{
BorderColor "gray85"
DefaultBackground "black"
DefaultForeground "gray85"
TitleBackground "gray40"
TitleForeground "gray10"
MenuBackground "#FFFFFF"
MenuForeground "#123456"
MenuTitleBackground "#123456"
MenuTitleForeground "#698B22"
IconBackground "black"
IconForeground "lightblue"
IconBorderColor "black"
IconManagerBackground "black"
IconManagerForeground "gray85"
PointerForeground "black"
PointerBackground "white"
}
#
# Define some useful functions for motion-based actions.
#
MoveDelta 1
Function "move-or-lower" { f.move f.deltastop f.lower }
Function "move-or-raise" { f.move f.deltastop f.raise }
Function "move-or-iconify" { f.move f.deltastop f.iconify }
#
# Set some useful bindings. Sort of uwm-ish, sort of
# simple-button-ish
#
Button1 = : root : f.menu "prg"
Button2 = : root : f.delete
Button3 = : root : f.menu "window"
Button1 = m : window|icon : f.function "move-or-lower"
Button2 = m : window|icon : f.iconify
Button3 = m : window|icon : f.function "move-or-raise"
Button1 = : title : f.function "move-or-raise"
Button2 = : title : f.raiselower
Button3 = : title : f.iconify
Button1 = : icon : f.function "move-or-iconify"
#Button2 = : icon : f.destroy
Button3 = : icon : f.iconify
Button1 = : iconmgr : f.iconify
Button2 = : iconmgr : f.destroy
Button3 = : iconmgr : f.iconify
# This is for the window bar
#LeftTitleButton "/usr/X11/include/bitmaps/checkmark.xbm" = f.delete
LeftTitleButton "/usr/X11R6/include/X11/bitmaps/xm_noenter16" = f.delete
#RightTitleButton "/usr/X11/include/bitmaps/menu12" = f.resize
#
# And a menus with the usual things
#
menu "prg"
{
"TWM" f.title
#"" f.nop
"Xterm" f.exec "xterm -sl 500 -bg black -fg white -name xterm@logicbaby.org &"
"rxvt" f.exec "rxvt -bg black -fg white -name rxvt@logicbaby.org &"
"" f.nop
"emacs" f.exec "emacs &"
"" f.nop
"Top" f.exec "xterm -bg black -fg white -e top &"
"" f.nop
"xman" f.exec "xman -rv &"
"xclock" f.exec "xclock -geometry 90x90-:0+0 &"
"xcale" f.exec "xcalc -rc &"
}
menu "window"
{
"X Windows" f.title
"Kill Window" f.destroy
"Delete Window" f.delete
"" f.nop
"Maximize" f.fullzoom
"Minimize" f.iconify
#"Resize" f.resize
"Move" f.move
#"Raise" f.raise
#"Lower" f.lower
"" f.nop
"Focus" f.focus
"Unfocus" f.unfocus
"Show Iconmgr" f.showiconmgr
"Hide Iconmgr" f.hideiconmgr
"" f.nop
"Screensaver" f.menu "screensaver"
"Redraw" f.refresh
"Restart" f.restart
"Quit" f.menu "quit"
}
menu "quit"
{
"Really Quit?" f.title
"No" f.nop
"Yes" f.quit
}
Icons
{
"XTerm" "/usr/X11R6/include/X11/bitmaps/Term"
"x11amp" "/usr/include/X11/bitmaps/xfm_au.xbm"
}
Cursors
{
Frame "left_ptr"
Title "left_ptr"
Icon "left_ptr"
IconMgr "left_ptr"
Move "fleur"
Resize "fleur"
Menu "hand1"
Button "hand2"
Wait "clock"
Select "dot"
Destroy "pirate"
}
使用时的效果图