-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.twmrc
291 lines (230 loc) · 8.37 KB
/
.twmrc
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
###############################################################################
# Author: PythonXadds>
# #Date: Monday 1st September 2020
#
#
# This file controls behavior of twm window manager. Although twm is pretty old
# it is stull usefull on slow remote display. Basicaly it is verry stupid one
# but it has a powerful configuration options and can look pretty well
#
# Note: I created this rc for use with weirdx xserver which is a little buggy..
# so i put f.refresh in "move-to-raise" function which is save to remove
# when twm is used with another xserver
###############################################################################
# These parameters defines twm look
# These control various workspace colors.
Color {
BorderColor "darkgray"
BorderTileBackground "blue"
BorderTileForeground "bisque"
DefaultBackground "gray85"
DefaultForeground "gray85"
IconBackground "blue"
IconForeground "black"
IconBorderColor "blue"
IconManagerBackground "blue"
IconManagerForeground "white"
IconManagerHighlight "blue"
MenuBackground "white"
MenuForeground "black"
MenuShadowColor "gray85"
MenuTitleBackground "gray85"
MenuTitleForeground "black"
TitleBackground "gray85"
TitleForeground "black"
}
# Controls shape of cursor under various conditions.
Cursors {
Frame "top_left_arrow"
Title "top_left_arrow"
Icon "top_left_arrow"
IconMgr "top_left_arrow"
Move "fleur"
Resize "sizing"
Menu "sb_right_arrow"
Button "hand1"
Wait "watch"
Select "dot"
Destroy "pirate"
}
# Various font definitions
#ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
IconFont "variable"
IconManagerFont "variable"
MenuFont "variable"
TitleFont "variable"
# Pixel width of border around windows.
BorderWidth 3
# Sets space between title bar and application window.
#FramePadding 2
# Size of border around desktop icons.
IconBorderWidth 4
# Desktop-style icons will be put in the following screen region. (we use IconManger instead)
#IconRegion "72x600-0+0" NORTH EAST 72 72
# Initial location of Icon Manager, colums of icons.
IconManagerGeometry "90-0+30" 1
# This makes sure child windows have a border and title bar.
##DecorateTransients
# This makes title bars as wide as the window. (is this working?)
##DontSqueezeTitle
# Don't create Icon Manager (stupid!)
##NoIconManagers
# Keeps menus from having shadows behind them. (stupid!;)
##NoMenuShadows
# This makes title bars short, like a tab on a file folder. (ugly!)
##SqueezeTitle
###############################################################################
# These parameters controls twm and windows behaviour
# Length of time to achieve a "double-click" for constained move.
ConstrainedMoveTime 400
# Windows resize without having to drag pointer over their borders.
AutoRelativeResize
# This disallows moving windows off the visible screen.
DontMoveOff
# Set Named Windows Titles
# Named Windows will have no title bar.
NoTitle { "TWM Icon Manager" "xclock" }
# Force named windows to have title bars.
#MakeTitle {}
# Windows are automatically placed; no need to drag out outline.
RandomPlacement
# Windows are not automatically brought to top when deinconified.
##NoRaiseonDeiconify
# Windows are not automatically brought to top when moved.
##NoRaiseOnMove
# Windows are not automatically brought to top when resized.
##NoRaiseOnResize
# Windows are not automatically brought to top when cursor warps to them.
##NoRaiseOnWarp
# Show windows contents while draggin'
#OpaqueMove
# Move cursor into windows when they're deiconified.
WarpCursor
##############################################################################
# Set IconManager behaviour
# Display Icon Manager on startup.
ShowIconManager
# Sort icons in Icon Manager in alphabetical order.
SortIconManager
# Named windows will not be shown in Icon Manager
IconManagerDontShow { "xclock" "Virtual Desktop" }
# Named windows will _not_ go to icon manager, but will have desktop icons.
#DontIconifyByUnmapping { "xclock" "Virtual Desktop" }
# Makes applications use icons in Icons directive, instead of their own.
#ForceIcons
# Iconifying a window sends it to the Icon Manager
IconifyByUnmapping
# Named windows will be shown in Icon Manager
#IconManagerShow
# You can specify that certain apps have icons other than the default.
#Icons {}
# Named windows will start iconized.
#StartIconified {}
# Disable default titles and buttons .. so we should provide bindings - too pitty
NoDefaults
# Dont loose focus when mouse moves away from it (this is annoying)
#NoTitleFocus
# Makes an extra button on each title bar, that calls up menu below.
LeftTitleButton "menu12" = f.menu "WindowOpsMenu"
RightTitleButton "gray" = f.iconify
RightTitleButton "dropbar8" = f.fullzoom
RightTitleButton "dot" = f.delete
# Clicking on the desktop brings up the system-wide menu.
Function "move-or-raise" { f.move f.deltastop f.raise f.refresh }
Button1 = : root : f.menu "DesktopMenuApps"
Button2 = : root : f.exec "xrefresh"
Button3 = : root : f.menu "DesktopMenuTools"
Button1 = : title : f.function "move-or-raise"
Button3 = : title : f.menu "WindowOpsMenu"
Button1 = : iconmgr : f.iconify
Button3 = : iconmgr : f.menu "WindowOpsMenu"
##############################################################################
# Declare some usefull menus
Menu "WindowOpsMenu" {
"Iconify" f.iconify
"Move .." f.move
"Resize..." f.resize
"Zoom" f.fullzoom
"Refresh" f.winrefresh
"" f.nop
"Close" f.delete
"Kill" f.destroy
}
Menu "DesktopMenuApps" {
"Applications" f.title
"SetBg" f.exec "xsetroot -solid 'rgb:2/a/9'"
"Clock" f.exec "xclock -bg 'rgb:2/a/9' -fg black -digital -geometry '-0-0' -padding 0 &"
"" f.nop
"Xterm" f.exec "xterm -ls -bg black -fg gray85 &"
"lxterminal" f.exec "xterm -ls -bg white -fg black -e lxterminal &"
"Nitrogen" f.exec "xterm -ls -bg white -fg black -e nitrogen &"
"gvim" f.exec "xterm -ls -bg white -fg black -e gvim &"
"geany" f.exec "xterm -ls -bg white -fg black -e geany &"
"firefox" f.exec "xterm -ls -bg white -fg black -e firefox &"
"thunar" f.exec "xterm -ls -bg white -fg black -e thunar &"
"beaver" f.exec "xterm -ls -bg white -fg black -e beaver &"
"Command" f.exec "xterm -geometry 25x1+840+1150 -title Run -e ~/.twm/scripts/getrun &"
"" f.nop
"Restart" f.restart
"Exit" f.quit
}
Menu "DesktopMenuTools" {
"Tools" f.title
"Iconify" f.iconify
"Maximize" f.fullzoom
"Move ..." f.move
"Resize ..." f.resize
"Refresh" f.winrefresh
"" f.nop
"Kill" f.destroy
"Close" f.delete
}
# Virtual Desktops
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"
# Sinmenu "WindowMenu" {
"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 &"
}
# since twm cannot autostart applications I created this script.
# It will set desktop foreground to default twm menu background color and
# will start xcloc on bottom down corner of the screen.
# --- cut here ---
# !/bin/sh
# echo Starting twm window manager ...
# twm &
# xsetroot -solid 'rgb:2/a/9'
# xclock -bg 'rgb:2/a/9' -fg black -digital -geometry '-0-0' -padding 0 &
# exec xterm
# --- cut here ---
xsetroot -bitmap bricks.xbm -fg "#808080" -bg "#101010"