|
终于把vtwm的设置搞定了 呵呵
其实twm/vtwm设置好了 还是蛮好看的
下面分享一下心得
要想配置twm/vtwm
只要在/root (/home/username/) 下新建一个 文件即可 (twm是.twmrc vtwm是.vtwmrc)
如果配置失误,删除这个文件 就可以了,这样系统 将使用默认配置文件
默认配置文件的路径可以用 man twm 察看
下面是我的配置文件 .vtwmrc
(注:由于 twm和vtwm细小差别.部分配置选项可能在twm中出现异常,这个文件在vtwm中运行正常 ####表示vtwm专有的)
[code:1]
#
# Variables
#
NoGrabServer
RestartPreviousState
NoDefaults
ShowIconManager
SortIconManager
IconifyByUnmapping
RightHandSidePulldownMenus
NaturalAutoPanBehavior
NotVirtualGeometries
FixManagedVirtualGeometries
FixTransientVirtualGeometries
ButtonColorIsFrame
ShallowReliefWindowButton
SunkFocusWindowTitle
MoveDelta 3
ResizeRegion "NorthEast"
BorderWidth 6
BorderBevelWidth 2
ButtonBevelWidth 1
DoorBevelWidth 1
IconBevelWidth 2
IconManagerBevelWidth 1
InfoBevelWidth 2
MenuBevelWidth 2
TitleBevelWidth 1
VirtualDesktopBevelWidth 1
ClearBevelContrast 40
DarkBevelContrast 40
VirtualDesktop "5x2-0-0" 16
PanDistanceX 100
PanDistanceY 100
PanResistance 750
AutoPan 100
#字体设定 改成 -simsun-medium-r-*-*-14-*-*-*-*-*-*-* 应该可以显示中文 没试过:-(
TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuTitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
DoorFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
InfoFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
VirtualDesktopFont "-adobe-helvetica-medium-r-normal--*-75-*-*-*-*-*-*"
#
# Lists
#
SqueezeTitle
WarpCursor
#####下面的是vtwm专用的,因为vtwm比twm多了个虚拟桌面
#####这里设置的是移动虚拟桌面时,不一起移动的程序
NailedDown
{
"VTWM *"
"xclock"
"xload"
}
#这里是不显示标题的程序
NoTitle
{
"VTWM *"
"xclock"
"xload"
"Panel"
}
#####不在任务管理器里显示的程序
DontShowInDisplay
{
"VTWM *"
"xclock"
"xload"
}
#不在图标管理器里显示的程序
IconManagerDontShow
{
"VTWM *"
"xclock"
"xload"
}
#颜色设置 我想这是大多数人想要的吧
#粉红色=maroon
#gray是灰色,后面的数字是深浅
Color
{
DefaultBackground "maroon"#默认背景颜色
DefaultForeground "gray85"#默认前景颜色
BorderColor "grey70"#边框颜色
BorderTileBackground "gray60"#窗口标题边框背景颜色
BorderTileForeground "gray60"#窗口标题边框前景颜色
DoorBackground "maroon"
DoorForeground "gray85"
TitleBackground "maroon"#窗口标题背景颜色
TitleForeground "gray85"#窗口标题前景颜色
MenuBackground "gray85"#菜单背景
MenuForeground "black" #菜单前景
MenuTitleBackground "gray70"
MenuTitleForeground "black"
IconBackground "maroon"#图标背景
IconForeground "gray85"#图标前景
IconBorderColor "gray85"#图标边框
IconManagerBackground "gray60"#图标管理器背景
IconManagerForeground "black" #图标管理器前景
VirtualBackground "white" ####虚拟桌面背景
VirtualForeground "black" ####虚拟桌面前景
DesktopDisplayBackground "grey60"
DesktopDisplayForeground "grey85"
}
Monochrome
{
DefaultBackground "gray50"
DefaultForeground "gray85"
BorderColor "grey70"
BorderTileBackground "gray60"
BorderTileForeground "gray60"
DoorBackground "gray50"
DoorForeground "gray85"
TitleBackground "gray50"
TitleForeground "gray85"
MenuBackground "gray50"
MenuForeground "gray85"
MenuTitleBackground "gray70"
MenuTitleForeground "gray50"
IconBackground "gray50"
IconForeground "gray85"
IconBorderColor "gray85"
IconManagerBackground "gray50"
IconManagerForeground "gray85"
VirtualBackground "gray50"
VirtualForeground "black"
DesktopDisplayBackground "grey60"
DesktopDisplayForeground "grey85"
}
#
# Functions and Bindings
#
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 }
LeftTitleButton ":xpm:bar" = f.menu "arrange"
RightTitleButton ":xpm:dot" = f.iconify
RightTitleButton ":xpm:resize" = f.resize
#Button1 = : root : f.version #左键单击桌面 引发的操作
Button3 = : root : f.menu "main" #右键单击桌面 引发的操作
Button1 = : title : f.function "move-or-raise"
Button3 = : title : f.lower
Button1 = : frame : f.function "move-or-raise"
Button2 = : frame : f.resize
Button3 = : frame : f.iconify
Button1 = : door : f.enterdoor
Button2 = : door : f.namedoor
Button3 = : door : f.deletedoor
Button1 = : icon : f.function "move-or-iconify"
Button3 = : icon : f.menu "arrange"
Button1 = : iconmgr : f.iconify
Button3 = : iconmgr : f.warp
Button1 = : virtual | desktop : f.movescreen
#
# 菜单
#
#主菜单
menu "main"
{
" VTWM " f.title #标题
"System tools" f.menu "tools" #菜单项
"Multimedia" f.menu "media"
"Internet" f.menu "internet"
"Programming" f.menu "pro"
"Office" f.menu "office"
"File manager" f.menu "fm"
"Editor" f.menu "editor"
"Games" f.menu "game"
"" f.separator #分隔符
"mnt" f.menu "mnt"
"" f.separator
"Operations" f.menu "ops"
"Arrange" f.menu "arrange"
"" f.separator
"Power" f.menu "power"
"" f.separator
"Restart" f.restart #重起桌面
"Exit" f.quit #退出桌面
}
#子菜单项
menu "internet"
{
"Opera" f.exec "opera &" #执行命令 (注意:一定要加 &)
"Mozilla" f.exec "mozilla &"
}
menu "editor"
{
"Gedit" f.exec "gedit &"
}
menu "game"
{
"Lines" f.exec "glines &"
"Same GNOME" f.exec "same-gnome &"
"Mines" f.exec "gnomine &"
}
menu "fm"
{
"Rox" f.exec "rox &"
}
menu "office"
{
"AbiWord" f.exec "abiword &"
}
menu "tools"
{
#" Tools " f.title
"Xclock" f.exec "xclock -d &"
"Xload" f.exec "xload &"
"Xterm" f.exec "xterm &"
"System monitor" f.exec "gnome-system-monitor &"
"Stardict" f.exec "stardict &"
}
menu "media"
{
#" Multimedia " f.title
"Realplay" f.exec "realplay &"
"Xmms" f.exec "xmms &"
"CD player" f.exec "gnome-cd &"
}
menu "pro"
{
#" Programming " f.title
"Glade-2" f.exec "glade-2 &"
}
menu "mnt"
{
"mount U" f.exec "mount_msdosfs /dev/da0s1 /mnt/u"
"umount U" f.exec "umount /mnt/u"
"" f.separator
"mount floppy" f.exec "mount_msdosfs /dev/fd0 /mnt/floppy"
"umount floppy" f.exec "umount /mnt/floppy"
}
menu "power"
{
" Notice! " f.title
"reboot" f.exec "reboot"
"halt -p" f.exec "halt -p"
}
menu "ops"
{
#" Operations " f.title
"Auto Pan" f.autopan
"New Door" f.newdoor
"Snap Screen" f.snaprealscreen
"Static Icons" f.staticiconpositions
"Warp Snug" f.warpsnug
"Warp Visible" f.warpvisible
"" f.separator
"Show Icon Mgr" f.showiconmgr
"Hide Icon Mgr" f.hideiconmgr
"Show Desktop" f.showdesktopdisplay
"Hide Desktop" f.hidedesktopdisplay
"" f.separator
"Refresh" f.refresh
}
menu "arrange"
{
#" Arrange " f.title
"Autoraise" f.autoraise
"Raise" f.raise
"Lower" f.lower
"Nail" f.nail
"" f.separator
"Move" f.move #移动
"Size" f.resize #调整大小
"Iconify" f.iconify
"" f.separator
"Full Zoom" f.fullzoom
"Horiz Zoom" f.horizoom
"Vert Zoom" f.zoom #缩放
"" f.separator
"Left Title" f.squeezeleft
"Center Title" f.squeezecenter
"Right Title" f.squeezeright
"" f.separator
"Identify" f.identify #程序ID
"" f.separator
"Delete" f.delete #关闭
"Destroy" f.destroy #杀死
}
[/code:1] |
|