TWM my .twmrc work in progress
kelsoo edited this page 4 years ago

#TWM: #I used rufwoofs twmrc as a base then tweaked away #For lots of generic twm info also see: https://notabug.org/kelsoo/scribbles/wiki/TWM+info ############################################################################################

AutoRaise

NoTitleFocus

NoGrabServer

NoDefaults # Using own title button definitions

#AutoRelativeResize

RestartPreviousState

UsePPosition "on"

TitleFont "--dejavu sans-bold----12-------*"

#ResizeFont "--dejavu sans-bold----12-------*"

MenuFont "--dejavu sans-bold----12-------*"

IconFont "--dejavu sans-bold----12-------*"

IconManagerFont "--dejavu sans-bold----12-------*"

TitleButtonBorderWidth 0

OpaqueMove
RandomPlacement
ShowIconManager #IconManagerGeometry "1440x5+0+0" 6 # strip across top on my 1440x900 IconManagerGeometry "1080x5+5+5" 6 BorderTileBackground "#ff0000" BorderTileForeground "#000000" DecorateTransients
MoveDelta 2 NoRaiseOnMove NoRaiseOnResize DefaultFunction f.nop

############################################################################################

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 } Function "deiconify-raise" { f.deiconify f.raise } Function "fullscreen" { f.fullzoom f.focus f.nop } Function "select" { f.iconify f.focus }

#If a title button is defined here then it is shown/used

LeftTitleButton "menu12" = f.menu "Window Options" LeftTitleButton "dot" = f.delete RightTitleButton "dot" = f.delete RightTitleButton "icon" = f.function "fullscreen" RightTitleButton "right_ptr" = f.resize

############################################################################################

Button1 = : root : f.menu "Window Options" Button2 = : root : f.menu "TwmWindows" Button3 = : root : f.menu "defops"

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.menu "TwmWindows" # f.delete # f.menu "TwmWindows" Button3 = : title : f.menu "defops" # f.raiselower

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

Button1 = : iconmgr : f.function "deiconify-raise" Button2 = : iconmgr : f.delete Button3 = : iconmgr : f.iconify

############################################################################################ #Keys

"Tab" = m : all : f.circleup "Print" = : all : f.exec "scrot -d5 &" "Menu" = : all : f.exec "/usr/bin/env LANG=en_GB.UTF-8 /usr/X11R6/bin/xterm &" "Super_R" = : all : f.fullzoom "Left" = m : all : f.warptoiconmgr "" "Up" = m : all : f.upiconmgr "Down" = m : all : f.downiconmgr "Right" = m : all : f.function "select"

############################################################################################ "F1" = m : window : f.lower "F3" = m : all : f.showiconmgr "F2" = m : all : f.hideiconmgr "F4" = s : window|icon : f.fullzoom "F5" = m : window|icon : f.bottomzoom "F6" = m : window|icon : f.topzoom "F8" = m : window|icon : f.rightzoom "F7" = m : window|icon : f.leftzoom "F9" = m : window|icon : f.raise "F10" = m : all : f.iconify "F10" = s : all : f.deiconify "F11" = m : all : f.downiconmgr "F12" = m : all : f.upiconmgr

"F1" = c : all : f.exec "vdesk 1 &" "F2" = c : all : f.exec "vdesk 2 &" "F3" = c : all : f.exec "vdesk 3 &" "F4" = c : all : f.exec "vdesk 4 &" "F5" = c : all : f.exec "vdesk 5 &" "F6" = c : all : f.exec "rox &" "F7" = c : all : f.exec "icecat &" "F8" = c : all : f.exec "claws-mail &" "F9" = c : all : f.exec "gimp &" "F10" = c : all : f.exec "libreoffice &" "F11" = c : all : f.exec "geeqie &" "F12" = c : all : f.exec "xclock -bg gray56 -fg grey14 &"

############################################################################################ #Iconified windows icons can be used if ForceIcons is set

IconDirectory "/home/user/./usr/share/pixmaps" IconifyByUnmapping # No Icons shown

############################################################################################

NoTitle {

            "stalonetray" 
            "TWM Icon Manager" 
            "xmessage" 
            "xload" 
            "oclock" 
            "xclock" 
            "WorkSpaceManager" 
            "xeyes"
            "gkrellm"
            "bubblemon"
            "wmbubble"
            "bashrun2"

}

NoBorder {

            "stalonetray"
            "TWM Icon Manager"
            "mpv"
            "xmessage" 
                    "xload"
            "WorkSpaceManager"
            "oclock" 
            "xclock" 
            "xeyes"
            "rox"
            "seamonkey"
            "bashrun2"              

}

NoHighlight # global

IconManagerDontShow
{

            "stalonetray" 
            "xmessage" 
            "xload" 
            "oclock" 
            "xclock" 
            "xeyes"
            "WorkSpaceManager" 
            "xeyes"
            "gkrellm"
            "bashrun2"

}

#################################### colours ########################################################

Color {

# Title default Title colour ... then with selective programs having other colours
# Use xprop and/or xwininfo commands to identify WM names such as XTerm ...etc.

DefaultBackground                       "#494949"
DefaultForeground                       "#DCDCDC"
BorderColor                         "#494949" 
TitleBackground                         "#494949" 
TitleForeground                         "white"   
MenuBackground                      "#494949"
MenuForeground                      "#DCDCDC"
MenuBorderColor                         "#494949"
MenuTitleBackground                     "black"
MenuTitleForeground                     "#DCDCDC"
IconBackground                      "#494949" 
MenuShadowColor                     "black"
IconForeground                      "#DCDCDC" 
IconBorderColor                         "#494949"
IconManagerBackground                   "#494949" 
IconManagerForeground                   "#DCDCDC" 
IconManagerHighlight                    "red"

}

################################## colours # Grey 101 ######################################################### #This config is based on the colour/color grey of which there are 101 shades apparently. 202 if you count gray which are identical :-P

menu "defops" #( "#DCDCDC" : "#494949" ) ... no value and inverts menu items colour

{

"MAIN MENU"     ( "grey56"  : "grey14"  )       f.title
"Window Options"    ( "#DCDCDC" : "#494949" )       f.menu "Window Options"
"----------------"  ( "#DCDCDC" : "#494949" )       f.nop
"-----Desk 1-----"      ( "#DCDCDC" : "#494949" )           f.exec "/usr/bin/vdesk 1&"
"-----Desk 2-----"      ( "#DCDCDC" : "#494949" )           f.exec "/usr/bin/vdesk 2&"
"-----Desk 3-----"      ( "#DCDCDC" : "#494949" )           f.exec "/usr/bin/vdesk 3&"
"-----Desk 4-----"      ( "#DCDCDC" : "#494949" )           f.exec "/usr/bin/vdesk 4&"
"-----Desk 5-----"      ( "#DCDCDC" : "#494949" )       f.exec "/usr/bin/vdesk 5&"
"----------------"  ( "#DCDCDC" : "#494949" )       f.nop
"Weather"       ( "#DCDCDC" : "#494949" )       f.exec "/usr/bin/env LANG=en_GB.UTF-8 /usr/X11R6/bin/xterm -geometry 130x40+5+35 -bg black -fg gray83 -hold -e curl wttr.in/Dundee &"
"Spacefm"       ( "#DCDCDC" : "#494949" )       f.exec "spacefm &"
"Browser"       ( "#DCDCDC" : "#494949" )       f.exec "seamonkey &"
"Leafpad"       ( "#DCDCDC" : "#494949" )       f.exec "leafpad &"
"LO-writer"     ( "#DCDCDC" : "#494949" )       f.exec "libreoffice6.2 --writer &"
"LO-calc"       ( "#DCDCDC" : "#494949" )       f.exec "libreoffice6.2 --calc &"
"Calc"              ( "#DCDCDC" : "#494949" )       f.exec "xcalc &"
"xterm"         ( "#DCDCDC" : "#494949" )       !"/usr/bin/env LANG=en_GB.UTF-8 /usr/X11R6/bin/xterm &"
"Paint"         ( "#DCDCDC" : "#494949" )       f.exec "mtpaint &"
"Clock"         ( "#DCDCDC" : "#494949" )       f.exec "xclock -bg grey28 -fg grey83 -digital -geometry '+1680+5' -padding 2 &"
    "nano"          ( "#DCDCDC" : "#494949" )       f.exec "xterm -ls -bg black -fg gray83 -e nano &"
"rox"           ( "#DCDCDC" : "#494949" )       f.exec "rox &"
"fittstool"     ( "#DCDCDC" : "#494949" )       f.exec "fittstool &"
"runner"        ( "#DCDCDC" : "#494949" )       f.exec "runner -r &"
"----------------"  ( "#DCDCDC" : "#494949" )       f.nop
"Restart"       ( "#DCDCDC" : "#494949" )       f.restart
"Exit"          ( "#DCDCDC" : "#494949" )       f.quit

}

menu "Window Options" { "Windows Options" ( "grey56" : "grey14" ) f.title "Raise" ( "#DCDCDC" : "#494949" ) f.raise "Lower" ( "#DCDCDC" : "#494949" ) f.lower "Move" ( "#DCDCDC" : "#494949" ) f.move "Resize" ( "#DCDCDC" : "#494949" ) f.resize "Iconify" ( "#DCDCDC" : "#494949" ) f.iconify "Delete" ( "#DCDCDC" : "#494949" ) f.delete "Utilities" ( "#DCDCDC" : "#494949" ) f.menu "Utilities" }

menu "Utilities" { "Utilities" ( "grey56" : "grey14" ) f.title "xedit" ( "#DCDCDC" : "#494949" ) !"xedit &" "xfontsel" ( "#DCDCDC" : "#494949" ) !"xfontsel &" "xcalendar" ( "#DCDCDC" : "#494949" ) !"xterm -geometry 80x40+100+100 -hold -e cal -y &" "xload" ( "#DCDCDC" : "#494949" ) !"xload -nolabel -bg grey28 -fg grey83 -geometry =570x24+1097+5 &" "xclipboard" ( "#DCDCDC" : "#494949" ) !"xclipboard &" "Top" ( "#DCDCDC" : "#494949" ) !"xterm -T Top -n Top -e top &" "Xman" ( "#DCDCDC" : "#494949" ) !"xman &" "xclock" ( "#DCDCDC" : "#494949" ) !"xclock -bg 'rgb:220/220/220' -fg rgb:049/049/049' -digital -geometry '-5-5' -padding 2 &" "xmag" ( "#DCDCDC" : "#494949" ) !"xmag &" "xwd|xwud" ( "#DCDCDC" : "#494949" ) !"xwd -root -out /tmp/screendump;xwud -in /tmp/screendump -raw &" "Editres" ( "#DCDCDC" : "#494949" ) !"editres &" "XLock" ( "#DCDCDC" : "#494949" ) !"xlock -mode random &" "Reset X defaults" ( "#DCDCDC" : "#494949" ) !"xrdb -load $HOME/.Xdefaults" "Show Iconmgr" ( "#DCDCDC" : "#494949" ) f.showiconmgr "Hide Iconmgr" ( "#DCDCDC" : "#494949" ) f.hideiconmgr "xev" ( "#DCDCDC" : "#494949" ) !"xterm -e xev &" "xwininfo" ( "#DCDCDC" : "#494949" ) !"xterm -geometry 40x10+10+200 -sb -fa DejaVu:size=12:boldxterm -hold -e xwininfo &" "xprop" ( "#DCDCDC" : "#494949" ) !"xterm -geometry 40x10+10+200 -sb -fa DejaVu:size=12:boldxterm -hold -e xprop &" "Identify" ( "#DCDCDC" : "#494949" ) f.identify "Preferences" ( "#DCDCDC" : "#494949" ) f.menu "Preferences" }

menu "Preferences" { "Preferences" ( "grey56" : "grey14" ) f.title "Bell Loud" ( "#DCDCDC" : "#494949" ) !"xset b 80&" "Bell Normal" ( "#DCDCDC" : "#494949" ) !"xset b on&" "Bell Off" ( "#DCDCDC" : "#494949" ) !"xset b off&" "Click Loud" ( "#DCDCDC" : "#494949" ) !"xset c 80&" "Click Soft" ( "#DCDCDC" : "#494949" ) !"xset c on&" "Click Off" ( "#DCDCDC" : "#494949" ) !"xset c off&" "Lock On" ( "#DCDCDC" : "#494949" ) !"xset led on&" "Lock Off" ( "#DCDCDC" : "#494949" ) !"xset led off&" "Mouse Fast" ( "#DCDCDC" : "#494949" ) !"xset m 4 2&" "Mouse Normal" ( "#DCDCDC" : "#494949" ) !"xset m 2 5&" "Mouse Slow" ( "#DCDCDC" : "#494949" ) !"xset m 1 1&" "Monitor Power Saving OFF" ( "#DCDCDC" : "#494949" ) !"xset s off;xset -dpms&" "Monitor Power Saving ON" ( "#DCDCDC" : "#494949" ) !"xset s on;xset +dpms&" }

############################################################################################ #Controls shape of cursor under various conditions.

Cursors {

Frame           "top_left_arrow"
Title           "top_left_arrow"
Icon            "top_left_arrow"
IconMgr         "top_left_arrow"
Move            "fleur"
Resize          "sizing"
Menu            "sb_right_arrow"
Button          "hand1"
Wait            "watch"
Select          "dot"
Destroy         "pirate"

}

################################ kelsoo twmrc end ############################################################