summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2021-03-14 01:38:36 +0100
committerAdrian C. (anrxc) <anrxc@sysphere.org>2021-03-14 01:38:36 +0100
commitc8e53eb2e8dd526046e46edf15938f36d577bd2f (patch)
tree983ac0c4b0b788c322ee68373997c7e28fe2d6f8
parent1dac33d09fd8f63ce1de0a07d38e6c8470cd60e5 (diff)
downloaddotfiles-c8e53eb2e8dd526046e46edf15938f36d577bd2f.tar.xz
twmrc: finish seamless host integration
-rw-r--r--twmrc207
1 files changed, 145 insertions, 62 deletions
diff --git a/twmrc b/twmrc
index 3c0786b..023d6bc 100644
--- a/twmrc
+++ b/twmrc
@@ -1,6 +1,34 @@
# -*- conf -*-
#
-# anrxc's init file for twm 1.0.11 on VirtualBox GNU/Linux guest.
+# TWM init file using twm 1.0.11 on VirtualBox GNU/Linux guest.
+# - Adrian C. <anrxc..sysphere.org>
+#
+# Screenshot:
+# - https://sysphere.org/gallery/snapshots/omnic-seamless.png.html
+#
+# FAQ:
+# 1. Why:
+# - If you are forced to use Windows (or MacOS) at work even
+# 1440p guests with TWM in seamless mode will have minimum
+# overhead and need only 32MB video memory allocated.
+#
+# 2. Titlebar icons are from Graham's TWM page:
+# - http://www.custompc.plus.com/twm/
+#
+# 3. Mouse pointers for Windows 10 integration:
+# - https://www.gnome-look.org/p/1409346/
+#
+# 4. Where is the rest (Xdefaults, xinit):
+# - https://git.sysphere.org/dotfiles/tree
+#
+# 5. Fonts I use:
+# - http://terminus-font.sourceforge.net/
+# - http://artwizaleczapka.sourceforge.net/
+# - https://tobiasjung.name/profont/
+# - https://github.com/liberationfonts
+#
+# 6. What is Zenburn:
+# - https://kippura.org/zenburnpage/
#
# This work is licensed under the Creative Commons Attribution
# License: http://creativecommons.org/licenses/by/2.0/
@@ -8,8 +36,6 @@
#
# Base configuration
-# - if twm won't launch with UTF-8 locale ("unable to open fontset
-# <font set>") launch it with: LANG=C twm -f ${HOME}/.twmrc
#
NoDefaults
NoGrabServer
@@ -25,15 +51,20 @@ DontMoveOff
IconifyByUnmapping
WarpUnmapped
#RandomPlacement
+ButtonIndent 0
+FramePadding 3
+NoTitleHighlight
+TitlePadding 2
+TitleButtonBorderWidth 0
BorderWidth 1
-#ButtonIndent 2
+MenuBorderWidth 1
+NoMenuShadows
#NoHighlight
#AutoRelativeResize
-##DefaultBackground
-#FramePadding 0
-##ForceIcons
+##DefaultBackground "white"
+ForceIcons
#NoRaiseOnMove
-#OpaqueMove
+OpaqueMove
MoveDelta3
ShowIconManager
#StartIconified { "someapp" }
@@ -47,25 +78,66 @@ NoHighlight { "scratchpad" "TWM Icon Manager" }
IconManagerDontShow { "scratchpad" "TWM Icon Manager" }
+# #
+# # Zenburn Theme
+# #
+# Color
+# {
+# BorderColor "#6F6F6F"
+# BorderTileBackground "#3F3F3F"
+# BorderTileForeground "#3F3F3F"
+# DefaultBackground "#3F3F3F"
+# DefaultForeground "#DCDCCC"
+# TitleBackground "#1E2320"
+# TitleForeground "#F0DFAF"
+# MenuBackground "#3F3F3F"
+# MenuForeground "#DCDCCC"
+# MenuTitleBackground "#1E2320"
+# MenuTitleForeground "#F0DFAF"
+# IconBackground "#1E2320"
+# IconForeground "#F0DFAF"
+# IconBorderColor "#6F6F6F"
+# IconManagerBackground "#1E2320"
+# IconManagerForeground "#F0DFAF"
+# }
+
+
#
-# Zenburn Theme
+# Windows 10 Dark Theme [seamless]
#
Color
{
- BorderColor "#6F6F6F"
- DefaultBackground "#3F3F3F"
- DefaultForeground "#DCDCCC"
- TitleBackground "#1E2320"
- TitleForeground "#F0DFAF"
- MenuBackground "#3F3F3F"
- MenuForeground "#DCDCCC"
- MenuTitleBackground "#1E2320"
- MenuTitleForeground "#F0DFAF"
- IconBackground "#1E2320"
- IconForeground "#F0DFAF"
- IconBorderColor "#6F6F6F"
- IconManagerBackground "#1E2320"
- IconManagerForeground "#F0DFAF"
+ DefaultBackground "#222222"
+ DefaultForeground "#FFFFFF"
+ MenuBackground "#222222"
+ MenuForeground "#FFFFFF"
+ MenuBorderColor "#9E9FA1"
+ MenuTitleBackground "#575759"
+ MenuTitleForeground "#FFFFFF"
+ IconBackground "#575759"
+ IconForeground "#FFFFFF"
+ IconBorderColor "#9E9FA1"
+ IconManagerBackground "#222222"
+ IconManagerForeground "#FFFFFF"
+ # Borders
+ # - if you predominantly use 1 seamless window it will always be
+ # considered "focused" so it will have the light border even
+ # when unfocused on the host, in which case it might be better
+ # to flip the colors around
+ #BorderColor "#9E9FA1"
+ #BorderTileBackground "#2D3033"
+ #BorderTileForeground "#2D3033"
+ BorderColor "#2D3033"
+ BorderTileBackground "#9E9FA1"
+ BorderTileForeground "#9E9FA1"
+ # Titlebars
+ # - Firefox is too busy Dark themed, but it's one window that's
+ # always visible and we might want to blend with it even when
+ # native theme is "Dark" but Firefox still uses "Light"
+ #TitleBackground "#000000"
+ #TitleForeground "#FFFFFF"
+ TitleBackground "#E3E4E6"
+ TitleForeground "#18191A"
}
@@ -73,8 +145,6 @@ Color
# Mouse pointer theme
# - corresponds to Xcursor pointers
#
-# - if you want Windows 10 seamless integration
-# check https://www.gnome-look.org/p/1409346/
Cursors
{
Button "hand2"
@@ -112,42 +182,56 @@ Function "move-or-iconify" { f.move f.deltastop f.iconify }
#
# Key and button binding configuration
#
+# - Mouse bindings
Button1 = : root : f.menu "mainmenu"
Button2 = : root : f.menu "defops"
-
+#
Button1 = c : window|icon : f.resize
Button2 = c : window|icon : f.move
Button3 = c : window|icon : f.iconify
-
+#
Button1 = s : window|icon : f.raise
Button3 = s : window|icon : f.lower
-
-Button1 = : title : f.function "move-or-raise"
-Button2 = : title : f.raiselower
-Button3 = : title : f.function "move-or-lower"
-
+#
+Button1 = : title : f.function "move-or-raise"
+Button2 = : title : f.raiselower
+Button3 = : title : f.function "move-or-lower"
+#
Button2 = c : title : f.delete
Button3 = c : title : f.destroy
-
-Button1 = : icon : f.function "move-or-iconify"
-Button2 = : icon : f.iconify
-
+#
+Button1 = : icon : f.function "move-or-iconify"
+Button2 = : icon : f.iconify
+#
Button1 = : iconmgr : f.iconify
Button2 = : iconmgr : f.iconify
-#
+# - Key bindings
+# * maximize awesomeMW style
+"m" = mod4 : all : f.fullzoom
+# * capture both kill methods (win and awesomeWM)
+"F4" = mod1 : all : f.delete
+"c" = mod4 : all : f.delete
+# * restart and quit awesomeWM style
+"r" = mod4 | s : all : f.restart
+"q" = mod4 | s : all : f.quit
+# * launch Emacs awesomeWM style
+"e" = mod4 : all : f.exec "LANG=en_US.UTF-8 xterm -geometry 175x75+700+150 -T Emacs -e emacs &"
+# * launch a terminal awesomeWM style
+"F1" = mod1 : all : f.exec "LANG=en_US.UTF-8 xterm -geometry 190x50+700+150 -T xterm &"
+
# - Copy/paste
-# * VBoxClient clipboard malfunctions all the time, it's unreliable
-# with the cut buffer but even if using xclipboard to bridge the
-# buffers it gets stuck. This is a reliable workaround.
+# * VBoxClient clipboard is unreliable with the cut buffer, even if
+# bridging the buffers with xclipboard it gets stuck. This is a
+# reliable workaround
#
-# - intercepting Ctrl-c doesn't feel right, use F1 for now
+# - intercepting Ctrl-c is impossible, use Alt+c and F1 for now and
+# see which one sticks in muscle memory
#"c" = c : all : f.exec "xsel | xclip -selection clipboard"
+"c" = m : all : f.exec "xsel | xclip -selection clipboard"
"F1" = : all : f.exec "xsel | xclip -selection clipboard"
-#
-# - Alt+Tab
-#
+# - Alt+Tab and/or modN+j/k
WindowRing
{
"Links"
@@ -157,20 +241,20 @@ WindowRing
"zsh"
"irssi"
"Alpine"
+ "Emacs"
"scratchpad"
}
-#
-"Tab" = m : all : f.warpring "next"
-"Tab" = m | s : all : f.warpring "prev"
+# - enable win style
+"Tab" = mod1 : all : f.warpring "next"
+# - enable awesomeWM j/k style too
+"j" = mod4 : all : f.warpring "next"
+"k" = mod4 : all : f.warpring "prev"
-#
-# - Alt+Tilda
-# * scratchdrop aka. quaketerm
-#
+# - Alt+Tilda (partial scratchpad/quaketerm emulation)
Function "launch-scratchpad"
{
- f.exec "LANG=en_US.UTF-8 xterm -T scratchpad -geometry 320x20+0+840 -e zsh &"
- f.exec "xdotool mousemove 345 1000"
+ f.exec "LANG=en_US.UTF-8 xterm -T scratchpad -geometry 320x20+320+1168 -e zsh &"
+ f.exec "xdotool mousemove 1200 1220"
f.raise
}
"grave" = mod1 : all : f.function "launch-scratchpad"
@@ -182,17 +266,16 @@ Function "launch-scratchpad"
menu "mainmenu"
{
"Applications" f.title
- #
- "Term Tiny" f.exec "LANG=en_US.UTF-8 xterm -geometry 100x20+0+0 -e zsh &"
- "Term Small" f.exec "LANG=en_US.UTF-8 xterm -geometry 320x88+0+0 -e zsh &"
- "Term Large" f.exec "LANG=en_US.UTF-8 xterm -geometry 426x118+0+0 -e zsh &"
- "Term Scratch" f.exec "LANG=en_US.UTF-8 xterm -geometry 320x20+0+840 -T scratchpad -e zsh &"
"" f.nop
- "Links" f.exec "LANG=en_US.UTF-8 xterm -geometry 320x88+0+0 -T Links -e links &"
+ #"XTerm HDTV" f.exec "LANG=en_US.UTF-8 xterm -geometry 320x88+0+0 -e zsh &"
+ #"XTerm WQHD" f.exec "LANG=en_US.UTF-8 xterm -geometry 426x118+0+0 -e zsh &"
+ "XTerm" f.exec "LANG=en_US.UTF-8 xterm -geometry 190x50+100+100 -e zsh &"
+ "Emacs" f.exec "LANG=en_US.UTF-8 xterm -geometry 175x75+700+150 -T Emacs -e emacs &"
+ "Links" f.exec "LANG=en_US.UTF-8 xterm -geometry 175x75+700+150 -T Links -e links &"
"" f.nop
- "Xcalc" f.exec "xcalc -rpn &"
- "Xmodmap" f.exec "xmodmap ${HOME}/.Xmodmap && xmodmap ${HOME}/.Xmodmap"
- "Xclipboard" f.exec "xclipboard &"
+ "XCalc" f.exec "xcalc -rpn &"
+ "XModmap" f.exec "xmodmap ${HOME}/.Xmodmap && xmodmap ${HOME}/.Xmodmap"
+ "XClipboard" f.exec "xclipboard &"
#"" f.nop
#"Submenu1" f.menu "submenu1_menu"
#"" f.nop