Lines 47-56
Link Here
|
47 |
char *progname, command[256]; |
47 |
char *progname, command[256]; |
48 |
int revert_to; |
48 |
int revert_to; |
49 |
int screen; |
49 |
int screen; |
50 |
int opt_x, opt_width, opt_height, opt_delay, opt_bw, opt_step, |
50 |
int opt_x, opt_y, opt_width, opt_height, opt_delay, opt_bw, opt_step, |
51 |
height, opt_restart; |
51 |
height, opt_restart; |
52 |
char *opt_color; |
52 |
char *opt_color; |
53 |
char *opt_term; |
53 |
char *opt_term; |
|
|
54 |
char *opt_xterm_params; |
54 |
KeySym opt_key; |
55 |
KeySym opt_key; |
55 |
KeySym opt_key_smaller; |
56 |
KeySym opt_key_smaller; |
56 |
KeySym opt_key_bigger; |
57 |
KeySym opt_key_bigger; |
Lines 92-99
Link Here
|
92 |
"foo can be any standard xterm/urxvt xresource or:\n" |
93 |
"foo can be any standard xterm/urxvt xresource or:\n" |
93 |
"resource default value\n\n" |
94 |
"resource default value\n\n" |
94 |
"term: xterm\n" |
95 |
"term: xterm\n" |
|
|
96 |
"term-params: -fs 10 -fa 'Mono'" |
95 |
"restart: 0\n" |
97 |
"restart: 0\n" |
96 |
"xOffset: 0\n" |
98 |
"xOffset: 0\n" |
|
|
99 |
"yOffset: 0\n" |
97 |
"screenWidth: Display width\n" |
100 |
"screenWidth: Display width\n" |
98 |
"consoleHeight: 10\n" |
101 |
"consoleHeight: 10\n" |
99 |
"aniDelay: 40\n" |
102 |
"aniDelay: 40\n" |
Lines 154-160
Link Here
|
154 |
roll(DOWN); |
157 |
roll(DOWN); |
155 |
XUngrabServer(dpy); |
158 |
XUngrabServer(dpy); |
156 |
} |
159 |
} |
157 |
XMoveWindow(dpy, win, opt_x, 0); |
160 |
XMoveWindow(dpy, win, opt_x, opt_y); |
158 |
|
161 |
|
159 |
transparency_hack(); |
162 |
transparency_hack(); |
160 |
hidden = 0; |
163 |
hidden = 0; |
Lines 258-263
Link Here
|
258 |
opt_height = opt ? atoi(opt) : 10; |
261 |
opt_height = opt ? atoi(opt) : 10; |
259 |
opt = XGetDefault(dpy, progname, "xOffset"); |
262 |
opt = XGetDefault(dpy, progname, "xOffset"); |
260 |
opt_x = opt ? atoi(opt) : 0; |
263 |
opt_x = opt ? atoi(opt) : 0; |
|
|
264 |
opt = XGetDefault(dpy, progname, "yOffset"); |
265 |
opt_y = opt ? atoi(opt) : 0; |
261 |
opt = XGetDefault(dpy, progname, "aniDelay"); |
266 |
opt = XGetDefault(dpy, progname, "aniDelay"); |
262 |
opt_delay = opt ? atoi(opt) : 40; |
267 |
opt_delay = opt ? atoi(opt) : 40; |
263 |
opt = XGetDefault(dpy, progname, "stepSize"); |
268 |
opt = XGetDefault(dpy, progname, "stepSize"); |
Lines 266-271
Link Here
|
266 |
opt_restart = opt ? atoi(opt) : 0; |
271 |
opt_restart = opt ? atoi(opt) : 0; |
267 |
opt = XGetDefault(dpy, progname, "term"); |
272 |
opt = XGetDefault(dpy, progname, "term"); |
268 |
opt_term = opt ? opt : "xterm"; |
273 |
opt_term = opt ? opt : "xterm"; |
|
|
274 |
opt = XGetDefault(dpy, progname, "xterm-params"); |
275 |
opt_xterm_params = opt ? opt : "-fs 10 -fa 'Mono'"; |
269 |
opt = XGetDefault(dpy, progname, "toggleKey"); |
276 |
opt = XGetDefault(dpy, progname, "toggleKey"); |
270 |
opt_key = |
277 |
opt_key = |
271 |
opt ? grab_that_key(opt, numlockmask) : grab_that_key(def_key, |
278 |
opt ? grab_that_key(opt, numlockmask) : grab_that_key(def_key, |
Lines 327-333
Link Here
|
327 |
attrib.override_redirect = True; |
334 |
attrib.override_redirect = True; |
328 |
attrib.background_pixel = BlackPixel(dpy, screen); |
335 |
attrib.background_pixel = BlackPixel(dpy, screen); |
329 |
win = XCreateWindow(dpy, root, |
336 |
win = XCreateWindow(dpy, root, |
330 |
opt_x, -200, opt_width, 200, |
337 |
opt_x, opt_y, opt_width, 200, |
331 |
0, CopyFromParent, InputOutput, CopyFromParent, |
338 |
0, CopyFromParent, InputOutput, CopyFromParent, |
332 |
CWOverrideRedirect | CWBackPixel, &attrib); |
339 |
CWOverrideRedirect | CWBackPixel, &attrib); |
333 |
XSelectInput(dpy, win, |
340 |
XSelectInput(dpy, win, |
Lines 366-371
Link Here
|
366 |
XResizeWindow(dpy, win, opt_width, height + opt_bw); |
373 |
XResizeWindow(dpy, win, opt_width, height + opt_bw); |
367 |
if (move) |
374 |
if (move) |
368 |
XMoveWindow(dpy, win, opt_x, -(height + opt_bw)); |
375 |
XMoveWindow(dpy, win, opt_x, -(height + opt_bw)); |
|
|
376 |
|
369 |
} |
377 |
} |
370 |
|
378 |
|
371 |
void init_command(int argc, char *argv[]) |
379 |
void init_command(int argc, char *argv[]) |
Lines 380-386
Link Here
|
380 |
progname); |
388 |
progname); |
381 |
else |
389 |
else |
382 |
pos += |
390 |
pos += |
383 |
sprintf(pos, "%s -b 0 -into %d -name %s ", opt_term, (int) win, |
391 |
sprintf(pos, "%s -b 0 %s -into %d -name %s ", opt_term, opt_xterm_params, (int) win, |
384 |
progname); |
392 |
progname); |
385 |
for (i = 1; i < argc; i++) { |
393 |
for (i = 1; i < argc; i++) { |
386 |
pos += sprintf(pos, "%s ", argv[i]); |
394 |
pos += sprintf(pos, "%s ", argv[i]); |