# # *not Default twm configuration file; needs to be kept small to conserve string # space in systems whose compilers don't handle medium-sized strings. # # Sites should tailor this file, providing any extra title buttons, menus, etc. # that may be appropriate for their environment. For example, if most of the # users were accustomed to uwm, the defaults could be set up not to decorate # any windows and to use meta-keys. # NoGrabServer RestartPreviousState DecorateTransients 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 NoDefaults NoRaiseOnDeiconify NoRaiseOnMove NoRaiseOnResize NoRaiseOnWarp NoMenuShadows Color { #DefaultBackground "#222222" #DefaultForeground "#bbbbbb" TitleBackground "#000000" TitleForeground "#ffa2b2" MenuBackground "#000000" MenuForeground "#ffa2b2" MenuBorderColor "#ffa2b2" MenuTitleBackground "#3f003f" MenuTitleForeground "#ffa2b2" BorderColor "#ffa2b2" IconBackground "#000000" IconForeground "#ffa2b2" IconBorderColor "#ffa2b2" IconManagerBackground "#000000" IconManagerForeground "#ffa2b2" IconManagerHighlight "#ffa2b2" BorderTileBackground "#000000" BorderTileForeground "#ffa2b2" } # # 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 } LeftTitleButton ":menu" = f.menu "winset" RightTitleButton ":dot" = f.iconify RightTitleButton ":resize" = f.resize RightTitleButton ":delete" = f.delete menu "winset" { "Window menu" f.title "Iconify" f.iconify "Resize" f.resize "Move" f.move "Raise" f.raise "Lower" f.lower "" f.nop "Delete" f.delete "Destroy" f.destroy "" f.nop "Focus" f.focus "Unfocus" f.unfocus "Fullscreen" f.menu "Fullscreens" } menu "Fullscreens" { "[]" f.fullzoom "" f.nop "->" f.rightzoom "<-" f.leftzoom "/\\ " f.topzoom "\\/" f.bottomzoom "" f.nop "<>" f.hzoom "^v" f.zoom } # # Set some useful bindings. Sort of uwm-ish, sort of simple-button-ish # # Button1 = : root : f.menu "main" Button3 = : root : f.menu "winset" Button1 = m4 : all : f.menu "main" Button3 = m4 : all : f.menu "winset" Button2 = : root : f.exec "xterm &" 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.move Button2 = : title : f.raiselower Button3 = : title : f.resize Button1 = : icon : f.function "move-or-iconify" Button3 = : icon : f.iconify Button1 = : iconmgr : f.iconify Button2 = : iconmgr : f.delete Button3 = : iconmgr : f.move "v" = m4 : all : f.iconify "c" = m4 : all : f.delete "x" = m4 : all : f.destroy " " = m4 : all : f.menu "winset" "e" = m4 : all : f.menu "main" "a" = m4 : all : f.raise "d" = m4 : all : f.lower "a" = m4 | m1 : all : f.focus "d" = m4 | m1 : all : f.unfocus "r" = m4 : all : f.resize "g" = m4 : all : f.move "f" = m4 : all : f.fullzoom "i" = m4 : all : f.zoom "o" = m4 : all : f.hzoom "w" = m4 | m1 : all : f.topzoom "a" = m4 | m1 : all : f.leftzoom "s" = m4 | m1 : all : f.bottomzoom "d" = m4 | m : all : f.rightzoom "t" = m4 : all : f.exec "xterm &" "q" = m4 : all : f.exec "rofi -show drun" "w" = m4 : all : f.upiconmgr "s" = m4 : all : f.downiconmgr "F5" = : all : f.downiconmgr "tab" = m1 : all : f.downiconmgr "F7" = : all : f.exec "brightnessctl -d intel_backlight set 10%+; xcowsay -t 0.5 --at=0,0 $(brightnessctl) &" "F6" = : all : f.exec "brightnessctl -d intel_backlight set 10%-; xcowsay -t 0.5 --at=0,0 $(brightnessctl) &" "F10" = : all : f.exec "pactl set-sink-volume \$(pactl list sinks | grep Sink | tail -c +7) +10%; pactl get-sink-volume $(pactl list sinks | grep Sink | tail -c +7) | xcowsay -t 0.75 --at=0,0 &" "F9" = : all : f.exec "pactl set-sink-volume \$(pactl list sinks | grep Sink | tail -c +7) -10%; pactl get-sink-volume $(pactl list sinks | grep Sink | tail -c +7) | xcowsay -t 0.75 --at=0,0 &" "F8" = : all : f.exec "pactl set-sink-mute \$(pactl list sinks | grep Sink | tail -c +7) toggle; pactl get-sink-mute $(pactl list sinks | grep Sink | tail -c +7) | xcowsay -t 0.75 --at=0,0 &" "F4" = : all : f.fullzoom # # "F5" = # # And a menus with the usual things # menu "main" { "Twm" f.title "windowMenu" f.menu "winset" "" f.nop "IconMgr" f.menu "iconMgr" "" f.nop "Taskmgr" f.menu "taskMgr" "Browser" f.menu "browserMenu" "XTerm" f.exec "exec xterm &" "Shells" f.menu "shellsMenu" "Utils" f.menu "utilsMenu" "Games" f.menu "Games" "Editors" f.menu "editMenu" "" f.nop "Rofi" f.menu "rofi" "ssh" f.menu "ssh" "Uitls" f.menu "utilsMenu" "" f.nop "Configs" f.menu "Configs" "Restart" f.restart "Exit" f.menu "exit" } menu "shellsMenu" { "zsh" f.exec "exec xterm -e zsh &" "bash" f.exec "exec xterm -e bash &" "sh" f.exec "exec xterm -e sh &" "csh (N)" f.exec "exec xterm -e csh &" "bsh (N)" f.exec "exec xterm -e bsh &" "tcsh (N)" f.exec "exec xterm -e tcsh &" } menu "exit" { "Exit?" f.title "No" f.nop "Yes" f.quit } menu "browserMenu" { "fireFox" f.exec "exec firefox &" "falkon (N)" f.exec "exec falkon &" "netsurf (N)" f.exec "exec netsurf &" "dillo" f.exec "exec dillo &" "links" f.exec "exec xterm -e links &" "lynx (N)" f.exec "exec xterm -e lynx &" } menu "editMenu" { "nvim" f.exec "export EDITOR=nvim" "vim" f.exec "export EDITOR=vim" "vi" f.exec "export EDITOR=vi" "" f.nop "micro" f.exec "export EDITOR=micro" "nano" f.exec "export EDITOR=nano" "pico (N)" f.exec "export EDITOR=pico" "" f.nop "emacs (N)" f.exec "export EDITOR=emacs" } menu "rofi" { "drun" f.exec "exec rofi -show drun &" "filemgr" f.exec "exec rofi -show filebrowser &" "keys" f.exec "exec rofi -show keys &" "combi" f.exec "exec rofi -show combi &" "run" f.exec "exec rofi -show run &" "ssh" f.exec "exec rofi -show ssh &" "windows" f.exec "exec rofi -show window &" } menu "ssh" { "sshfs server" f.exec "exec xterm -e sudo sshfs -o allow_other m1a2@server:/ /mnt/serverfs &" "ssh server" f.exec "exec xterm -e ssh server &" "ssh computer" f.exec "exec xterm -e ssh compootor &" "ssh self" f.exec "exec xterm -e ssh diddyv2 &" } menu "iconMgr" { "Show" f.showiconmgr "Hide" f.hideiconmgr } menu "taskMgr" { "btop (N)" f.exec "exec xterm -e btop &" "htop" f.exec "exec xterm -e htop &" "top" f.exec "exec xterm -e top &" } menu "utilsMenu" { "nmtui" f.exec "exec xterm -T \"nmtui\" -e sudo nmtui&" "Xclock" f.exec "exec xclock -d -bg black -fg pink -update 1 -sharp & xclock -update 0.05 &" "Xcalc" f.exec "exec xcalc -fg pink -bg black &" "startXP" f.exec "exec xterm -e /home/m1a2/.startxp.sh &" "CMatrix" f.exec "exec xterm -e cmatrix &" "Cava (E)" f.exec "exec xterm -e cava &" "pulseMixer" f.exec "exec xterm -e pulsemixer &" "Remmina" f.exec "exec flatpak run org.remmina.Remmina &" "music" f.exec "exec xterm -e cvlc http://radio.starcatcher.us/moo &" "wireshark" f.exec "exec sudo wireshark &" } menu "Games" { "TPT" f.exec "exec flatpak run uk.co.powdertoy.tpt &" } menu "Configs" { "Shells" f.menu "shellsConfig" "TWM" f.exec "exec xterm -e nvim ~/.twmrc &" "XP" f.exec "exec xterm -e nvim /home/m1a2/.startxp.sh &" "xinit" f.exec "exec xterm -e nvim ~/.xinitrc &" "grub" f.menu "grubConfig" } menu "shellsConfig" { "zsh" f.exec "xterm -e nvim .zshrc &" "bash" f.exec "xterm -e nvim .bashrc &" "sh" f.exec "xterm -e nvim .profile &" "csh (N)" f.exec "xterm -e nvim .cshrc &" "bsh (N)" f.exec "xterm -e nvim .bshrc &" "tcsh (N)" f.exec "xterm -e nvim .tcshrc &" } menu "grubConfig" { "main" f.exec "xterm -e sudo nvim /etc/default/grub &" "40_custom" f.exec "xterm -e sudo nvim /etc/grub.d/40_custom &" }