# # ~/.twmrc # Erwan STIPON # NoGrabServer RestartPreviousState DecorateTransients # Fonts TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*" IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*" ClientBorderWidth 0 BorderWidth 0 ButtonIndent 0 NoDefaults LeftTitleButton "close" = f.delete RightTitleButton "icon" = f.iconify RightTitleButton "resize" = f.resize RightTitleButton "fullsize" = f.fullzoom NoTitle { "TWM Icon Manager" "xclock" "xload" "xlogo" "oclock" "xeyes" "top" "sh" } NoBorder { "TWM Icon Manager" "xclock" "xload" "xlogo" "oclock" "xeyes" "top" "sh" } NoHighlight { "TWM Icon Manager" "xclock" "xload" "xlogo" "oclock" "xeyes" "top" "sh" } Color { #BorderColor "gray30" BorderColor "black" DefaultBackground "rgb:5/5/5" DefaultForeground "gray80" TitleBackground "rgb:5/5/5" #BorderTitleForeground "black" TitleForeground "gray80" MenuBackground "rgb:5/5/5" MenuForeground "gray80" MenuBorderColor "gray60" MenuTitleBackground "gray80" MenuTitleForeground "rgb:5/5/5" IconBackground "rgb:4/4/4" IconForeground "gray80" IconBorderColor "gray70" IconManagerBackground "rgb:5/5/5" IconManagerForeground "grey80" MenuShadowColor "black" } # # 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-iconify" { f.move f.deltastop f.iconify } # # Set some useful bindings. Sort of uwm-ish, sort of simple-button-ish # # Mouse accross root window Button1 = : root : f.menu "MAIN_menu" Button3 = : root : f.menu "MAIN_menu" 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 Button1 = : icon : f.function "move-or-iconify" Button2 = : icon : f.iconify Button1 = : iconmgr : f.iconify Button2 = : iconmgr : f.iconify # My personal bindings "F11" = : all : f.fullzoom # # And a menus with the usual things # menu "MAIN_menu" { ":: ERWAN STIPON ::" f.title "" f.nop "Development" f.menu "DEV_menu" "Graphics" f.menu "GFX_menu" "Terminals " f.menu "TERM_menu" "Networking " f.menu "NET_menu" "Admin Tools" f.menu "TOOLS_menu" "TWM actions" f.menu "TWM_menu" "" f.nop "Exit TWM" ("gray80":"#773333") f.menu "EXIT_menu" } menu "EXIT_menu" { "Are you sure ?" ("gray80":"#773333") f.title "No" f.nop "Yes" f.quit } menu "TWM_menu" { ":: TWM ACTIONS ::" f.title "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 "Kill" f.destroy "Delete" f.delete "Edit ~/.twmrc" f.exec "gvim ~/.twmrc" "Source ~/.twmrc" f.restart "" f.nop "Restart" f.restart } menu "TERM_menu" { ":: TERMINALS ::" f.title "xterm White" f.exec "xterm -bg gray10 -fg white -e bash &" "xterm Green" f.exec "xterm -bg gray10 -fg aquamarine -e bash &" "xterm Red" f.exec "xterm -bg gray10 -fg red -e bash &" "xterm Yellow" f.exec "xterm -bg gray10 -fg yellow -e bash &" } menu "DEV_menu" { ":: DEVELOPMENT ::" f.title "Edit ~/.bashrc" f.exec "gvim ~/.bashrc" "Edit ~/.vimrc" f.exec "gvim ~/.bashrc" "GVIM" f.exec "exec gvim &" } menu "TOOLS_menu" { ":: TOOLS ::" f.title "Xterm" f.exec "exec xterm &" "Xkill" f.exec "exec xkill &" } menu "GFX_menu" { "::GRAPHICS::" f.title "The GIMP" f.exec "gimp" "ScreenShot" f.exec "xwd -root >~/screenshot.xwd" "WinShot" f.exec "xwd >~/windowshot.xwd" } menu "NET_menu" { "::NETWORK::" f.title "Firefox" f.exec "firefox" }