# Point this to the image directory
PixmapDirectory "/root/ctwm-themes/img"
#
# Warp keys in 'vim style':
#
# alt-k/j      cycle window up/down
# alt-h/l      go to left/right workspace
# alt-w        pop up a small window menu, ie:
#   alt-w i      iconify window
#   alt-w q      quit window etc...

AutoRaise 
RaiseDelay 250
AutoRelativeResize
SqueezeTitle
BorderWidth 2
NoTitleHighlight

Color
{
	BorderColor		"grey65"
	DefaultBackground	"#05676b"
	DefaultForeground	"black"
	TitleBackground		"#ffcb00"
	TitleForeground		"black"
	MenuBackground		"grey80"
	MenuForeground		"black"
	MenuTitleBackground	"#dfab00"
	MenuTitleForeground	"black"
	IconManagerBackground	"grey90"
	IconManagerForeground	"black"
	IconManagerHighlight	"black"
        MapWindowCurrentWorkSpace {"yellow"}
#MapWindowDefaultWorkSpace {"black" "grey80"}
}

Cursors
{
	Frame		"top_left_arrow"
	Title		"top_left_arrow"
	Icon		"box_spiral"
	IconMgr		"top_left_arrow"
	Move		"fleur"
	Resize		"sizing"
	Menu		"sb_left_arrow"
	Button		"hand2"
	Wait		"watch"
	Select		"dot"
	Destroy		"pirate"
}

ForceIcons
IconifyByUnmapping
ShrinkIconTitles

IconManagerDontShow
{ 
"xclock"
"oclock"
"clock"
"xckmail"
"xbiff"
"xload"
"xeyes"
"perfmeter"
"WorkSpaceManager"
"Twm Door"
}

IconManagerGeometry "500x22+0-0" 7
IconManagerFont	"-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"
TitleFont "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*"
MenuFont "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*"
WorkspaceFont "-*-helvetica-medium-r-*-*-8-*-*-*-*-*-*-*"
MoveDelta 2
NoGrabServer
NoRaiseOnDeiconify
NoRaiseOnMove
NoRaiseOnResize
NoTitle
{
"xclock"
"oclock"
"clock"
"xckmail"
"xbiff"
"xload"
"xeyes"
"perfmeter"
"xlife"
"WorkSpaceManager"
"TWM Icon Manager"
}

RestartPreviousState
ShowIconManager
ShowWorkSpaceManager
UsePPosition "on"
WarpCursor
WorkSpaceManagerGeometry        "190x22-0-0" 6	
StartInMapState

WorkSpaces
{
	"1"	{"grey60" "black" "grey60" "black" "xpm:bggrey.xpm"}
	"2"	{"grey60" "black" "grey60" "black" "xpm:bggreen.xpm"}
	"3"	{"grey60" "black" "grey60" "black" "xpm:bgblue.xpm"}
	"4"	{"grey60" "black" "grey60" "black" "xpm:bgred.xpm"}
	"5"	{"grey60" "black" "grey60" "black" "xpm:bggrey.xpm"}
	"6"	{"grey60" "black" "grey60" "black" "xpm:bgblue.xpm"}
}

OccupyAll
{
	"xclock"
	"oclock"
	"clock"
	"TWM Icon Manager"
}

# *************************** BINDINGS ***************************

#
# Define some useful functions for motion-based actions.
#
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 }

#Button = KEYS : CONTEXT : FUNCTION
#----------------------------------

Button1 = : root : f.menu "programs"
Button2 = : root : f.menu "TwmWindows"
Button3 = : root : f.menu "windows"

# These conflict with XEmacs mouse-key bindings:
#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.menu "titlemenu"

Button1 = : frame : f.resize
Button2 = : frame : f.resize
Button3 = : frame : f.resize

Button1 = : icon : f.function "move-or-iconify"
Button2 = : icon : f.iconify

Button1 = : iconmgr : f.iconify
Button2 = : iconmgr : f.iconify

# WARPKEYS ###############################

"l" = meta : all : f.rightworkspace
"h" = meta : all : f.leftworkspace "k" = meta : all : f.circleup
"j" = meta : all : f.circledown

"w" = meta : all : f.menu "windownavi"

# TITLE BUTTONS ###########################

NoDefaults
TitleButtonBorderWidth 0
ButtonIndent 0
LeftTitleButton "xpm:iconify.xpm" {
  Button1 : f.iconify
  Button2 : f.delete
  Button3 : f.destroy
}
RightTitleButton "xpm:maximize.xpm" {
  Button1 : f.fullzoom
  Button2 : f.zoom
  Button3 : f.hzoom
}

BorderResizeCursors



# *************************** MENUS ***************************

menu "programs"
{
"Programs"		f.title

"xterm"		!"xterm -sl 1000 -name $$ -geometry 80x25 -e bash &"
"rxvt"          !"rxvt -sl 1024 +ut -sb +sr -fn 6x13 -bg rgb:bc/a8/9e -e tcsh&"
"netscape"	!"netscape -geometry 1000x880+0+0 -install &"
"news"	        !"netscape -mail&&"
"Graphics"	f.menu "graphics"
"Maths"		f.menu "maths"
"Tools"		f.menu "tools"
"Remotes"       f.menu "remotes"
}

menu "windownavi"
{
"Window navi" f.title

"i Iconify" f.iconify
"q Close" f.delete
"m Maximize" f.fullzoom
"h Maximize horiz." f.hzoom
"j Maximize vert." f.zoom
"r Resize" f.resize
"l Lower" f.lower
}

menu "graphics"
{
"Graphics"	f.title

"acroread"	!"acroread &"
"ghostview"     !"ghostview -a4 -magstep -1 -geometry +0+0 &"
"gimp"		!"gimp &"
"imagemagick"	!"display &"
"xfig"          !"xfig -paper_size A4 -exportLanguage eps &"
"xv"		!"xv &"
}

menu "maths"
{
"Maths"		f.title

"matlab"	!"/usr/bin/wine -winver win95 -managed /c/MATLABR11/bin/matlab.exe  &"
"scilab"        !"scilab&"
"xcalc"         !"xcalc &"
}

menu "tools"
{
"Tools"		f.title

"xload"         !"xload -geometry 100x50-50+0 &"
"xlock"         !"xlock -mode random -nice 19 &"
"xmag"          !"xmag &"
"xxgdb"         !"xxgdb &"
}

menu "remotes"
{
"Remotes"	f.title

"xftp"          !"xftp &"
"vubis"         !"xterm -e rlogin vubis.tue.nl &"
"opc nijmegen"  !"xterm -e rlogin opc.kun.nl &"
"vitellius"     !"xterm -e rlogin vitellius.mbfys.kun.nl -l josvanr &"
"xs4all"        !"xterm -e rlogin xs4all.nl -l josvanr &"
"dse"           !"xterm -e rlogin dse.nl -l josvanr &"
"ftp xs4all"    !"xterm -e ftp ftp.xs4all.nl &"
"ftp dse"       !"xterm -e ftp dse.nl &"
}

Function "showWSMmap" { f.showWorkspaceMgr f.setmapstate }

menu "windows"
{
"Windows"		f.title

"Pin menu"		f.pin
"Occupy"		f.occupy
"Occupy All"		f.occupyall
"Button State"		f.setbuttonsstate
"Map State"		f.setmapstate
"ShowWorkSpaceMgr"	f.function "showWSMmap"
"HideWorkSpaceMgr"	f.hideWorkspaceMgr
 "Iconify"		f.iconify
 "Resize"		f.resize
 "Move"		f.move
 "Raise"		f.raise
 "Lower"		f.lower
 "Focus"		f.focus
 "Unfocus"		f.unfocus
 "Show IconMgr"	f.showiconmgr
 "Hide IconMgr"	f.hideiconmgr
"Vanish"		f.vanish
"Kill"			f.destroy
"Delete"		f.delete
"Refresh"		f.refresh
"Info"			f.identify
"Restart"		f.restart
"Exit X Windows"	f.menu "exit X"
}

menu "titlemenu"
{
"Window options"		f.title

"Occupy"		f.occupy
"Occupy All"		f.occupyall
 "Iconify"		f.iconify
 "Resize"		f.resize
 "Move"		f.move
 "Raise"		f.raise
 "Lower"		f.lower
 "Focus"		f.focus
 "Unfocus"		f.unfocus
"Vanish"		f.vanish
"Kill"			f.destroy
"Delete"		f.delete
"Info"			f.identify
}
menu "exit X"
{
"Exit X"			f.title

"Select if you're SURE!"	f.quit
}
