ratmenu-2.3.14/0000755000000000000000000000000011350573307010146 5ustar ratmenu-2.3.14/ChangeLog0000644000000000000000000000471110222726227011721 0ustar djw Sat Sep 15 15:17:34 PDT 2001 Version 1.0 * Initial release djw Sat Sep 15 16:17:34 PDT 2001 Version 1.1 * added the -align option so you can decide how menu entries get aligned (left, right or center) djw Sat Sep 15 17:17:34 PDT 2001 Version 1.2 * swapped the sense of the "j" and "k" keystrokes to be more natural * added "q" keystroke to exit for Gergely * added Space as keystroke same as Return djw Sun Sep 16 10:22:45 PDT 2001 Version 1.2 * updated the debian directory to reflect the change from 9menu to ratmenu djw Tue Sep 18 11:29:32 PDT 2001 Version 1.3 * made menu behavior configurable with -style option * added UpArrow/DownArrow and u/d keystroke support * added Tab and Backspace keystrokes * changed functionality of Space keystroke to go to next item instead of selecting item * made RightArrow have same functionality as Enter djw Mon Sep 24 10:52:42 PDT 2001 Version 1.4 * added the -fg, -bg, and -font options back in * cleaned up the event handling loop to remove the rodent detritus * fixed the man page; support for a special "exit" menu item was removed ages ago and now the manpage reflects that * added an install target to the makefile djw Wed Oct 10 12:57:39 PDT 2001 Version 1.5 * updated manpage to document keystrokes * took out 'd' and 'u' keystrokes, added '+' and '-' * changed syntax so menu items can include the ':' character djw Thu Oct 11 11:56:17 PDT 2001 Version 1.6 * fixed a non-bug; now uses "ratmenu" resource class instead of "9menu". djw Sat Dec 15 12:45:47 PST 2001 Version 1.7 * minor code cleanup; got rid of extraneous call to XGetGeometry() and unneeded assignment statements * fixed the version string djw Sun Jun 2 11:19:23 PDT 2002 1.8 * fixed typo in usage() * fixed ChangeLog entry for version 1.7 * added the -back option for full traversal of menu hierarchies djw Sun Jun 2 13:46:35 PDT 2002 1.9 * updated the manpage djw Sun Jun 2 14:16:03 PDT 2002 1.9.1 * updated the manpage again to be clearer * fixed quoting of the ' character in the manpage djw Sun Jun 8 16:53:43 PDT 2003 2.0 * added the -persist option djw Sun Jun 8 23:45:51 PDT 2003 2.1 * moved README.9menu into the LICENSE file djw Sun Feb 13 10:56:24 PST 2005 2.3.2 * removed unneeded fork() from spawn function * added fallback to default /bin/sh if user specified shell didn't work. djw Wed Mar 30 23:41:25 PST 2005 2.3.4 * fixed uninitialized variable djw Wed Mar 30 23:41:25 PST 2005 2.3.5 * fixed an improperly initialized variable ratmenu-2.3.14/ratmenu.10000644000000000000000000001242511067536421011710 0ustar .TH RATMENU 1 "Oct 10 2001" "Ratpoison Desktop For X" .SH NAME ratmenu \- create a menu to run commands .SH SYNOPSIS .B ratmenu [ .BI \-display " displayname" ] [ .BI \-font " fname" ] [ .BI \-fg " foreground-color" ] [ .BI \-bg " background-color" ] [ .BI \-io " item-offset" ] [ .BI \-label " name" ] [ .BI \-shell " prog" ] [ .BI \-align " {left|center|right}" ] [ .BI \-style " {snazzy|dreary}" ] [ .BI \-persist ] [ .B \-version ] [ .IR menuitem\ command ] \&... .SH DESCRIPTION .I ratmenu is a simple program that accepts a list of menu item and command pairs on the command line. It creates a window that consists of nothing but a menu. When a particular item is selected, the corresponding command is executed. .PP .I ratmenu does not recognize any usage of the rodent. It is entirely keystroke operated. .PP Menu items must be followed by a command. The syntax is based on that of the .I dialog program. .PP .I ratmenu accepts the following command line options. .RS .TP .BI \-display " displayname" Use the X display .IR displayname , instead of the default display. .TP .BI \-font " fname" (X Resource: font) Use the font .IR fname , instead of the default font. .TP .BI \-label " name" Change both the window and icon labels of the window to .IR name . The default label is the last component of the path used to run .IR ratmenu , typically, .BR ratmenu . .TP .BI \-fg " foreground-color" (X Resource: fgcolor) Set the foreground color to .IR foreground-color . By default, the foreground color is black. .TP .BI \-bg " background-color" (X Resource: bgcolor) Set the background color to .IR background-color . By default, the background color is white. .TP .BI \-io " item-offset" Set the first selected item to .IR item-offset . By default, the first item is the top-most one, or item-offset 1. The next item down would be at item-offset 2. .TP .BI \-style " {snazzy|dreary}" (X Resource: style) The default style is .IR snazzy , where the highlight bar, which shows the currently selected item, remains stationary while all the menu items are rotated up or down when the cursor keys are moved. In .IR dreary mode, the highlight bar moves up and down the menu as it does on all conventional keyboard controlled menus. .TP .BI \-align " {left|center|right}" (X Resource: align) Align the text of the menu entries to the left, right, or center. Defaults to .IR left . This is different from .BR 9menu , which defaults to .IR center . .TP .BI \-shell " prog" Use .I prog as the shell to run commands, instead of .BR /bin/sh . A popular alternative shell is .IR rc (1). If the shell cannot be executed, .I ratmenu will .I silently fall back to using .BR /bin/sh . .TP .BI \-back " prevmenu" .I prevmenu is a command or shell script to run when the back key is pressed, usually a script that has ratmenu showing the previous menu. Used to create nested menus, it gives the user a way to back out and return to the previous menu. Note that you can use this option for other things too. The command specified by the .B -back option is executed when the user hits one of the "back" keys. .TP .BI \-persist (X Resource: persist) Ordinarily, ratmenu exits if a new window pops up on top of it, or if you switch to another window. This option tells ratmenu to hang around, like a regular window. .TP .B \-version This option prints the version of .I ratmenu on the standard output, and then exits with an exit value of zero. .RE .SH KEYSTROKES .PP The .BI Up keystrokes move the selection to the next item up. The .BI Down keystrokes move the selection to the next item down. When the selection reaches the top or bottom, it scrolls around to the other side on pressing of the appropriate keystroke. The .BI Select keystrokes execute the command corresponding to the currently selected menu item, and exit ratmenu. The .BI Exit keystrokes quit ratmenu without doing anything. .RS .TP .BI Up 'k', Up_arrow, BackSpace, '\-', C\-p .TP .BI Down 'j', Down_arrow, Space, Tab, '+', C\-n, C\-i .TP .BI Select 'l', Right_arrow, Return, C\-f, C\-m, C\-j .TP .BI Back 'h', Left_arrow, C\-b .TP .BI Exit 'q', Escape, C\-g .RE .SH CONFIGURATION USING X RESOURCES .PP You can configure some items using .I xrdb to load appropriate X resources. There is an example configuration in the file .I /usr/share/doc/ratmenu/Xresources.ratmenu which shows all possible configuration items. Give it a look; it is fairly easy to figure out. .RE .SH EXAMPLES .ft B .nf ratmenu \-label "Remotes xterm" acme "rsh acme xterm" herman "rsh herman 9term" & .sp ratmenu \-label 'X progs' ghostview ghostview xdvi xdvi xeyes xeyes xneko xneko & .sp ratmenu \-back ~/bin/mypreviousmenu "X Eyes" xeyes & .ft .fi .SH SEE ALSO .IR ratpoison (1), .IR ratpoisonrc (5), .IR dialog (1) .IR xrdb (1) .PP .IR "Ratpoison Desktop Users Manual" . .SH AUTHORS The initial idea for this program was by Arnold Robbins, after having worked with John Mackin's GWM Blit emulation. Matty Farrow wrote a version using libXg, from which some ideas were borrowed. This code was written by David Hogan and Arnold Robbins. Rich Salz motivated the .B \-shell option. Jonathan Walther modified this code to play nicely with the ratpoison window manager by removing handling of mouse events and iconification. Zrajm C Akfohg made many improvements in his ratmen fork, including X resource handling, some of which were folded back in. ratmenu-2.3.14/LICENSE0000644000000000000000000000174707671025237011171 0ustar Sat Sep 15 10:17:25 PDT 2001 ratmenu is started as a hacked up version of 9menu. Here are the terms of the 9menu license: Licence ======= 9menu is free software, and is Copyright (c) 1994 by David Hogan and Arnold Robbins. Permission is granted to all sentient beings to use this software, to make copies of it, and to distribute those copies, provided that: (1) the copyright and licence notices are left intact (2) the recipients are aware that it is free software (3) any unapproved changes in functionality are either (i) only distributed as patches or (ii) distributed as a new program which is not called 9menu and whose documentation gives credit where it is due (4) the authors are not held responsible for any defects or shortcomings in the software, or damages caused by it. There is no warranty for this software. Have a nice day. -- Arnold Robbins arnold@gnu.ai.mit.edu Wed Apr 23 22:37:48 EDT 1997 ratmenu-2.3.14/README0000644000000000000000000000063707676454706011055 0ustar Sun Jun 8 23:43:42 PDT 2003 You can access the Debian menu hierarchy by running /etc/X11/ratmenu/debian.menu Alternatively, you can cp /etc/menu-methods/ratmenu $HOME/.menu-methods/ And then run update-menus This will create the dir $HOME/.ratmenu/ with the ratmenu scripts, with $HOME/.ratmenu/debian.menu as the root menu. Thanks to Fabricio Matheus Goncalves for this capability in ratmenu. ratmenu-2.3.14/Makefile0000644000000000000000000000676210573171302011614 0ustar # Makefile for ratmenu # # Jonathan Walther # djw@reactor-core.org PROG = ratmenu PREFIX=/usr/local MANDIR=$(PREFIX)/man OPTIMIZE ?= -O2 DEBUG ?= WARN ?= -Wall -pedantic CC = gcc LIBS = -L/usr/X11R6/lib -lX11 CFLAGS = $(OPTIMIZE) $(WARN) $(DEBUG) $(PROG): $(PROG).c $(CC) $(CFLAGS) $< $(LIBS) -o $@ clean: debian/rules clean rm -f $(PROG) test: $(PROG) -./$(PROG) -align right foo "echo foo" bar "echo bar" menuitemsuberalle "./$(PROG) x x y y z z" exit "echo exit" -./$(PROG) foofoofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofofooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo "echo foo" bar "echo bar" -./$(PROG) f ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff fa aa aa aa aa aa -./$(PROG) -persist -io 5 -style dreary 1 "echo 1 bar" 2 "echo 2 bar" 3 "echo 3 bar" 4 "echo 4 bar" 5 "echo 5 bar" 6 "echo 6 bar" 7 "echo 7 bar" 8 "echo 8 bar" 9 "echo 9 bar" 10 "echo 10 bar" 11 "echo 11 bar" 12 "echo 12 bar" 13 "echo 13 bar" 14 "echo 14 bar" 15 "echo 15 bar" 16 "echo 16 bar" 17 "echo 17 bar" 18 "echo 18 bar" 19 "echo 19 bar" 20 "echo 20 bar" 21 "echo 21 bar" 22 "echo 22 bar" 23 "echo 23 bar" 24 "echo 24 bar" 25 "echo 25 bar" 26 "echo 26 bar" 27 "echo 27 bar" 28 "echo 28 bar" 29 "echo 29 bar" 30 "echo 30 bar" 31 "echo 31 bar" 32 "echo 32 bar" 33 "echo 33 bar" 34 "echo 34 bar" 35 "echo 35 bar" 36 "echo 36 bar" 37 "echo 37 bar" 38 "echo 38 bar" 39 "echo 39 bar" 40 "echo 40 bar" 41 "echo 41 bar" 42 "echo 42 bar" 43 "echo 43 bar" 44 "echo 44 bar" 45 "echo 45 bar" 46 "echo 46 bar" 47 "echo 47 bar" 48 "echo 48 bar" 49 "echo 49 bar" 50 "echo 50 bar" -./$(PROG) -persist -io 5 -style snazzy 1 "echo 1 bar" 2 "echo 2 bar" 3 "echo 3 bar" 4 "echo 4 bar" 5 "echo 5 bar" 6 "echo 6 bar" 7 "echo 7 bar" 8 "echo 8 bar" 9 "echo 9 bar" 10 "echo 10 bar" 11 "echo 11 bar" 12 "echo 12 bar" 13 "echo 13 bar" 14 "echo 14 bar" 15 "echo 15 bar" 16 "echo 16 bar" 17 "echo 17 bar" 18 "echo 18 bar" 19 "echo 19 bar" 20 "echo 20 bar" 21 "echo 21 bar" 22 "echo 22 bar" 23 "echo 23 bar" 24 "echo 24 bar" 25 "echo 25 bar" 26 "echo 26 bar" 27 "echo 27 bar" 28 "echo 28 bar" 29 "echo 29 bar" 30 "echo 30 bar" 31 "echo 31 bar" 32 "echo 32 bar" 33 "echo 33 bar" 34 "echo 34 bar" 35 "echo 35 bar" 36 "echo 36 bar" 37 "echo 37 bar" 38 "echo 38 bar" 39 "echo 39 bar" 40 "echo 40 bar" 41 "echo 41 bar" 42 "echo 42 bar" 43 "echo 43 bar" 44 "echo 44 bar" 45 "echo 45 bar" 46 "echo 46 bar" 47 "echo 47 bar" 48 "echo 48 bar" 49 "echo 49 bar" 50 "echo 50 bar" dist: clean P=$$(basename $$PWD); cd ..; tar czf $$P.tar.gz $$P doc: groff -Tascii -man ratmenu.1|less install: $(PROG) install -D -p -m 755 -s $(PROG) $(PREFIX)/bin/$(PROG) install -D -p -m 755 $(PROG).1 $(MANDIR)/man1/$(PROG).1 ratmenu-2.3.14/ratmenu.c0000644000000000000000000003701411350320507011762 0ustar /* * ratmenu.c * * This program puts up a window that is just a menu, and executes * commands that correspond to the items selected. * * Initial idea: Arnold Robbins * Version using libXg: Matty Farrow (some ideas borrowed) * This code by: David Hogan and Arnold Robbins * * Copyright (c), Arnold Robbins and David Hogan * * Arnold Robbins * arnold@skeeve.atl.ga.us * October, 1994 * * Code added to cause pop-up (unIconify) to move menu to mouse. * Christopher Platt * platt@coos.dartmouth.edu * May, 1995 * * Said code moved to -teleport option, and -warp option added. * Arnold Robbins * June, 1995 * * Code added to allow -fg and -bg colors. * John M. O'Donnell * odonnell@stpaul.lampf.lanl.gov * April, 1997 * * Ratpoison windowmanager specific hacking; removed a lot of junk * and added keyboard functionality * Jonathan Walther * krooger@debian.org * September, 2001 * * Provided initial implementation of -persist, inspiring * the version that actually made it into the code. * Rupert Levene * r.levene@lancaster.ac.uk * October, 2002 * * Provided a menu-method file to allow ratmenu to access the Debian * menu hierarchy. * Fabricio Matheus Goncalves * fmatheus@bigbross.com * April, 2003 * * Provided Xresource handling code * Zrajm C Akfohg * zrajm@klingonska.org * March 2003 */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include char version[] = "@(#) ratmenu version 2.3"; #define FONT "9x15bold" #define MenuMask (ExposureMask|StructureNotifyMask|KeyPressMask) #define CTL(c) (c - '`') #define XTextWidth XmbTextEscapement #define XLoadQueryFont XLoadQueryFontSet XFontSet XLoadQueryFontSet(Display *, const char *); Display *dpy; /* lovely X stuff */ int screen; Window root; Window menuwin; GC gc; unsigned long fg; unsigned long bg; char *fgcname = NULL; char *bgcname = NULL; Colormap dcmap; XColor color; XFontSet font; short font__ascent, font__descent; Atom wm_protocols; Atom wm_delete_window; int g_argc; /* for XSetWMProperties to use */ char **g_argv; int savex, savey; int dpyheight; Window savewindow; char *progname; /* my name */ char *displayname; /* X display */ char *fontname = NULL; /* font */ char *labelname; /* window and icon name */ char **labels; /* list of labels and commands */ char **commands; int numitems; int startitem; /* which item to highlight first */ int curitem; int olditem; int visible; /* number of items visible on screen */ int off; /* offset used by dreary */ enum {unset=0, left=1, yes=1, snazzy=1, center=2, no=2, dreary=2, right=3} align, persist, menustyle; char *shell = "/bin/sh"; /* default shell */ char *prevmenu = NULL; /* previous menu */ void ask_wm_for_delete(void); void reap(int); void redraw_snazzy(int, int, int, int); void redraw_dreary(int, int, int, int); void (*redraw) (int, int, int, int); void run_menu(); void set_wm_hints(int, int); void spawn(char*); void usage(void); void xresources(void); void defaults(void); XFontSet XLoadQueryFontSet(Display *disp, const char *fontset_name) { XFontSet fontset; int missing_charset_count; char **missing_charset_list; char *def_string; fontset = XCreateFontSet(disp, fontset_name, &missing_charset_list, &missing_charset_count, &def_string); if (missing_charset_count /* && debug */) { fprintf(stderr, "Missing charsets in FontSet(%s) creation.\n", fontset_name); XFreeStringList(missing_charset_list); } return fontset; } /* main --- crack arguments, set up X stuff, run the main menu loop */ int main(int argc, char **argv) { int i, j; char *cp; XGCValues gv; unsigned long mask; XFontSetExtents *extent; g_argc = argc; g_argv = argv; setlocale(LC_CTYPE, ""); /* set default label name */ if ((cp = strrchr(argv[0], '/')) == NULL) labelname = argv[0]; else labelname = ++cp; /* and program name for diagnostics */ progname = labelname; for (i = 1; i < argc; i++) { if (strcmp(argv[i], "-display") == 0) { displayname = argv[++i]; } else if (strcmp(argv[i], "-font") == 0) { fontname = argv[++i]; } else if (strcmp(argv[i], "-label") == 0) { labelname = argv[++i]; } else if (strcmp(argv[i], "-shell") == 0) { shell = argv[++i]; } else if (strcmp(argv[i], "-back") == 0) { prevmenu = argv[++i]; } else if (strcmp(argv[i], "-fg") == 0) { fgcname = argv[++i]; } else if (strcmp(argv[i], "-bg") == 0) { bgcname = argv[++i]; } else if (strcmp(argv[i], "-io") == 0) { startitem = atoi(argv[++i]) - 1; } else if (strcmp(argv[i], "-persist") == 0) { persist = yes; } else if (strcmp(argv[i], "-align") == 0) { if (strcmp(argv[i+1], "left") == 0) { align = left; } else if (strcmp(argv[i+1], "center") == 0) { align = center; } else if (strcmp(argv[i+1], "right") == 0) { align = right; } else { usage(); } i++; } else if (strcmp(argv[i], "-style") == 0) { if (strcmp(argv[i+1], "snazzy") == 0) { menustyle = snazzy; } else if (strcmp(argv[i+1], "dreary") == 0) { menustyle = dreary; } else { usage(); } i++; } else if (strcmp(argv[i], "-version") == 0) { printf("%s\n", version); exit(0); } else if (argv[i][0] == '-') { usage(); } else { break; } } if ((argc-i) % 2 == 1) /* every menu item needs a label AND command */ usage(); if ((argc-i) * 2 <= 0) usage(); numitems = (argc-i) / 2; labels = (char **) malloc(numitems * sizeof(char *)); commands = (char **) malloc(numitems * sizeof(char *)); if (commands == NULL || labels == NULL) { fprintf(stderr, "%s: no memory!\n", progname); exit(1); } for (j=0; i < argc; j++) { labels[j] = argv[i++]; commands[j] = argv[i++]; } dpy = XOpenDisplay(displayname); if (dpy == NULL) { fprintf(stderr, "%s: cannot open display", progname); if (displayname != NULL) fprintf(stderr, " %s", displayname); fprintf(stderr, "\n"); exit(1); } screen = DefaultScreen(dpy); dcmap = DefaultColormap (dpy, screen); xresources(); defaults(); if ((font = XLoadQueryFont(dpy, fontname)) == NULL) { fprintf(stderr, "%s: fatal: cannot load font %s\n", progname, fontname); exit(1); } extent = XExtentsOfFontSet(font); font__ascent = extent->max_logical_extent.height * 4 / 5; font__descent = extent->max_logical_extent.height / 5; gv.foreground = fg^bg; gv.background = bg; gv.function = GXxor; gv.line_width = 0; mask = GCForeground | GCBackground | GCFunction | GCLineWidth; root = RootWindow(dpy, screen); gc = XCreateGC(dpy, root, mask, &gv); dpyheight = DisplayHeight(dpy, screen); signal(SIGCHLD, reap); run_menu(); XCloseDisplay(dpy); exit(0); } /* spawn --- run a command */ void spawn(char *com) { char *sh_basename; if ((sh_basename = strrchr(shell, '/')) != NULL) { sh_basename++; } else { sh_basename = shell; } XCloseDisplay(dpy); execl(shell, sh_basename, "-c", com, NULL); execl("/bin/sh", "sh", "-c", com, NULL); exit(1); } /* reap --- collect dead children */ void reap(int s) { (void) wait((int *) NULL); signal(s, reap); } /* usage --- print a usage message and die */ void usage(void) { fprintf(stderr, "usage: %s [-display displayname] [-style {snazzy|dreary}]\n" "[-shell shell] [-label name] [-align {left|center|right}]\n" "[-fg fgcolor] [-bg bgcolor] [-font fname] [-back prevmenu]\n" "[-persist] [-version] [-io offset] [menuitem command] ...\n", progname); exit(0); } /* run_menu --- put up the window, execute selected commands */ void run_menu(void) { KeySym key; XEvent ev; XClientMessageEvent *cmsg; int i, wide, high, dx, dy; for (i = 0, dx = 0, wide = 0; i < numitems; i++) { wide = XTextWidth(font, labels[i], strlen(labels[i])) + 4; if (wide > dx) dx = wide; } wide = dx; high = font__ascent + font__descent + 1; visible = dpyheight / high; if (visible > numitems) { visible = numitems; } dy = visible * high; set_wm_hints(dx, dy); ask_wm_for_delete(); XSelectInput(dpy, menuwin, MenuMask); XMapWindow(dpy, menuwin); if (startitem < 0) { curitem = 0; } else if (startitem >= numitems) { curitem = numitems - 1; } else { curitem = startitem; } if (menustyle == snazzy) { redraw = redraw_snazzy; } else if (menustyle == dreary) { redraw = redraw_dreary; olditem = curitem; } off = 0; for (;;) { char keystr[10]; int keystr_len; XNextEvent(dpy, &ev); switch (ev.type) { case KeyPress: keystr_len = XLookupString(&ev.xkey, keystr, sizeof(keystr), &key, NULL); if (keystr_len == 1) { /* construct some of the "easier" keybindings by looking at the string representation of what got hit, and faking one of the KeySyms that we already handle. */ switch (keystr[0]) { case 'q': case '\033': case CTL('g'): key = XK_Escape; break; case CTL('p'): key = XK_Up; break; case CTL('n'): case CTL('i'): /* c-i is *like* tab */ key = XK_Down; break; case CTL('m'): case CTL('j'): case CTL('f'): key = XK_Right; break; case CTL('b'): key = XK_Left; break; } } switch (key) { case XK_Escape: case XK_q: return; break; case XK_Left: case XK_h: if (prevmenu) { spawn(prevmenu); } break; case XK_Right: case XK_Return: case XK_l: spawn(commands[curitem]); break; case XK_Tab: case XK_space: case XK_Down: case XK_j: case XK_plus: ++curitem >= numitems ? curitem = 0 : 0 ; redraw(curitem, high, wide, 0); break; case XK_BackSpace: case XK_Up: case XK_k: case XK_minus: curitem-- <= 0 ? curitem = numitems - 1 : 0 ; redraw(curitem, high, wide, 0); break; } break; case MapNotify: case Expose: redraw(curitem, high, wide, 1); break; case UnmapNotify: if (persist == no) return; else XClearWindow(dpy, menuwin); break; case CirculateNotify: if (persist == no) return; break; case ClientMessage: cmsg = &ev.xclient; if (cmsg->message_type == wm_protocols && cmsg->data.l[0] == wm_delete_window) return; } } } /* set_wm_hints --- set all the window manager hints */ void set_wm_hints(int wide, int high) { XWMHints *wmhints; XSizeHints *sizehints; XClassHint *classhints; XTextProperty wname; if ((sizehints = XAllocSizeHints()) == NULL) { fprintf(stderr, "%s: could not allocate size hints\n", progname); exit(1); } if ((wmhints = XAllocWMHints()) == NULL) { fprintf(stderr, "%s: could not allocate window manager hints\n", progname); exit(1); } if ((classhints = XAllocClassHint()) == NULL) { fprintf(stderr, "%s: could not allocate class hints\n", progname); exit(1); } /* fill in hints in order to parse geometry spec */ sizehints->width = sizehints->min_width = sizehints->max_width = wide; sizehints->height = sizehints->min_height = sizehints->max_height = high; sizehints->flags = USSize|PSize|PMinSize|PMaxSize; if (XStringListToTextProperty(& labelname, 1, & wname) == 0) { fprintf(stderr, "%s: could not allocate window name structure\n", progname); exit(1); } menuwin = XCreateSimpleWindow(dpy, root, sizehints->x, sizehints->y, sizehints->width, sizehints->height, 1, fg, bg); wmhints->input = True; wmhints->initial_state = NormalState; wmhints->flags = StateHint | InputHint; classhints->res_name = progname; classhints->res_class = "ratmenu"; XSetWMProperties(dpy, menuwin, & wname, NULL, g_argv, g_argc, sizehints, wmhints, classhints); } /* ask_wm_for_delete --- jump through hoops to ask WM to delete us */ void ask_wm_for_delete(void) { int status; wm_protocols = XInternAtom(dpy, "WM_PROTOCOLS", False); wm_delete_window = XInternAtom(dpy, "WM_DELETE_WINDOW", False); status = XSetWMProtocols(dpy, menuwin, & wm_delete_window, 1); if (status != True) fprintf(stderr, "%s: could not ask for clean delete\n", progname); } /* redraw --- actually draw the menu */ void redraw_snazzy (int curitem, int high, int wide, int fullredraw) { int i, j, ty, tx; XClearWindow(dpy, menuwin); for (i = 0, j = curitem; i < visible; i++, j++) { j %= numitems; if (align == left) { tx = 0; } else if (align == center) { tx = (wide - XTextWidth(font, labels[j], strlen(labels[j]))) / 2; } else {/* align == right */ tx = wide - XTextWidth(font, labels[j], strlen(labels[j])); } ty = i*high + font__ascent + 1; XmbDrawString(dpy, menuwin, font, gc, tx, ty, labels[j], strlen(labels[j])); } XFillRectangle(dpy, menuwin, gc, 0, 0, wide, high); } void redraw_dreary (int curitem, int high, int wide, int fullredraw) { int i, ty, tx, oldoff; oldoff = off; if (curitem + 1 > visible + off) { off = curitem + 1 - visible; } else if (curitem + 1 <= off) { off = curitem; } if (fullredraw || oldoff != off) { XClearWindow(dpy, menuwin); for (i = 0; i < visible; i++) { if (align == left) { tx = 0; } else if (align == center) { tx = (wide - XTextWidth(font, labels[i+off], strlen(labels[i+off]))) / 2; } else {/* align == right */ tx = wide - XTextWidth(font, labels[i+off], strlen(labels[i+off])); } ty = i*high + font__ascent + 1; XmbDrawString(dpy, menuwin, font, gc, tx, ty, labels[i+off], strlen(labels[i+off])); } XFillRectangle(dpy, menuwin, gc, 0, (curitem-off)*high, wide, high); } else { XFillRectangle(dpy, menuwin, gc, 0, (olditem-off)*high, wide, high); XFillRectangle(dpy, menuwin, gc, 0, (curitem-off)*high, wide, high); } olditem = curitem; } void xresources(void) { char *res; if (bgcname == NULL) { if ((res = XGetDefault(dpy, progname, "bgcolor")) != NULL ) { bgcname = strdup(res); } } if (fgcname == NULL) { if ((res = XGetDefault(dpy, progname, "fgcolor")) != NULL ) { fgcname = strdup(res); } } if (fontname == NULL) { if ((res = XGetDefault(dpy, progname, "font")) != NULL ) { fontname = strdup(res); } } if (menustyle == unset) { if ((res = XGetDefault(dpy, progname, "style")) != NULL ) { if (strcasecmp(res, "dreary") == 0) menustyle = dreary; else if (strcasecmp(res, "snazzy") == 0) menustyle = snazzy; } } if (persist == unset) { if ((res = XGetDefault(dpy, progname, "persist")) != NULL ) { if (strcasecmp(res, "on" ) == 0) persist = yes; else if (strcasecmp(res, "off") == 0) persist = no; else if (strcasecmp(res, "yes") == 0) persist = yes; else if (strcasecmp(res, "no") == 0) persist = no; else if (strcasecmp(res, "true") == 0) persist = yes; else if (strcasecmp(res, "false") == 0) persist = no; } } if (align == unset) { if ((res = XGetDefault(dpy, progname, "align")) != NULL ) { if (strcasecmp(res, "left" ) == 0) align = left; else if (strcasecmp(res, "center") == 0) align = center; else if (strcasecmp(res, "right" ) == 0) align = right; } } } void defaults(void) { if (bgcname == NULL || XParseColor(dpy, dcmap, bgcname, &color) == 0 || XAllocColor(dpy, dcmap, &color) == 0) { bg = BlackPixel(dpy, screen); } else { bg = color.pixel; } if (fgcname == NULL || XParseColor(dpy, dcmap, fgcname, &color) == 0 || XAllocColor(dpy, dcmap, &color) == 0) { fg = WhitePixel(dpy, screen); } else { fg = color.pixel; } if (fontname == NULL) { fontname = FONT; } if (persist == unset) persist = no; if (align == unset) align = left; if (menustyle == unset) menustyle = snazzy; } ratmenu-2.3.14/Xresources.ratmenu0000644000000000000000000000066210200006741013673 0ustar ! Look in /etc/X11/rgb.txt for supported color names ratmenu*fgcolor: yellow ratmenu*bgcolor: blue ! Look in /etc/X11/fonts/*/*.alias for possible fonts */ ratmenu*font: -dosemu-vga-medium-r-normal--20-200-75-75-c-100-ibm-cp866 !ratmenu*font: vga ! Possible values: snazzy, dreary ratmenu*style: dreary ! Possible values: true, false ratmenu*persist: false ! Possible values: left, center, right ratmenu*align: right ratmenu-2.3.14/debian/0000755000000000000000000000000011350573310011362 5ustar ratmenu-2.3.14/debian/install0000644000000000000000000000002007671024306012752 0ustar ratmenu usr/bin ratmenu-2.3.14/debian/postrm0000644000000000000000000000013107671022355012635 0ustar #!/bin/sh set -e if [ "$1" = "purge" ] ; then rm -rf /etc/X11/ratmenu ; fi #DEBHELPER# ratmenu-2.3.14/debian/changelog0000644000000000000000000002540511350573274013253 0ustar ratmenu (2.3.20) unstable; urgency=low [Thanks to Axel Beckert for the updated patch. Note that it requires a useful $LANG setting to actually work, having fonts is not sufficient.] * Port UTF-8 patch for ratmen (http://www.rubyist.net/~rubikitch/computer/ratmen/i18n.patch) to ratmenu. (Closes: #531036). -- Mark W. Eichin Fri, 19 Mar 2010 03:59:56 +0000 ratmenu (2.3.19) unstable; urgency=low * debian/control: version debhelper depends (lintian package-lacks-versioned-build-depends-on-debhelper.) -- Mark W. Eichin Thu, 03 Dec 2009 07:27:40 +0000 ratmenu (2.3.18) unstable; urgency=low * debian/rules: use dh_clean (lintian diff-contains-editor-backup-file.) -- Mark W. Eichin Sat, 04 Oct 2008 00:57:33 -0400 ratmenu (2.3.17) unstable; urgency=low * debian/rules, debian/compat, debian/control: debhelper V7. * debian/changelog: fix name, so it isn't misdetected as an NMU. * debian/control: move to standards version 3.8.0. -- Mark W. Eichin Thu, 02 Oct 2008 00:04:29 -0400 ratmenu (2.3.16) unstable; urgency=low * ratmenu.c: long-overdue emacs-style key bindings, as requested by kenth@acm.org. I took a slightly different approach that might make it easier to add other binding options later, but the patch was appreciated. (Closes: #430056). * ratmenu.1: corresponding documentation of the new key bindings. * debian/changelog: retconned the 2.3.15 entry to make lintian happy. -- Mark Eichin Sat, 27 Sep 2008 21:51:24 -0400 ratmenu (2.3.15) unstable; urgency=low * debian/menu-method: fixed lintian wrong-path-for-interpreter (Closes: #483192). * removed ~ files to fix lintian diff-contains-editor-backup-file. -- Mark Eichin Fri, 26 Sep 2008 01:37:00 -0400 ratmenu (2.3.14) unstable; urgency=low * For real this time (Closes: #377626). * debian/menu-method: fix lintian wrong-path-for-install-menu. * debian/control: reviewed upgrading-checklist, raised Standards-Version. (Note that we still use -L/usr/X11R6/lib to simplify backports, 11.8.7 only tells us not to install anything there.) -- Mark W. Eichin Mon, 5 Mar 2007 23:53:29 -0500 ratmenu (2.3.13) unstable; urgency=low * New maintainer. Further updates to follow. -- Mark W. Eichin Mon, 5 Mar 2007 21:10:30 -0500 ratmenu (2.3.12) unstable; urgency=low * QA Upload orphaning this package. -- Thijs Kinkhorst Sun, 16 Jul 2006 19:25:24 +0200 ratmenu (2.3.11) unstable; urgency=low * Bill Allombert suggested some quoting fixes. (Closes: #358040) -- Jonathan Walther Mon, 20 Mar 2006 15:48:52 -0700 ratmenu (2.3.10) unstable; urgency=low * system-wide menu has changed. Thank you Bill Allombert for the fixes. (Closes: #358036) -- Jonathan Walther Mon, 20 Mar 2006 15:05:52 -0700 ratmenu (2.3.9) unstable; urgency=low * Added Suggests: for xclip, a very cool program -- Jonathan Walther Sun, 12 Mar 2006 18:10:52 -0700 ratmenu (2.3.8) unstable; urgency=low * Lintian fix: manpage hyphenation * Lintian fix: duplicate conffile problem was due to rules file * Lintian fix: /usr/sbin to /usr/bin for install-menu location -- Jonathan Walther Fri, 10 Mar 2006 17:12:52 -0700 ratmenu (2.3.7) unstable; urgency=low * Lintian fix: duplicate conffile -- Jonathan Walther Sun, 5 Mar 2006 02:22:52 -0700 ratmenu (2.3.6) unstable; urgency=low * xlibs-dev depend no longer valid. See the following message. http://lists.debian.org/debian-devel-announce/2005/11/msg00022.html Closes: #347107 -- Jonathan Walther Sun, 8 Jan 2006 18:20:52 -0700 ratmenu (2.3.5) unstable; urgency=low * Fixed insufficiently initialized variable. -- Jonathan Walther Wed, 30 Mar 2005 23:54:52 -0700 ratmenu (2.3.4) unstable; urgency=low * Fixed uninitialized variable for "dreary" drawing method. -- Jonathan Walther Wed, 30 Mar 2005 23:42:52 -0700 ratmenu (2.3.3) unstable; urgency=low * Added "Suggests" for menu, as per menu documentation. -- Jonathan Walther Mon, 21 Feb 2005 12:47:52 -0700 ratmenu (2.3.2) unstable; urgency=low * Cleaned up spawn() function. * Fixed debian/copyright (accurate download instructions) -- Jonathan Walther Sun, 13 Feb 2005 10:45:52 -0700 ratmenu (2.3.1) unstable; urgency=low * Thank you for the patch, Marga. Incorporated most it. Closes: #293268 * The dash version thing was fixed in the previous release. * Description synopsis fixed. * Extra LICENSE file fixed. * ChangeLog compression and naming fixed. * Removed bogus debian/*.debhelper files. * Build-Depend on debhelper > 4, but see no need for compatibility mode. -- Jonathan Walther Wed, 2 Feb 2005 13:52:05 -0700 ratmenu (2.3) unstable; urgency=low * Allow customization via Xresource handling. Closes: #231827 * Allow user to specify first selected menu item. * Better handling of case where menu items don't all fit on screen. * Optimized drawing of dreary menu. * Thank you Zrajm C Akfohg for producing ratmen 2.2.2 -- Jonathan Walther Tue, 1 Feb 2005 09:47:12 -0700 ratmenu (2.2-2) unstable; urgency=low * Fixed prerun and postrun syntax in menu method. Thank you Bill. Closes: #277299 * menu method now marked as conffile. Thank you Bill. Closes: #277182 * Spell-corrected it's to its in control file. Thank you Kevin and Florian. Closes: #268541, #277267 * Can't duplicate your error Jorgen. Reconfirm? Closes: #231826 * Bumped Standards-Version in control file up to 3.6.1.1 -- Jonathan Walther Sun, 30 Jan 2005 21:48:43 -0700 ratmenu (2.2-1) unstable; urgency=low * Fixed pathname of debian menu in README (Closes: #198711) -- Jonathan Walther Wed, 25 Jun 2003 19:25:05 -0700 ratmenu (2.2) unstable; urgency=low * Fixed quoting bug in menu-method (Closes: #187997) * Prettified look of menus produced by menu-method -- Jonathan Walther Thu, 19 Jun 2003 01:56:58 -0700 ratmenu (2.1-1) unstable; urgency=low * Bumped the version number in ratmenu.c to be accurate -- Jonathan Walther Sun, 8 Jun 2003 23:55:09 -0700 ratmenu (2.1) unstable; urgency=low * Added menu-method to support Debian menus (Closes: #187997) -- Jonathan Walther Sun, 8 Jun 2003 22:06:32 -0700 ratmenu (2.0) unstable; urgency=low * Added -persist option * Now suggest xbindkeys instead of keylaunch -- Jonathan Walther Sun, 8 Jun 2003 16:55:17 -0700 ratmenu (1.9.2) unstable; urgency=low * Updated to be Debian Policy version 3.5.6.1 compliant * Removed the unneeded postinst and prerm files * Modernized and simplified the rules file * Fixed URL in copyright file pointing to source code for this program -- Jonathan Walther Sat, 8 Jun 2002 12:00:17 -0700 ratmenu (1.9.1) unstable; urgency=low * Updated the man page to be even clearer * Fixed quoting of the ' character in the manpage -- Jonathan Walther Sun, 2 Jun 2002 14:16:39 -0700 ratmenu (1.9) unstable; urgency=low * Updated the man page to cover the new -back option -- Jonathan Walther Sun, 2 Jun 2002 13:46:35 -0700 ratmenu (1.8) unstable; urgency=low * Added -back feature, to create hierarchies of menus * Minor fixes to spelling and documentation -- Jonathan Walther Sun, 2 Jun 2002 11:26:52 -0700 ratmenu (1.7) unstable; urgency=low * Fixed bug that caused screen to blank if window was too large * Now Suggests the ratpoison window manager -- Jonathan Walther Sat, 15 Dec 2001 12:53:24 -0700 ratmenu (1.6) unstable; urgency=low * Changed default resource to "ratmenu" from "9menu" -- Jonathan Walther Thu, 11 Oct 2001 12:15:45 -0700 ratmenu (1.5) unstable; urgency=low * Changed syntax so menu items can include the ':' character * Updated the manpage to document the available keystrokes -- Jonathan Walther Wed, 10 Oct 2001 13:00:17 -0700 ratmenu (1.4) unstable; urgency=low * Added support for more navigation keystrokes * Fixed the manpage * Added back in the -bg, -fg, -font options * Made navigation style and menu alignment configurable -- Jonathan Walther Sun, 23 Sep 2001 16:15:42 -0700 ratmenu (1.2-1) unstable; urgency=low * Took out all mouse handling and replaced it with keyboard commands * Removed iconification code * Removed various options that aren't needed in ratpoison * Updated the manpage -- Jonathan Walther Sun, 16 Sep 2001 10:10:20 -0700 9menu (1.5-2) unstable; urgency=low * Fixed Build-Depends line (added debhelper) * Changed maintainer email address. -- Stephen Frost Wed, 4 Jul 2001 11:39:45 -0400 9menu (1.5-1) unstable; urgency=medium * New upstream version * Added md5sums correctly -- Stephen Frost Thu, 7 Dec 2000 22:44:38 -0500 9menu (1.4-10.2) unstable; urgency=low * New Maintainer * Fixed gcc warnings. -- Stephen Frost Thu, 7 Dec 2000 20:58:13 -0500 9menu (1.4-10.1) unstable; urgency=medium * Non-maintainer upload * debian/postinst, debian/postrm: added missing "#!/bin/sh -e" line (closes: bug #77413). -- An Thi-Nguyen Le Mon, 27 Nov 2000 18:46:45 -0600 9menu (1.4-10) unstable; urgency=low * /usr/doc -> /usr/share/doc * Changed CFLAGS and INSTALL_PROGRAM in debian/rules according to the new policy. * Added build dependencies. * Standards-Version: 3.2.1 -- Adrian Bunk Sat, 11 Nov 2000 22:37:30 +0100 9menu (1.4-9) unstable; urgency=low * Orphaned the package. -- Joel Klecker Wed, 2 Jun 1999 00:42:15 -0700 9menu (1.4-8) unstable; urgency=low * New maintainer. -- Joel Klecker Wed, 17 Dec 1997 09:59:05 -0800 9menu (1.4-7) unstable; urgency=low * Compile against libc6 -- Karl Sackett Mon, 3 Nov 1997 15:30:53 -0500 9menu (1.4-6) unstable; urgency=low * Changed maintainer's address. -- Karl Sackett Thu, 31 Oct 1996 09:34:48 -0600 9menu (1.4-5) unstable; urgency=low * Converted to new package standards. -- Karl Sackett Thu, 3 Oct 1996 10:28:01 -0500 1.4-4 * support files now architecture-independent 1.4-3 * Added Debian support files. * Corrected prefix, exec_prefix in debian.rules. * Moved man page from 9menu.1x to 9menu.1 ratmenu-2.3.14/debian/compat0000644000000000000000000000000211071043661012561 0ustar 7 ratmenu-2.3.14/debian/postinst.debhelper0000644000000000000000000000332010360345401015115 0ustar # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ -f $inst ]; then chmod a+x $inst if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ -f $inst ]; then chmod a+x $inst if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ -f $inst ]; then chmod a+x $inst if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ -f $inst ]; then chmod a+x $inst if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ -f $inst ]; then chmod a+x $inst if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ -f $inst ]; then chmod a+x $inst if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ -f $inst ]; then chmod a+x $inst if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ -f $inst ]; then chmod a+x $inst if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi fi # End automatically added section ratmenu-2.3.14/debian/manpages0000644000000000000000000000001210200246562013070 0ustar ratmenu.1 ratmenu-2.3.14/debian/postinst0000644000000000000000000000003607671022371013176 0ustar #!/bin/sh set -e #DEBHELPER# ratmenu-2.3.14/debian/postrm.debhelper0000644000000000000000000000362010360345401014561 0ustar # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi # End automatically added section # Automatically added by dh_installmenu inst=/etc/menu-methods/ratmenu if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi # End automatically added section ratmenu-2.3.14/debian/copyright0000644000000000000000000000221310203721504013307 0ustar This is the Debian GNU/Linux package of ratmenu. This package was put together by Karl Sackett as the 9menu package; Jonathan Walther modified 9menu and this package into their current form as ratmenu. Source to ratmenu is available from http://www.debian.org/ Licence: ratmenu is distributed under the terms of the 9menu license: 9menu is free software, and is Copyright (c) 1994 by David Hogan and Arnold Robbins. Permission is granted to all sentient beings to use this software, to make copies of it, and to distribute those copies, provided that: (1) the copyright and licence notices are left intact (2) the recipients are aware that it is free software (3) any unapproved changes in functionality are either (i) only distributed as patches or (ii) distributed as a new program which is not called 9menu and whose documentation gives credit where it is due (4) the authors are not held responsible for any defects or shortcomings in the software, or damages caused by it. There is no warranty for this software. Have a nice day. ratmenu-2.3.14/debian/docs0000644000000000000000000000003210200246045012223 0ustar README Xresources.ratmenu ratmenu-2.3.14/debian/menu-method0000644000000000000000000000230311067072046013532 0ustar #!/usr/bin/install-menu # -*- mode: shell-script; -*- # compat="menu-1"; !include menu.h compat="menu-2"; outputencoding="ISO-8859-1"; treewalk="M"; rootprefix="/etc/X11/ratmenu/"; userprefix=".ratmenu/"; mainmenutitle="Debian Menu"; rootsection="Debian"; function space()=" "; function newline()="\n"; function quote($text)="'" escwith($text,"'","'\\'") "'"; function section()=parent($section); function file($sec)=tolower(replacewith($sec,"/ '","...") ".menu"); function ratprevious()=" -back " ifeqelse(section(), "Debian", "''", prefix() file(parent(section()))); function ratcmd()=firstentry("ratmenu -style dreary -label " quote("/" section()) ratprevious()) space(); function exec($com)=ratcmd() quote(title()) space() quote(ifeq($needs, "text", "x-terminal-emulator -T \\\"" esc($title,"\\\"") "\\\" -e ") $com); genmenu=file(parent($section)); removemenu="set -e; rm -f " prefix() "/debian*menu"; supported; x11= exec($command); text= exec($command); endsupported; startmenu=""; endmenu=""; submenutitle=ratcmd() quote($section"/") space() "'" prefix() file($section) "'"; prerun="set -e; rm -f " prefix() "/debian*menu"; postrun="set -e; chmod a+x " prefix() "/debian*menu"; ratmenu-2.3.14/debian/control0000644000000000000000000000157411072077256013005 0ustar Source: ratmenu Section: x11 Priority: optional Maintainer: Mark W. Eichin Build-Depends: libx11-dev, debhelper (>= 7) Standards-Version: 3.8.0 Package: ratmenu Suggests: ratpoison, xbindkeys, menu, xclip Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Creates X menus from the shell This is ratmenu, a simple program that allows you to create X menus from the shell. Although designed for ratpoison, it will work with any ICCCM compliant window manager. . It was forked from 9menu version 1.5, to provide specific support for the ratpoison window manager. Where 9menu only responds to the mouse, and ignores the keyboard, ratmenu has all mouse sensitivity taken out, and only responds to the keyboard. Since then it has evolved nifty features and behaviors of its own. The source code was also cleaned up and old cruft weeded out. ratmenu-2.3.14/debian/rules0000755000000000000000000000140111071573460012444 0ustar #! /usr/bin/make -f # CC = gcc CFLAGS = -O2 -Wall ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g endif LDFLAGS = SHELL = /bin/sh srcdir = . build: dh_testdir make CC="$(CC)" CFLAGS="$(CFLAGS)" clean: dh_testdir -rm -f ratmenu *.o -rm -f stamp-config stamp-build -rm -rf debian/tmp* debian/ratmenu/ debian/files debian/substvars dh_clean binary-indep: true DH_VERBOSE=1 binary-arch: dh_testdir dh_testroot make -f debian/rules build dh_installdocs dh_installman dh_installmenu dh_installchangelogs ChangeLog dh_install dh_installdeb dh_compress dh_link dh_strip dh_fixperms dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: config build clean binary binary-arch binary-indep