#********************************* # 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" "polybar"} ClientBorderWidth {"conky" "polybar"} #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-180-*-*-*-*-iso8859-1" TitleFont "-adobe-helvetica-medium-r-normal--12-180-*-*-*-*-iso8859-1" ResizeFont "-adobe-helvetica-medium-r-normal--12-180-*-*-*-*-iso8859-1" IconManagerFont "-adobe-helvetica-medium-r-normal--12-180-*-*-*-*-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 { "polybar" "aterm" "conky" "xclock" "xmessage" "TWM Icon Manager" "mplayer" } #********************************* # 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" } "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" 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" ("#EA9C10":"#2c2b2b") f.exec "xterm &" "—————" f.nop "Internet" f.menu "Internet" "MultiMedia" f.menu "Multimedia" "Graphics" f.menu "Graphics" "Utilities" f.menu "Utilities" "Office" f.menu "Office" "Games" f.menu "Games" "—————" f.nop "Command" ("#2DB753":"#2c2b2b") f.exec "xterm -fg dimgrey -bg white -geometry 25x1+840+1150 -name Run -title Run -e ~/.twm/scripts/getrun &" "Exit" ("#FF1427":"#2c2b2b") f.quit } menu "Internet" { "›› Web Browser" !"firefox &" "›› Text Browser" !"links -g http://www.google.com &" "›› Email Client" !"seamonkey -mail &" "›› FTP Client" !"gftp &" "›› SSH Client" !"putty &" } menu "Multimedia" { "›› Dead Beef" !"deadbeef https://somafm.com/groovesalad.pls &" "›› Media Player" !"gmplayer &" "›› Audio Mixer" !"xterm -geometry 80x20+300+300 -e alsamixer &" "›› Sound App" ! "pavucontrol &" } menu "Graphics" { "›› mtPaint" !"mtpaint &" "›› Colours" !"gcolor2 &" "›› Sshot!" !"xterm -bg black -fg grey -e scrot -d 6 -c -e 'mv $f ~/' &" "›› Magnify" !"xmag &" "›› X Font" !"xfontsel &" "›› X Fig" !"xfig &" } menu "Utilities" { "›› Root XTerm" f.exec "xterm -fg goldenrod -bg black -e su - &" "›› ATerm Tsp+" f.exec "aterm -tr +sb -bw 0 -fg '#a9a9a9' -fn Terminus &" "—————" f.nop "›› TWM Manpage" f.exec "xterm -fg black -bg white -geometry 100x90 -T 'TWM Manpage' -e 'man twm' &" "›› Xman Viewer" f.exec "/home/orby/.twm/scripts/xman &" "—————" f.nop "›› Weather1" f.exec "while metar get | xmessage -center -buttons OK:1 -file - ; do :; done &" "›› Weather2" f.exec "xterm -geometry 125x45 -T 'Weather' -e '~/.twm/scripts/weather' &" "—————" f.nop "›› Htop" f.exec "xterm -e htop &" "›› Bpytop" f.exec "xterm -e bpytop &" "›› Bashtop" f.exec "xterm -e bashtop &" "›› Neofetch" f.exec "xterm -e /home/orby/.twm/scripts/neofetch.sh &" "›› Archey3" f.exec "xterm -e /home/orby/.twm/scripts/archey3.sh &" "—————" f.nop "›› Stick Conky" f.exec "vdesk 0 0xa00001 &" "›› Stick Polybar " f.exec "vdesk 0 0xa00002 &" "›› Clipboard" f.exec "xclipboard &" "—————" f.nop "›› About..." f.identify "›› Env Vars" f.exec "env | xmessage -nearmouse -buttons OK:1 -file - &" "›› Wallpaper" f.menu "Wallpaper" } menu "Wallpaper" { "›› Set Blue Elipse" !"fbsetroot -gradient Elliptic -from '#2d527f' -to '#859ac0' &" "›› Set NeXTStep" !"hsetroot -solid '#545476' &" "›› Set MacOS9B" !"hsetroot -solid '#54679c' &" "›› Set Win2KC" !"hsetroot -solid '#3A6EA5' &" "›› Set Slate" !"hsetroot -solid '#4A5562' &" } menu "Office" { "›› Wordpro" f.exec "~/textmaker21free &" "›› Ssheets" f.exec "~/planmaker21free &" "›› Presents" f.exec "~/presentations21free &" "—————" f.nop "›› PDF Docs" f.exec "xpdf &" #"›› PDF Docs" f.exec "xterm -fg black -bg white -geometry 100x90 -T 'MuPDF Man Page' -e 'man mupdf' &" "›› Calculator" f.exec "xcalc &" "›› Calendar" f.exec "cal -y -w | xmessage -nearmouse -buttons OK:1 -file - &" "›› Fox Calc" f.exec "calculator &" "›› Big Clock" f.exec "xclock -digital -chime -bg '#2c2b2b' -fg '#c0c0c0' -strftime %T -update 1 -face 'ter-u32b:style=normal:pixelsize=30' &" } menu "Games" { "›› Galacta" !"padsp xgalaga -mouse -window &" "›› Galacta++" !"padsp xgalaga++ -mouse -window &" "›› Xmahjong" !"xmahjongg --background grass --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 "/home/orby/.twm/scripts/stickwin &" "Sendto 1" f.exec "/home/orby/.twm/scripts/sendto-1 &" "Sendto 2" f.exec "/home/orby/.twm/scripts/sendto-2 &" "Sendto 3" f.exec "/home/orby/.twm/scripts/sendto-3 &" "Sendto 4" f.exec "/home/orby/.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 &" } #********************************* # XINITRC #********************************* # xrdb -load ~/.Xdefaults # xset b 100 600 50 # xsetroot -cursor_name left_ptr # xset m 30/10 4 # setxkbmap gb # xset r rate 200 40 # xset s blank # xset s 240 # xset +dpms # #fbsetroot -gradient Elliptic -from '#2d527f' -to '#859ac0' # hsetroot -center ~/.twm/themes/bluetech/Blue_Tech.jpg # xcompmgr -c -t-5 -l-5 -r4.2 -o.55 & # conky & # exec twm ################################## # The End!