Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #*********************************
- # GENERAL SETTINGS
- #*********************************
- AutoRelativeResize # No cross of window edge needed for resize
- DecorateTransients # Also decorate transient windows
- NoBackingStore # Minimize repainting of menus
- NoCaseSensitive # Case ignoring for icon manager
- NoDefaults # No default title buttons, we will define them
- NoGrabServer # Do not grab the server when not needed
- NoHighLight # Dont change border of windows on mouse over
- NoTitleHighlight # No highlight for titlebar of selected window
- OpaqueMove # Move window instead of outline
- RandomPlacement # Windows without geometry are placed randomly
- #RestartPreviousState # Try to restart defaults from last x session
- UsePPosition "on" # Honor placement
- #NoIconManagers # No icon manager is showed
- IconifyByUnMapping # Dont use desktop minimized icons
- #DontMoveOff # Windows can't move outside the screen
- IconManagerGeometry "1200x10+0+1176" 10
- IconManagerDontShow {"conky" "xclock"}
- # ClientBorderWidth {"conky"}
- # InterpolateMenuColors
- #*********************************
- # WINDOW BORDERS ETC
- #*********************************
- BorderWidth 1 # Number of pixels for entire window border
- FramePadding 2 # Number of pixels between titlebar buttons and frame
- MenuBorderWidth 5 # Number of pixels for menu border
- #NoMenuShadows # No shadow behind the popup menu
- TitleButtonBorderWidth 0 # Number of pixels for button border
- ButtonIndent 0 # Larger seems to squash buttons together
- TitlePadding 4 # Number of pixels around title buttons
- #*********************************
- # TITLE BAR BUTTONS
- #*********************************
- IconDirectory "~/.twm/icons/" # Dir for own icon buttons
- LeftTitleButton "resize.xbm"=f.resize # Northwest arrow.xbm file
- LeftTitleButton "wmenu.xbm"=f.menu "WindowMenu" # Burger menu wmenu.xbm file
- RightTitleButton "minimize.xbm"=f.iconify # Down chevron .xbm file
- # RightTitleButton "maximize.xbm"=f.fullzoom # Up chevron .xbm file
- # Above takes 2 clicks to restore [feature]
- # Below takes 1 clicks inc lower function
- RightTitleButton "maximize.xbm"=f.function "maximize" # Up chevron .xbm file
- RightTitleButton "close.xbm"=f.delete # X character .xbm file
- Pixmaps { TitleHighlight "titlebar.xbm" } # Stippled when enabled
- #*********************************
- # COLOR SETTINGS
- #*********************************
- Color {
- BorderColor "#2c2b2b" # Border colour of all windows
- DefaultBackground "#2c2b2b" # BG Colour of transient popups
- DefaultForeground "#C0c0c0" # FG Colour of transient popups
- TitleBackground "#2c2b2b" # Window Titlebar main colour
- TitleForeground "#C0c0c0" # Window Titlebar text colour
- MenuTitleBackground "#2c2b2b" # BG colour of root menu title
- MenuTitleForeground "#C0c0c0" # Font colour of root menu title
- MenuBackground "#2c2b2b" # BG colour of root menu
- MenuForeground "#C0c0c0" # Font colour of root menu
- MenuBorderColor "#2c2b2b" # Border colour entire root menu
- MenuShadowColor "#2c2b2b" # Drop shadow colour of root menu
- IconManagerBackground "#2c2b2b"
- IconManagerForeground "#C0c0c0"
- PointerForeground "Black"
- PointerBackground "White"
- }
- #*********************************
- # FONT SETTINGS
- #*********************************
- MenuFont "-adobe-helvetica-medium-r-normal--12-120-*-*-*-*-iso8859-1"
- TitleFont "-adobe-helvetica-medium-r-normal--12-120-*-*-*-*-iso8859-1"
- ResizeFont "-adobe-helvetica-medium-r-normal--12-120-*-*-*-*-iso8859-1"
- IconManagerFont "-adobe-helvetica-medium-r-normal--12-120-*-*-*-*-iso8859-1"
- #*********************************
- # CURSOR ICON SETTINGS
- #*********************************
- Cursors {
- Frame "top_left_arrow"
- Title "top_left_arrow"
- Icon "top_left_arrow"
- IconMgr "top_left_arrow"
- Button "right_ptr"
- Menu "right_ptr"
- Wait "watch"
- Destroy "pirate"
- Resize "sizing"
- Move "fleur"
- Select "plus"
- }
- #*********************************
- # NO TITLE BAR SETTINGS
- #*********************************
- NoTitle {
- "xclock"
- "xmessage"
- "TWM Icon Manager"
- }
- #*********************************
- # TAB STYLE TITLE BARS
- #*********************************
- # SqueezeTitle {""}
- #*********************************
- # AUTORAISE WINDOWS
- #*********************************
- # Autoraise {"xterm"}
- #*********************************
- # CURSOR TO WINDOW ON DE-ICONIFY
- #*********************************
- WarpCursor { "xterm" }
- #***********************************************************************
- # MOUSE SETTINGS AND WINDOW BEHAVIOURS
- #***********************************************************************
- # Button1=left, Button2=middle, Button3=right, m=alt, c=ctrl, s=shift
- # The root window actions i.e. clicking on the desktop backgound
- # Right click menu ala Fluxbox
- Button3 = : root : f.menu "RootMenu"
- # Wheel button system menu
- Button2 = : root : f.menu "System"
- # Wheel button on Window to bring forward
- Button2 = : window : f.raise
- # Left click on desktop to bring up window list
- Button1 = : root : f.menu "TwmWindows"
- # Left click the window title to lower / raise + gain focus or move
- Movedelta 1
- Button1= :title: f.function "raise-lower-move"
- Function "raise-lower-move" { f.move f.raiselower }
- # Middle click the window title for options for individual windows
- Button2= : title|frame : f.menu "WindowMenu"
- # Right click window title to resize the window by mousing beyond frame
- Button3 = : title|frame : f.resize
- # Hold alt key and left click to move entire window
- Button1 = m : window : f.move
- # Hold shift key and right click / move to resize. Best near edges.
- Button3 = s : window : f.resize
- # Hold Alt and Tab cycles through windows bringing up focus
- Function "winup" { f.circleup }
- "Tab" = m : root|window|frame|title : f.function "winup"
- # Hold Alt plus left click window title to maximize window vertically
- Button1 = m : title|frame : f.zoom
- # Hold Alt plus right click window title to maximize window horizontally
- Button3 = m : title|frame : f.horizoom
- # Click to de-iconfy using IconManager
- Button1 = : iconmgr : f.iconify
- DefaultFunction f.nop
- #*********************************************************************
- # KEYBINDINGS AND FUNCTIONS FOR VDESK http://offog.org/code/vdesk.html
- #*********************************************************************
- # Change Virtual Desktops with vdesk
- function "desktop-1" {
- f.exec "xmessage -center -timeout 1 -buttons OK DESKTOP NO: 1 &"
- f.exec "vdesk 1"
- }
- function "desktop-2" {
- f.exec "xmessage -center -timeout 1 -buttons OK DESKTOP NO: 2 &"
- f.exec "vdesk 2"
- }
- function "desktop-3" {
- f.exec "xmessage -center -timeout 1 -buttons OK DESKTOP NO: 3 &"
- f.exec "vdesk 3"
- }
- function "desktop-4" {
- f.exec "xmessage -center -timeout 1 -buttons OK DESKTOP NO: 4 &"
- f.exec "vdesk 4"
- }
- # Ctrl-1 to 4 or Ctrl-R/L to change Virtual Desktops
- "1" = c : all : f.function "desktop-1"
- "2" = c : all : f.function "desktop-2"
- "3" = c : all : f.function "desktop-3"
- "4" = c : all : f.function "desktop-4"
- function "next" {
- f.exec "A=$((`vdesk`+1)); if [ $A = 5 ] ; then A=1 ; fi ; vdesk $A"
- f.exec "B=$((`vdesk`)); xmessage -center -timeout 1 -buttons OK DESKTOP NO: $B &"
- }
- function "prev" {
- f.exec "A=$((`vdesk`-1)); if [ $A = 0 ] ; then A=4 ; fi ; vdesk $A"
- f.exec "B=$((`vdesk`)); xmessage -center -timeout 1 -buttons OK DESKTOP NO: $B &"
- }
- "Right" = c : all : f.function "next"
- "Left" = c : all : f.function "prev"
- # See note above
- function "maximize" { f.fullzoom f.focus f.nop }
- #*********************************
- # THE POPUP MENU
- #*********************************
- menu "RootMenu" {
- #"Editor" f.exec "xfw &"
- #"Editor" f.exec "adie &"
- "Fileman" ("#1A88F2":"#2c2b2b") f.exec "xfe &"
- "Terminal" ("#FFB816":"#2c2b2b") f.exec "xterm &"
- "Internet" f.menu "Internet"
- "MultiMedia" f.menu "Multimedia"
- "Graphics" f.menu "Graphics"
- "Utilities" f.menu "Utilities"
- "Office" f.menu "Office"
- "Games" f.menu "Games"
- "Command" ("#009200":"#2c2b2b") f.exec "xterm +sb -fg dimgrey -bg white -geometry 25x1+840+1150 -name Run -title Run -e ~/.twm/scripts/getrun &"
- "Exit" ("#db0000":"#2c2b2b") f.quit
- }
- menu "Internet" {
- # ">> Web Browser" !"chromium --force-device-scale-factor=.96 &"
- "> Web Browser" !"firefox &"
- "> Text Browser" !"links -g http://www.google.com &"
- "> Email Client" !"seamonkey -mail &"
- "> FTP Client" !"/usr/local/bin/filezilla &"
- "> MC FTP" !"xterm -geometry 177x56+317+107 -e mc . ftp://un:pw@ftp.dom.com &"
- "> SSH Client" !"putty &"
- }
- menu "Multimedia" {
- "> Dead Beef" !"xterm -geometry 80x20+300+300 -e mpg123 http://ice1.somafm.com/groovesalad-128-mp3 &"
- "> Media Player" !"vlc &"
- "> Audio Mixer" !"xterm -geometry 80x20+300+300 -e cmixer &"
- #"> Sound App" !"pavucontrol &"
- }
- menu "Graphics" {
- "> xPaint" !"xpaint &"
- "> Colours" !"gcolor2 &"
- "> Sshot!" !"xterm -bg black -fg grey -e scrot -d 6 -c -e 'mv $f ~/' &"
- "> Magnify" !"xmag &"
- "> X Font" !"xfontsel &"
- "> X Fig" !"xfig &"
- "> Xv" !"xv &"
- }
- menu "Utilities" {
- "> Root XTerm" f.exec "xterm -fg goldenrod -bg black -e su - &"
- "> Manuals" f.exec "/home/orby/.twm/scripts/tkman &"
- "> Weather" f.exec "xterm -geometry 125x45 -e /home/orby/.twm/scripts/weather &"
- "> Htop" f.exec "xterm -e htop &"
- "> Neofetch" f.exec "xterm -e /home/orby/.twm/scripts/neofetch.sh &"
- "> Stick Clock" f.exec "~/.twm/scripts/getclock &"
- "> Clipboard" f.exec "xclipboard &"
- "> About..." f.identify
- "> Env Vars" f.exec "env | xmessage -nearmouse -buttons OK:1 -file - &"
- "> Wallpaper" f.menu "Wallpaper"
- }
- menu "Wallpaper" {
- "> Set NeXTStep" !"xsetroot -solid '#545476' &"
- "> Set MacOS9B" !"xsetroot -solid '#54679c' &"
- "> Set Slate" !"xsetroot -solid '#4A5562' &"
- "> Plaid" !"xsetroot -mod 4 4 -bg '#595959' -fg '#696969' &"
- }
- menu "Office" {
- "> Wordpro" f.exec "~/Office/Wordpro &"
- "> Ssheets" f.exec "~/Office/Spreadsheet &"
- "> Presents" f.exec "~/Office/Presentations &"
- "> PDF Docs" f.exec "xpdf &"
- "> Calculator" f.exec "xcalc &"
- "> Calendar" f.exec "cal -y -w | xmessage -nearmouse -buttons OK:1 -file - &"
- "> Fox Calc" f.exec "calculator &"
- }
- menu "Games" {
- "> Galacta" !"xgalaga-sdl -window &"
- "> Xmahjong" !"xmahjongg --background green --tileset gnome &"
- }
- menu "WindowMenu" {
- "Vertical" f.zoom
- "Horizontal" f.horizoom
- "Left" f.leftzoom
- "Right" f.rightzoom
- "Top" f.topzoom
- "Bottom" f.bottomzoom
- "AutoRaise" f.autoraise
- "Sticky" f.exec "~/.twm/scripts/stickwin &"
- "Sendto 1" f.exec "~/.twm/scripts/sendto-1 &"
- "Sendto 2" f.exec "~/.twm/scripts/sendto-2 &"
- "Sendto 3" f.exec "~/.twm/scripts/sendto-3 &"
- "Sendto 4" f.exec "~/.twm/scripts/sendto-4 &"
- }
- menu "System" {
- "> Load Config" f.twmrc
- "> Edit Config" f.exec "xfw ~/.twmrc &"
- "> Hide Icomgr" f.hideiconmgr
- "> End Task" f.exec "xkill &"
- "> Restart" f.restart
- "> LCD Off" f.exec "xset -display :0 dpms force off &"
- "> Saver 2m" f.exec "xset s 120 120 -display $DISPLAY &"
- "> Saver 10m" f.exec "xset s 600 600 -display $DISPLAY &"
- }
- #*******************
- # SCRIPTS REFERENCE
- #*******************
- # sendto-n: winid=$(xdotool click 1 & xwininfo | awk '/id: / {print $4}');vdesk n $winid;
- # stickwin: winid=$(xdotool click 1 & xwininfo | awk '/id: / {print $4}');vdesk 0 $winid;
- # getclock: winid=$(xwininfo -name xclock | awk '/id: / {print $4}');vdesk 0 $winid;
- #
- # getrun:
- # read "userinput?# "
- # nohup $userinput >/dev/null 2>&1 &
- # PPPID=$(awk '{print $4}' "/proc/$PPID/stat")
- # kill $PPPID
- # (nb:read params=os specific)
- #
- # weather:
- # curl wttr.in/country
- # sleep 30
- #
- # tkman:
- # MANPATH=/usr/share/man:/usr/local/man
- # export MANPATH
- # tkman
- #
- # xinitrc:
- # xrdb -load ~/.Xresources # load config
- # xmodmap ~/.Xmodmap # load kb mods
- # setxkbmap gb # UK pound symbol
- # xset r rate 200 40 # kb repeat rate
- # xset b 100 600 100 # beep tone
- # xsetroot -cursor_name left_ptr # cursor type
- # xset m 30/10 4 # mouse speed
- # xset +dpms # lcd powersaving
- # xset dpms 1200 1500 1800 # powersave times
- # xset s blank # screen blanking
- # xset s 300 # idle timeout
- # xsetroot -mod 4 4 -bg '#696969' -fg '#797979'
- # beforelight & # screensaver
- # vdesk & # virtual desks
- # xclock & # the clock
- # twm -v # the wm!
- #
- # https://www.cpcnw.co.uk/twm2/Grahams_TWM_page2.html
- # TWM: Started in 1987 by Tom LaStrange
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement