--- yeahconsole-0.3.4.orig/yeahconsole.c 2009-03-03 23:33:49.000000000 +0300 +++ yeahconsole-0.3.4/yeahconsole.c 2009-03-03 23:26:06.000000000 +0300 @@ -47,10 +47,11 @@ char *progname, command[256]; int revert_to; int screen; -int opt_x, opt_width, opt_height, opt_delay, opt_bw, opt_step, +int opt_x, opt_y, opt_width, opt_height, opt_delay, opt_bw, opt_step, height, opt_restart; char *opt_color; char *opt_term; +char *opt_xterm_params; KeySym opt_key; KeySym opt_key_smaller; KeySym opt_key_bigger; @@ -92,8 +93,10 @@ "foo can be any standard xterm/urxvt xresource or:\n" "resource default value\n\n" "term: xterm\n" + "term-params: -fs 10 -fa 'Mono'" "restart: 0\n" "xOffset: 0\n" + "yOffset: 0\n" "screenWidth: Display width\n" "consoleHeight: 10\n" "aniDelay: 40\n" @@ -154,7 +157,7 @@ roll(DOWN); XUngrabServer(dpy); } - XMoveWindow(dpy, win, opt_x, 0); + XMoveWindow(dpy, win, opt_x, opt_y); transparency_hack(); hidden = 0; @@ -258,6 +261,8 @@ opt_height = opt ? atoi(opt) : 10; opt = XGetDefault(dpy, progname, "xOffset"); opt_x = opt ? atoi(opt) : 0; + opt = XGetDefault(dpy, progname, "yOffset"); + opt_y = opt ? atoi(opt) : 0; opt = XGetDefault(dpy, progname, "aniDelay"); opt_delay = opt ? atoi(opt) : 40; opt = XGetDefault(dpy, progname, "stepSize"); @@ -266,6 +271,8 @@ opt_restart = opt ? atoi(opt) : 0; opt = XGetDefault(dpy, progname, "term"); opt_term = opt ? opt : "xterm"; + opt = XGetDefault(dpy, progname, "xterm-params"); + opt_xterm_params = opt ? opt : "-fs 10 -fa 'Mono'"; opt = XGetDefault(dpy, progname, "toggleKey"); opt_key = opt ? grab_that_key(opt, numlockmask) : grab_that_key(def_key, @@ -327,7 +334,7 @@ attrib.override_redirect = True; attrib.background_pixel = BlackPixel(dpy, screen); win = XCreateWindow(dpy, root, - opt_x, -200, opt_width, 200, + opt_x, opt_y, opt_width, 200, 0, CopyFromParent, InputOutput, CopyFromParent, CWOverrideRedirect | CWBackPixel, &attrib); XSelectInput(dpy, win, @@ -366,6 +373,7 @@ XResizeWindow(dpy, win, opt_width, height + opt_bw); if (move) XMoveWindow(dpy, win, opt_x, -(height + opt_bw)); + } void init_command(int argc, char *argv[]) @@ -380,7 +388,7 @@ progname); else pos += - sprintf(pos, "%s -b 0 -into %d -name %s ", opt_term, (int) win, + sprintf(pos, "%s -b 0 %s -into %d -name %s ", opt_term, opt_xterm_params, (int) win, progname); for (i = 1; i < argc; i++) { pos += sprintf(pos, "%s ", argv[i]);