guest@dotshare [~/groups/misc/misc] $ ls Rabbits-vtwmrc-VTWM/ | cat

Rabbit's .vtwmrc (VTWM) (scrot, raw, dl)

rabbit386 Feb 17, 2021 (misc/misc)

SCROT

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# RABBIT'S ULTRIX-LIKE VTWM configuration file v.1.5.0

NoGrabServer
RestartPreviousState
NoDefaults
NoTitle # remove this to restore titlebars
ShowIconManager
IconManagerGeometry "1700x24+0+0" 10
SortIconManager
IconifyByUnmapping #comment this to minimize windows to desktop icons
NoMenuShadows # especially useful if you run picom or compton
RightHandSidePulldownMenus 
NaturalAutoPanBehavior 
NotVirtualGeometries 
FixManagedVirtualGeometries
FixTransientVirtualGeometries
SortIconManager #comment this if you want windows to be shown in the iconmgr in the order in which they were spawned
RandomPlacement #comment this if you want to place windows manually, or add a list after this if you want some windows to be placed automatically and all others manually. "Random" is a misnomer.

MoveDelta			3

ResizeRegion			"NorthEast"

FramePadding			2
ButtonIndent			-2
TitlePadding			0
TitleButtonBorderWidth		0

BorderWidth			1
BorderBevelWidth		0 
ButtonBevelWidth		1
DoorBevelWidth			0
IconBevelWidth			0
IconManagerBevelWidth		0
InfoBevelWidth			0
MenuBevelWidth			0
TitleBevelWidth			0
VirtualDesktopBevelWidth	0

ClearBevelContrast		40
DarkBevelContrast		40

#VirtualDesktop			"5x2-0-0" 16 #default placement and size
VirtualDesktop			"5x2+519-0" 20 #in the middle on my monitor
PanDistanceX			100
PanDistanceY			100
PanResistance		750
AutoPan				100

TitleFont		"-adobe-courier-medium-r-normal--*-100-*-*-*-*-*-*"
ResizeFont		"-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuFont		"-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*"
MenuTitleFont		"-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*"
DoorFont		"-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconFont		"-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
InfoFont		"-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont		"-adobe-courier-medium-r-normal--*-100-*-*-*-*-*-*"
VirtualDesktopFont	"-adobe-helvetica-medium-r-normal--*-75-*-*-*-*-*-*"

#
# Lists
#

#NoHighlight

WarpCursor

Immutable
{
	"VTWM Icon Manager" #makes wm controls fixed.
	"VTWM Desktop"
	#add whatever you want to be unmoveable
}

NailedDown
{
	"VTWM *"
	"xclock"
	"xload"
	#add whatever you want to be present on the real screen at all times 
}


DontShowInDisplay
{
	"VTWM *"
	"xclock"
	"xload"
	#add whatever you don't want to see in the panner
}

IconManagerDontShow
{
	"VTWM *"
	"xclock"
	"xload"
	#these will not be present in the iconmanager. It may be worth adding donticonifybyunmapping for these programs.
}

Pixmapsdd
{
	MenuIconPixmap		":rarrow"
	IconManagerPixmap	":dot"
	#as far as I can tell these are builtin icons, probably a bitmap literal in the actual code of VTWM itself. Replace these at your peril.
}

Color
{
	DefaultBackground		"#11454a"
	DefaultForeground		"gray85"
	BorderColor			"white" # Change this to change the active window frame (focus hint)

	BorderTileBackground		"gray60" # Change both of these to change the 
	BorderTileForeground		"gray60" # color of the inactive window frame

	DoorBackground			"#11454a"
	DoorForeground			"gray85"
	TitleBackground			"#11454a"
	TitleForeground			"lightgray"
	MenuBackground			"lightgray"
	MenuForeground			"#11454a"
	MenuTitleBackground		"#11454a"
	MenuTitleForeground		"lightgray"
	IconBackground			"#11454a"
	IconForeground			"gray85"
	IconBorderColor			"gray85"
	IconManagerBackground		"#11454a"
	IconManagerForeground		"gray85"
	VirtualBackground		"gray70"
	VirtualForeground		"black"
	DesktopDisplayBackground	"gray85"
	DesktopDisplayForeground	"black"
        RealScreenBackground            "gray60" 
}

Monochrome
{
	DefaultBackground		"gray50"
	DefaultForeground		"gray85"
	BorderColor			"gray70"
	BorderTileBackground		"gray60"
	BorderTileForeground		"gray60"
	DoorBackground			"gray50"
	DoorForeground			"gray85"
	TitleBackground			"gray50"
	TitleForeground			"gray85"
	MenuBackground			"gray50"
	MenuForeground			"gray85"
	MenuTitleBackground		"gray70"
	MenuTitleForeground		"gray50"
	IconBackground			"gray50"
	IconForeground			"gray85"
	IconBorderColor			"gray85"
	IconManagerBackground		"gray50"
	IconManagerForeground		"gray85"
	VirtualBackground		"gray70"
	VirtualForeground		"black"
	DesktopDisplayBackground	"gray85"
	DesktopDisplayForeground	"black"
        RealScreenBackground            "gray60" 
}

# FUNCTIONS AND KEYBINDINGS --- PAY ATTENTION TO THIS SECTION. 
# Syntax for these bindings is "<MAIN KEY> = [MOD[ | MOD | MOD] : <CONTEXT> : <COMMAND>
# Where MAIN KEY is the non-modifier key or mouse button to be bound, MOD is one of m=alt, c=ctrl, s=shift, l=caps lock, mod1..5 = mN, 
# CONTEXT is what aspect of the WM is under the mouse pointer and COMMAND is a function of VTWM of the form"f.<identifier>"

Function "move-or-iconify" { f.move f.deltastop f.iconify }
Function "move-or-raiselower" { f.move f.deltastop f.raiselower }
Function "warpwindow"         { f.warpsnug f.warp f.warpsnug }

Button3 = : root : f.menu "arrange" #right click on root window
Button2 = : root : f.menu "main" #center click on root window
Button1 = : root : f.menu "apps" #left click on root window
#these bring up the main menus. 

#"r" = m : all : f.exec "rofi -show run &" #ALT-R: replace this with your program launcher... I can't get dmenu to work with this but rofi is fantastic. 
#"e" = m : root : f.exec "thunar ~ &" #ALT-E: replace this with your GUI file manager
"t" = m : root : f.exec "xterm &" #ALT-T: probably any terminal will do just as well

"w" = m : root : f.panup "100" #Use ALT + WASD keys as arrows to pan around on the root window.
"s" = m : root : f.pandown "100"
"a" = m : root : f.panleft "100"
"d" = m : root : f.panright "100"

"w" = c | m : window : f.topzoom #Use CTR+ALT+WASD on a window to expand a window to half the screen (in that direction)
"s" = c | m : window : f.bottomzoom 
"a" = c | m : window : f.leftzoom
"d" = c | m : window : f.rightzoom

"w" = s | m : window : f.fullzoom #ALT+SHIFT+W: maximize window
"s" = s | m : window : f.zoom #ALT+SHIFT+S: expand window to full height of screen
"d" = s | m : window : f.horizoom #ALT+SHIFT+D: expand window to full width of screen.

#ALTERNATELY, YOU COULD USE K for W, H for A, J for S and L for D... this will be familiar to vim users and nethack players.

Button1 = m : window : f.function "move-or-raiselower" #ALT + left click on window to move
Button2 = m : window : f.iconify #ALT + center click on window to minimize
Button3 = m : window : f.resize #ALT + right click on window to resize.

Button1 = m | s : window : f.ring 
## ALT + SHIFT + left click does a very interesting function in this setup -->
## it adds the window to a circle of windows. Then, another command will "warp"
## you to the window, both moving your cursor there (giving it focus) and 
## raising it to the foreground
Button2 = m | s : window : f.focus 
## ALT + SHIFT + center click causes a window to have persistent focus even if the
## cursor is over another window. 
Button3 = m | s : window : f.nail
## ALT + SHIFT + right click will cause a window to remain in the same position 
## on the real screen when the real screen is panned around the virtual desktop

Button3 = m | c : window : f.delete # CTR + ALT + right click to close a window normally (hangup)
Button2 = m | c : window : f.kill # CTR + ALT + center click to force close (kill)
Button1 = m | c : window : f.menu "arrange" # CTR + ALT + left click: this brings up the window menu which has many of the same functions.

"Delete" = m | c : root : f.restart # CTR+ALT+DEL to restart the WM, rereading this file
"F4" = m : root : f.quit # ALT+F4 on the root window is MS-WIN-like keybinding to logout of this WM
"Tab" = m : all : f.warpring "next" # ALT+TAB  '' '' '' '' '' '' '' '' warp to next in ring
"Tab" = m | s : all : f.warpring "prev" # ALT+SHIFT+TAB	warp to previous in ring

Button1 = : icon : f.function "move-or-iconify"
Button3 = : icon : f.menu "arrange"

Button1 = : iconmgr : f.iconify # left click on item in iconmanager to minimize or deminimize
Button2 = : iconmgr : f.warp # center click on an item to go to that window (moves cursor)
Button3 = : iconmgr : f.menu "arrange" # right click on an item to access window menu

Button1 = : virtual : f.movescreen
Button2 = : virtual : f.movescreen
Button3 = : virtual : f.movescreen

Button1 = : desktop : f.movescreen
Button2 = : desktop : f.warp                  # morph desktop to window
Button3 = : desktop : f.function "warpwindow" # morph window to desktop


# MENUS
# This section is extremely self-explanatory. Just don't use "f.exec" without putting a & at the end of the command line. If you don't you WILL 
# softlock the WM unless you enable smart command execution... I don't care to in my own .vtwmrc but you probably can.

menu "main"
{
	"  Commands  "		f.title
	""			                f.separator
	"Show Icon Mgr"		f.showiconmgr
	"Hide Icon Mgr"		f.hideiconmgr
	"Show Desktop"		f.showdesktopdisplay
	"Hide Desktop"		f.hidedesktopdisplay
	"Show/hide nailed"	f.nailedabove
	"Refresh"		f.refresh
	""			f.separator
	"Update Display"	f.restart
	"Logout"		f.quit
}

menu "apps"
{
	"  Applications  "	f.title
	# "Run Command"	f.exec "rofi -show run &" # again, replace this with your program launcher
	"Terminal"	f.exec "xterm &"
	"System"	f.menu "system"
	"Internet"	f.menu "internet"
	"Utilities" 	f.menu "util"
	"Other"		f.menu "misc"
	#At the end of this menu is where I put the command to start the compositor, since I don't always want it running, but I frequently do.
}

menu "system"
{
	"  System  "		f.title
	"xclock"		f.exec "xclock -update 1 &"
	"xload"			f.exec "xload &"
	"xterm"			f.exec "xterm &"
	#"task manager"		f.exec "xterm htop &" # Or replace this with "top" for a program included with most distros, or use a GUI taskmgr
}

menu "internet"
{
	" Internet "	f.title
	#"Firefox"	f.exec "firefox &" # replace these with your favorite internet programs
	#"Thunderbird"	f.exec "thunderbird &"
}

menu "util"
{
	"  Utilities "		f.title
	#"gui text editor"	f.exec "gedit &" 
	#"file manager"		f.exec "[YOUR FM] &"
	#"image browser"	f.exec "[YOUR IMAGE VIEWER] &"
}

menu "misc"
{
	" Other "		f.title
	#maybe put games here?
}

menu "ops"
{
	"  Window Manager  "	f.title
	"Show Icon Mgr"		f.showiconmgr
	"Hide Icon Mgr"		f.hideiconmgr
	"Show Desktop"		f.showdesktopdisplay
	"Hide Desktop"		f.hidedesktopdisplay
	"Show/hide nailed"	f.nailedabove
	"Refresh"		f.refresh
}

menu "arrange"
{
	"  Window  "		f.title
	"Set autoraise"		f.autoraise
	"Nail down"		f.nail
	"Add to Ring"		f.ring
	""			f.separator
	#"Move"			f.move
	#"Resize"		f.resize
	#"Minimize"		f.iconify
	#""			f.separator
	"Maximize"		f.fullzoom
	"Mazimize horizontal"	f.horizoom
	"Maximize vertical"	f.zoom
	""			f.separator
	"Left tab"		f.squeezeleft
	"Center tab"		f.squeezecenter
	"Right tab"		f.squeezeright
	""			f.separator
	"Close"			f.delete
	"Kill"			f.destroy
}

CLICK TO VIEW

x

Notes

VTWM

VTWM is obscure now, having been overtaken by FVWM long ago, and lord knows that even FVWM, JWM and CWM aren’t much in style anymore. I would say that Xmonad is probably the cool thing to have as your WM, and I3 is Xmonad for mere mortals, while Openbox is the standalone stacking window manager that I see people using. But in the 90’s this was the best shit they’d ever seen. I use it instead of FVWM because I find the syntax of the configuration MUCH easier.

This is a third generation X window manager, derived directly from TWM… it’s not to be confused with TVTWM, CTWM or for that matter, FVWM. TWM was basically the defining second generation WM, a robust and fairly usable replacement for UWM (Ultrix WM), the most common of the original X WM’s.

Now, me, I wasn’t around but I read some descriptions of UWM and used XMonad briefly. XMonad does emulate some UWM keybindings for windows in floating mode, oddly enough, though probably XMonad is copying from someone else who was copying from UWM. But I was still very much in love with the easy custom menus and low resource consumption of VTWM, which I knew from some time I spent dicking around with basic X setups on a minimal FreeBSD install.

So I installed VTWM on Fedora and hammered this out over a few drunken evenings.

Like UWM and XMonad in tiling mode, it has no window decorations with the exception of a focus hint border like XMonad–all window commands are either accessed through a menu, or, more conveniently, combinations of modifiers and mouse buttons. XMonad users will recognize ALT+right click for resize and ALT+left click for raise window/move, but ALT-center click minimizes the window (presumably you have center button emulation on your computer if you have a laptop), and there are more, detailed in the keybinding section towards the bottom.

Best used with a login manager that can set the background, or you can try to put nitrogen –restore somewhere in your login manager’s files. I have been frustrated trying to get this to work on LightDM, since I’m not smart enough to mess with the whole construct that .xinitrc has become.

VTWM suprisingly can talk to xcompmgr derivatives like Compton and Picom, though I had a hard time configuring Picom itself personally, and I’m still stuck using outdated Compton binaries.

In my setup I don’t actually have VTWM throwing any hints to Compton, Compton is just reading standard X11 stuff and doing what it needs to. My Compton conf wouldn’t be interesting, it’s just enough to make sure that inactive windows are 80% transparent, that Compton and Conky play nice, and that Feh doesn’t get made transparent even when focused. I still haven’t figured out how to make Compton play nice with Urxvt windows that are running embedded inside other windows (the main example on my system being “tabbed,” the Suckless multi-tab container for embeddable X applications.

BUGS: plenty. You can still minimize the icon manager and panner and cannot retrieve them except by restarting the WM. A stopgap would of course be to set it to minimize these to icons rather than try to put them the icon manager (which it is not allowed to). Any solution is going to be ugly, this software is older than me but it’s what I happened to find and make myself at home in.