# .ctwmrc -*- fundamental -*- # # ctwm configuration file # # By Rob Funk define(`IfProgramExists',`syscmd(which $1 >/dev/null 2>&1)ifelse(sysval,0,`$2',`#$1 not found')') IfProgramExists(`elmme+',`define(elm,elmme+)') IfProgramExists(`mutt',`define(elm,mutt)') ifdef(`XTERM',`#',`IfProgramExists(`rxvt',`define(XTERM,`rxvt')#rxvt')') ifdef(`XTERM',`#',`IfProgramExists(`ansi_xterm',`define(XTERM,`ansi_xterm')#ansi_xterm')') ifdef(`XTERM',`#',`IfProgramExists(`color_xterm',`define(XTERM,`color_xterm')#color_xterm')') ifdef(`XTERM',`#',`IfProgramExists(`color-xterm',`define(XTERM,`color-xterm')#color-xterm')') ifdef(`XTERM',`#',`define(XTERM,`xterm')#xterm') # Get rid of presets (mainly the default titlebar buttons) NoDefaults #PixmapDirectory "/usr/X11/lib/X11/twm/images:/usr/include/X11/pixmaps/:/usr/include/X11/bitmaps/" IconDirectory "/usr/openwin/include/X11/bitmaps/:/usr/dt/include/bitmaps/:/usr/X11/include/X11/bitmaps/:/usr/local/X11/include/bitmaps" # Built-in pixmaps: # :xpm:menu :xpm:dot :xpm:resize :xpm:bar # :xpm:vbar :xpm:iconify :xpm:resize :xpm:box # :xlogo :iconify :resize LeftTitleButton ifelse(COLOR,Yes,`":xpm:iconify"',`"menu8"') = f.menu "WindowOps" #LeftTitleButton ":xlogo" { # Button1 : f.deleteordestroy # Button2 : f.delete # Button3 : f.destroy #} RightTitleButton ifelse(COLOR,Yes,`":xpm:dot"',`":iconify"') { Button1 : f.iconify Button2 : f.raiselower Button3 : f.squeeze } RightTitleButton ifelse(COLOR,Yes,`":xpm:box"',`"box6"') { Button1 : f.fullzoom # full-screen Button2 : f.zoom # full-vertical Button3 : f.horizoom # full-horizontal } RightTitleButton ":xlogo" { Button1 : f.deleteordestroy Button2 : f.delete Button3 : f.destroy } DecorateTransients RestartPreviousState # I like the lucida sans serif font TitleFont "-*-lucida-bold-i-normal-sans-*-120-*-*-*-*-iso8859-*" ResizeFont "-*-lucida-bold-r-normal-sans-*-120-*-*-*-*-iso8859-*" MenuFont "-*-lucida-medium-r-normal-sans-*-120-*-*-*-*-iso8859-*" IconFont "-*-lucida-bold-r-normal-sans-*-100-*-*-*-*-iso8859-*" IconManagerFont "-*-lucida-medium-r-normal-sans-*-100-*-*-*-*-iso8859-*" #ClientBorderWidth ShowWorkSpaceManager ReverseCurrentWorkspace StartInMapState #ReallyMoveInWorkspaceManager DontWarpCursorInWMap ShowIconManager ForceIcons #StayUpMenus ifelse(COLOR,No,`#',UseThreeDMenus) ifelse(COLOR,No,`#',UseThreeDTitles) ifelse(COLOR,No,`#',UseThreeDIconManagers) #ifelse(COLOR,No,`#',UseThreeDBorders) ifelse(COLOR,No,`#',UseThreeDWMap) ifelse(COLOR,No,NoMenuShadows,`#') BorderResizeCursors SunkFocusWindowTitle #UseSunkTitlePixmap ifelse(COLOR,No,`#',NoTitleHighlight) #SqueezeTitle WarpUnmapped #WarpToDefaultMenuEntry #Zoom CenterFeedbackWindow NoShowOccupyAll BorderWidth 2 #BeNiceToColormap # what's more important, available colors or nice 3D? IconifyByUnmapping # don't put the actual icon on the screen NoIconTitle #AutoRelativeResize OpaqueMove RandomPlacement # No animated pixmaps AnimationSpeed 0 IconManagerGeometry "200x100+0+0" 2 WorkspaceManagerGeometry "93x70+0-0" 2 WorkSpaces { "One" { ifelse(COLOR,No,`"gray" "black" "gray" "black" "gray"', `"SteelBlue" "white" "SteelBlue" "white"') } "Two" { ifelse(COLOR,No,`"gray" "black" "gray" "black" "gray"', `"DeepSkyBlue3" "white" "DeepSkyBlue3" "white"') } "Three" { ifelse(COLOR,No,`"gray" "black" "gray" "black" "gray"', `"DarkSlateBlue" "white" "DarkSlateBlue" "white"') } "Four" { ifelse(COLOR,No,`"gray" "black" "gray" "black" "gray"', `"MidnightBlue" "white" "MidnightBlue" "white"') } } AutoOccupy Occupy { # Give these their own space Window "Netscape" {"Three"} Window "hotjava" {"Three"} Window "amaya" {"Three"} Window "unimwm" {"Two"} # These are for Netscape Calendar Window "NetscapeCalendar Sign-In" {"One"} Window "Netscape Calendar Sign-In" {"One"} Window "NetscapeCalendar" {"Two"} Window "Netscape Calendar" {"Two"} # starting emacs with "-name EmacsMain" will force it to workspace 4 # (that way other copies can go anywhere) Window "EmacsMain" {"Four"} } Monochrome { BorderColor "black" DefaultBackground "white" DefaultForeground "black" TitleBackground "white" TitleForeground "black" MenuBackground "black" MenuForeground "white" MenuTitleBackground "white" MenuTitleForeground "black" IconManagerBackground "black" IconManagerForeground "white" } Color { BorderColor "gray40" BorderTileBackground "gray70" BorderTileForeground "gray70" DefaultBackground "maroon" #DefaultBackground "gray41" DefaultForeground "gray85" TitleBackground "maroon" #TitleBackground "gray41" TitleForeground "gray85" MenuBackground "maroon" #MenuBackground "gray41" MenuForeground "gray85" MenuTitleBackground "gray70" MenuTitleForeground "maroon" #MenuTitleForeground "gray41" IconBackground "maroon" #IconBackground "gray41" IconForeground "gray85" IconBorderColor "gray85" IconManagerBackground "maroon" #IconManagerBackground "gray41" IconManagerForeground "gray85" } #SaveColor { # "SteelBlue" # "DeepSkyBlue3" # "DarkSlateBlue" # "MidnightBlue" # BorderColor # BorderTileBackground # TitleBackground # TitleForeground #} IconManagerDontShow { "WorkSpaceManager" "xbiff" "xbuffy" "xload" "xclock" "oclock" "xdaliclock" "xeyes" "xsysinfo" "xconsole" "toolchest" "xmcd" "workman" } NoTitle { "TWM Icon Manager" "WorkSpaceManager" "xbiff" "xbuffy" "xload" "xclock" "oclock" "xdaliclock" "xeyes" "xsysinfo" "xconsole" "toolchest" "xmcd" "workman" "kscd" "knotes" } NoBorder { "TWM Icon Manager" "WorkSpaceManager" "xbiff" "xbuffy" "xload" "xsysinfo" "xclock" "oclock" "xdaliclock" "xeyes" "xconsole" "toolchest" "xmcd" "workman" "kscd" "knotes" } NoHighlight { "TWM Icon Manager" "WorkSpaceManager" "xbiff" "xbuffy" "xload" "xsysinfo" "xclock" "oclock" "xdaliclock" "xeyes" "xconsole" "toolchest" "xmcd" "workman" "kscd" } DontIconifyByUnmapping { "WorkSpaceManager" "xbiff" "xbuffy" "xload" "xsysinfo" "xclock" "oclock" "xdaliclock" "xeyes" "xconsole" "toolchest" } OccupyAll { "Reminders" # for Netscape Calendar Manager "Please Wait" # ditto "TWM Icon Manager" "xbiff" "xbuffy" "xload" "xsysinfo" "xclock" "oclock" "xdaliclock" "xeyes" "xconsole" "toolchest" } # # Define some useful functions for motion-based actions. # MoveDelta 3 Function "move-or-lower" { f.move f.deltastop f.lower } Function "move-or-raise" { f.move f.deltastop f.raise } Function "move-or-raiselower" { f.move f.deltastop f.raiselower } Function "move-or-iconify" { f.move f.deltastop f.iconify } Function "resize-or-raise" { f.resize f.deltastop f.raise } Function "resize-or-raiselower" { f.resize f.deltastop f.raiselower } # The normal way to lock the screen Function "Lock" { ! "xlock -nice 20 -mode random &" } # # Bindings # Button1 = : root : f.menu "Utilities" Button2 = : root : f.menu "Applications" Button3 = : root : f.menu "TwmWindows" Button1 = m : window|title|icon : f.movepack Button2 = m : window|title|icon : f.raiselower Button3 = m : root|window|title|icon : f.menu "WindowOps" Button1 = : frame : f.function "resize-or-raise" Button2 = : frame : f.function "resize-or-raiselower" Button3 = : frame : f.function "resize-or-raiselower" Button1 = : title : f.function "move-or-raise" Button2 = : title : f.raiselower Button3 = : title : f.squeeze # like double-clicking on titlebar in MacOS 7.x Button1 = : icon : f.function "move-or-iconify" Button2 = : icon : f.iconify Button3 = : icon : f.menu "WindowOps" Button1 = : iconmgr : f.iconify Button2 = : iconmgr : f.iconify Button3 = : iconmgr : f.menu "WindowOps" # Make changing workspaces like changing Linux virtual consoles "F1" = m : all : f.gotoworkspace "One" "F2" = m : all : f.gotoworkspace "Two" "F3" = m : all : f.gotoworkspace "Three" "F4" = m : all : f.gotoworkspace "Four" "F5" = m : all : f.gotoworkspace "Five" "F6" = m : all : f.gotoworkspace "Six" "F7" = m : all : f.gotoworkspace "Seven" "F8" = m : all : f.gotoworkspace "Eight" "F9" = m : all : f.gotoworkspace "Nine" "Left" = m : all : f.leftworkspace "Right" = m : all : f.rightworkspace "Up" = m : all : f.upworkspace "Down" = m : all : f.downworkspace # For windows addicts "F4" = c : window|title|icon|frame : f.deleteordestroy # # And a menu with the usual things menu "defops" { "Default Menu" f.title "----------" f.pin "" f.separator "Occupy" f.occupy "Occupy All" f.occupyall "Iconify" f.iconify "Refresh" f.refresh "Vanish" f.vanish "Info" f.identify "" f.separator "Resize" f.resize "Move" f.move "Adopt Window" f.adoptwindow "Raise" f.raise "Lower" f.lower "" f.separator "Focus" f.focus "Unfocus" f.unfocus "" f.separator "Show Iconmgr" f.showiconmgr "Hide Iconmgr" f.hideiconmgr "" f.separator "Delete" f.delete "Kill" f.destroy "" f.separator "Refresh" f.refresh "Restart" f.restart "Exit" f.quit } # Most of these modes aren't in the standard X11R5 xlock. menu "Screensaver" { "Screensaver" f.title "----------" f.pin "" f.separator "Blank" ! "xlock -nolock -nice 20 -mode blank &" "Random" ! "xlock -nolock -nice 20 -mode random &" "" f.separator "Blot" ! "xlock -nolock -nice 20 -mode blot &" "Bounce" ! "xlock -nolock -nice 20 -mode bounce &" "Flame" ! "xlock -nolock -nice 20 -mode flame &" "Galaxy" ! "xlock -nolock -nice 20 -mode galaxy &" "Grav" ! "xlock -nolock -nice 20 -mode grav &" "Helix" ! "xlock -nolock -nice 20 -mode helix &" "Hop" ! "xlock -nolock -nice 20 -mode hop &" "Hyper" ! "xlock -nolock -nice 20 -mode hyper &" "Kaleid" ! "xlock -nolock -nice 20 -mode kaleid &" "Life3d" ! "xlock -nolock -nice 20 -mode life3d &" "Maze" ! "xlock -nolock -nice 20 -mode maze &" "Pyro" ! "xlock -nolock -nice 20 -mode pyro &" "Qix" ! "xlock -nolock -nice 20 -mode qix &" "Rock" ! "xlock -nolock -nice 20 -mode rock &" "Rotor" ! "xlock -nolock -nice 20 -mode rotor &" } menu "Screenlock" { "Lock Screen" f.title "----------" f.pin "" f.separator "Blank" ! "xlock -nice 20 -mode blank &" "Random" ! "xlock -nice 20 -mode random &" "" f.separator "Blot" ! "xlock -nice 20 -mode blot &" "Bounce" ! "xlock -nice 20 -mode bounce &" "Flame" ! "xlock -nice 20 -mode flame &" "Galaxy" ! "xlock -nice 20 -mode galaxy &" "Grav" ! "xlock -nice 20 -mode grav &" "Helix" ! "xlock -nice 20 -mode helix &" "Hop" ! "xlock -nice 20 -mode hop &" "Hyper" ! "xlock -nice 20 -mode hyper &" "Kaleid" ! "xlock -nice 20 -mode kaleid &" "Life3d" ! "xlock -nice 20 -mode life3d &" "Maze" ! "xlock -nice 20 -mode maze &" "Pyro" ! "xlock -nice 20 -mode pyro &" "Qix" ! "xlock -nice 20 -mode qix &" "Rock" ! "xlock -nice 20 -mode rock &" "Rotor" ! "xlock -nice 20 -mode rotor &" } menu "Games" { "Games" f.title "----------" f.pin "" f.separator IfProgramExists(spider,"Maze" ! "spider &") IfProgramExists(xcuckoo,"Xcuckoo" ! "xcuckoo &") IfProgramExists(xhextris,"Xhextris" ! "xhextris &") IfProgramExists(xlander,"Xlander" ! "xlander &") IfProgramExists(xmahjongg,"Xmahjongg" ! "xmahjongg &") IfProgramExists(xtetris,"Xtetris" ! "xtetris &") IfProgramExists(xvier,"Xvier" ! "xvier &") } menu "Audio" { "Audio" f.title "----------" f.pin "" f.separator IfProgramExists(xplaycd,"CD Player (xplaycd)" ! "xplaycd -geometry -0+0 &") IfProgramExists(xmcd,"CD Player (xmcd)" ! "xmcd -geometry -0+0 &") IfProgramExists(workman,"CD Player (workman)" ! "workman -geometry -0+0 &") IfProgramExists(audiocontrol,"Control" ! "audiocontrol &") IfProgramExists(audiotool,"Player" ! "audiotool &") IfProgramExists(raplayer,"RealAudio" ! "raplayer &") IfProgramExists(netshow,"Netshow" ! "netshow &") } menu "Graphics" { "Graphics" f.title "----------" f.pin "" f.separator IfProgramExists(gv,"Postscript viewer (gv)" ! "gv &") IfProgramExists(xv,"Graphics Viewer (xv)" ! "xv &") IfProgramExists(xfig,"Draw (xfig)" ! "xfig &") IfProgramExists(gimp,"Gen. Image Manip. (gimp)" ! "gimp &") IfProgramExists(xpaint,"Paint (xpaint)" ! "xpaint &") } menu "Calculate" { "Calculate" f.title "----------" f.pin "" f.separator IfProgramExists(`x48',`"HP-48" ! "x48 &"') IfProgramExists(`xcalc',`"Calculator" ! "xcalc &"') IfProgramExists(`xvgr',`"Xvgr" ! "xvgr >/dev/null &"') IfProgramExists(`xspread',`"Spreadsheet (xspread)" ! "xspread &"') } menu "Tools" { "X Tools" f.title "----------" f.pin "" f.separator #"X Settings" ! "ixset &" # one of the tk demos, messes things up IfProgramExists(`xfontsel',`"Font Selector" ! "xfontsel &"') IfProgramExists(`tcolor',`"Color Selector" ! "tcolor &"') # fairly useful tk demo IfProgramExists(`editres',`"X Resource Editor" ! "editres &"') IfProgramExists(`viewres',`"X Resource Viewer" ! "viewres &"') } menu "Applications" { "Applications" f.title "----------" f.pin "" f.separator #IfProgramExists(pine,"Mail Reader (Pine)" ! "LINES=50 XTERM -ut -geometry 80x50 -T pine -n pine -e pine &") IfProgramExists(slrn,"Read News (slrn)" ! "LINES=50 XTERM -ut -geometry 80x50 -T slrn -n slrn -e slrn &") IfProgramExists(slrn,"Read CIS News (slrn)" ! "LINES=50 XTERM -ut -geometry 80x50 -T slrn -n slrn -e slrn -h news.cis.ohio-state.edu &") IfProgramExists(trn,"News Reader (trn)" ! "LINES=50 XTERM -ut -geometry 80x50 -T trn -n trn -e trn &") IfProgramExists(mutt,"Mail Reader (Mutt)" ! "LINES=50 XTERM -ut -geometry 80x50 -T mutt -n mutt -e mutt &") IfProgramExists(elm,"Mail Reader (Elm)" ! "LINES=50 XTERM -ut -geometry 80x50 -T elm -n elm -e elm &") "" f.separator IfProgramExists(communicator,"Communicator" ! "nice communicator -install &") IfProgramExists(netscape,"Netscape" ! "nice netscape -install &") IfProgramExists(hotjava,"HotJava" ! "nice hotjava &") IfProgramExists(amaya,"Amaya" ! "nice amaya &") IfProgramExists(emacs,"Emacs" ! "emacs &") IfProgramExists(aruser,"AR System" ! "[ -x $HOME/bin/ar-fix ] && ar-fix; aruser >/dev/null &") IfProgramExists(notifier,"AR Notifier" ! "[ -x $HOME/bin/ar-fix ] && ar-fix; notifier >/dev/null &") #IfProgramExists(unimwm,"Unison Calendar" ! "unimwm &") IfProgramExists(nscal,"Netscape Calendar" ! "nscal &") IfProgramExists(answerbook,"Sun Answerbook" ! "answerbook >/dev/null &") IfProgramExists(applix,"Applixware" ! "applix &") IfProgramExists(maker,"Framemaker" ! "maker >/dev/null &") IfProgramExists(wabi,"Wabi" ! "wabi >/dev/null &") "" f.separator "Graphics" f.menu "Graphics" "Audio" f.menu "Audio" "Calculate" f.menu "Calculate" "X Tools" f.menu "Tools" } menu "Utilities" { "Utilities" f.title "----------" f.pin "" f.separator "Lock Screen" f.function "Lock" "" f.separator IfProgramExists(`tkremote',`"Remote ..." ! "tkremote &"') # by rfunk IfProgramExists(`minicom',`"Minicom" ! "XTERM -ut -geometry 80x25 -T minicom -n minicom -e minicom -con -M &"') "xterm" ! "XTERM &" "Applications" f.menu "Applications" #"Games" f.menu "Games" "" f.separator #"Screensaver" f.menu "Screensaver" #"Select Lock" f.menu "Screenlock" IfProgramExists(`xwd',`"Screenshot" ! "xwd -root -screen | xwdtopnm | ppmtogif > /tmp/screenshot.gif"') "Refresh Screen" f.refresh "Restart Window Manager" f.restart "== Exit Session ==" f.quit } # Quickly change window size menu "Zoom" { "Zoom" f.title "----------" f.pin "" f.separator "Top Zoom" f.topzoom # cover top half of screen "Bottom Zoom" f.bottomzoom # cover bottom half of screen "Left Zoom" f.leftzoom # cover left half of screen "Right Zoom" f.rightzoom # cover right half of screen "" f.separator "Maximize" f.fullzoom "Full Width" f.horizoom "Full Height" f.zoom "" f.separator "(Un)Squeeze" f.squeeze # leave only titlebar "(De)Iconify" f.iconify } menu "WindowOps" { "Window Ops" f.title "----------" f.pin "" f.separator "Refresh Window" f.winrefresh #"Adopt" f.adoptwindow # only useful in -w mode "Info" f.identify "" f.separator "Occupy ..." f.occupy "Occupy All" f.occupyall "Vanish" f.vanish "" f.separator "Move" f.function "move-or-raise" "Packed Move" f.movepack "Resize" f.function "resize-or-raise" "Zoom" f.menu "Zoom" "" f.separator "Raise" f.raise "Lower" f.lower "" f.separator "Delete" f.delete "Destroy" f.destroy }