--- larswm-7.5.3.orig/bar.c +++ larswm-7.5.3/bar.c @@ -1,6 +1,7 @@ /* Copyright (c) 2000 Lars Bernhardsson, see README for licence details */ #include #include +#include #include #include @@ -33,6 +34,53 @@ /* Make sure all menu entries really are this length! */ #define MLEN 41 +/* + * buffer_append - append to a fixed sized buffer in a snprintf like fassion. + * + * Arguments: + * - buf_ptr Pointer to a character pointer. The character pointer will be + * modified to is points to the null-byte after this function + * returns. + * - buf_len Pointer to an integer. Number of bytes left in the buffer. At + * most this many minus one bytes will be written to the buffer. + * The buffer is assured to end with a null-byte. + * - format See printf(3) + * - ... See printf(3) + * + * Return value: + * Number of bytes written to the buffer, not including the trailing null-byte. + * If an error occured a negative value will be returned. + */ +int buffer_append (char **buf_ptr, int *buf_len, const char *format, ...) +{ + int len; + va_list args; + + if (*buf_len <= 1) + return (0); + + va_start (args, format); + len = vsnprintf (*buf_ptr, *buf_len, format, args); + va_end (args); + + if (len >= *buf_len) + { + fprintf (stderr, "[larswm] Warning: Buffer text was truncated.\n"); + len = *buf_len - 1; + *buf_ptr[len] = '\0'; + } + else if (len < 0) + { + fprintf (stderr, "[larswm] Error: `buffer_append' failed.\n"); + return (len); + } + + *buf_ptr += len; + *buf_len -= len; + + return (len); +} + void do_menu (ScreenInfo * s) { @@ -175,11 +223,37 @@ XSync (dpy, False); } -void -draw_tbar (ScreenInfo * s) +void draw_tbar (ScreenInfo *s) { - int tlen, max_tlen; - char sbar[256], tmp[256]; + /* + * The bar contains two parts: + * bartext_status - Misc. information (right aligned) + * bartext_winname - The window's name + */ + char bartext_status[1024]; + char *bartext_status_ptr; + int bartext_status_len; + + char bartext_winname[1024]; + int bartext_winname_len; + static int bartext_winname_len_max[MAXSCREENS]; + int bartext_winname_width_max; + + bartext_status_len = sizeof (bartext_status); + bartext_status_ptr = &bartext_status[0]; + bartext_status_ptr[bartext_status_len - 1] = '\0'; + + bartext_winname_len = sizeof (bartext_winname); + bartext_winname[0] = '\0'; + + /* Initialize the `static' variable on the first run */ + if (bartext_winname_len_max[0] == 0) + { + int i; + + for (i = 0; i < MAXSCREENS; i++) + bartext_winname_len_max[i] = bartext_winname_len; + } if (!s) return; @@ -194,143 +268,137 @@ XDrawLine (dpy, s->barwin, s->topwhitegc, 0, 0, 0, BAR_HEIGHT - 1); #endif - sbar[0] = '\0'; - + /* + * When this screen contains the active window, append + * ``(class~instance) [nftsz] '' to the left + */ if (current && (current->screen == s) && !((bar_hidden >= 0) && (bar_hidden < numhidden))) { - strcpy (sbar, "("); - - if (current->class) - strcat (sbar, current->class); - - strcat (sbar, "~"); - - if (current->instance) - strcat (sbar, current->instance); - - strcat (sbar, ") ["); - - tmp[0] = current->isnotile ? 'n' : '-'; - tmp[1] = current->isfloat ? 'f' : '-'; - tmp[2] = current->istool ? 't' : '-'; - tmp[3] = current->issticky ? 's' : '-'; - tmp[4] = current->iszoom ? 'z' : '-'; - tmp[5] = ']'; - tmp[6] = ' '; - tmp[7] = ' '; - tmp[8] = '\0'; - - strcat (sbar, tmp); + buffer_append (&bartext_status_ptr, &bartext_status_len, "(%s~%s) [%c%c%c%c%c] ", + current->class != NULL ? current->class : "[no class]", + current->instance != NULL ? current->instance : "[no instance]", + current->isnotile ? 'n' : '-', + current->isfloat ? 'f' : '-', + current->istool ? 't' : '-', + current->issticky ? 's' : '-', + current->iszoom ? 'z' : '-'); } - if (! - ((bar_hidden <= MENU_BASE) - || ((bar_hidden >= 0) && (bar_hidden < numhidden)))) + /* + * Add desktop name, unless menu if selected. + */ + if (!((bar_hidden <= MENU_BASE) || ((bar_hidden >= 0) && (bar_hidden < numhidden)))) { - strcat (sbar, prefs.dtname[s->num][s->desktop]); - strcat (sbar, " "); + buffer_append (&bartext_status_ptr, &bartext_status_len, "%s ", + prefs.dtname[s->num][s->desktop]); } - tmp[0] = '['; - tmp[1] = s->notile_raised[s->desktop] ? 'U' : 'T'; - tmp[2] = s->clickthru[s->desktop] ? 'C' : '-'; - tmp[3] = s->tile_resize[s->desktop] ? 'R' : '-'; - tmp[4] = s->skip_focus[s->desktop] ? 'S' : '-'; - tmp[5] = s->bigmr[s->desktop] ? 'B' : '-'; - tmp[6] = numhidden ? 'H' : '-'; - tmp[7] = ']'; - tmp[8] = '\0'; - - strcat (sbar, tmp); + buffer_append (&bartext_status_ptr, &bartext_status_len, "[%c%c%c%c%c%c]", + s->notile_raised[s->desktop] ? 'U' : 'T', + s->clickthru[s->desktop] ? 'C' : '-', + s->tile_resize[s->desktop] ? 'R' : '-', + s->skip_focus[s->desktop] ? 'S' : '-', + s->bigmr[s->desktop] ? 'B' : '-', + numhidden ? 'H' : '-'); - if (! - ((bar_hidden <= MENU_BASE) - || ((bar_hidden >= 0) && (bar_hidden < numhidden)))) + /* + * Add `cmd_output' (e.g. `larsclock') unless menu selected. + */ + if (!((bar_hidden <= MENU_BASE) || ((bar_hidden >= 0) && (bar_hidden < numhidden)))) { - if (cmd_output_ptr) - { - strcat (sbar, " "); - strcat (sbar, cmd_output); - } + buffer_append (&bartext_status_ptr, &bartext_status_len, " %s", + cmd_output); } - tlen = strlen (sbar); - - if (tlen > 0) + bartext_winname_width_max = BAR_WIDTH (s) - (2 * BAR_HEIGHT); + if (sizeof (bartext_status) != bartext_status_len) { - int plen = XTextWidth (font, sbar, tlen); - XDrawString (dpy, s->barwin, s->gc, BAR_WIDTH (s) - plen - BAR_HEIGHT, - BAR_TEXT_Y, sbar, tlen); + int length_string; + int width_pixels; - /* space left on left */ - max_tlen = BAR_WIDTH (s) - plen - (3 * BAR_HEIGHT); - if (max_tlen < 1) - max_tlen = 1; + length_string = strlen (bartext_status); + width_pixels = XTextWidth (font, bartext_status, length_string); + + XDrawString (dpy, s->barwin, s->gc, BAR_WIDTH (s) - width_pixels - BAR_HEIGHT, + BAR_TEXT_Y, bartext_status, length_string); + + bartext_winname_width_max -= (width_pixels + BAR_HEIGHT); } - /* print current window's label */ + /* + * There's no point in doing more work, if there's no space to print the + * result to.. + */ + if (bartext_winname_width_max <= 0) + return; + + /* + * Print the menu entry + */ if (bar_hidden <= MENU_BASE) { XDrawString (dpy, s->barwin, s->gc, BAR_HEIGHT, BAR_TEXT_Y, menu[-bar_hidden + MENU_BASE], MLEN); + return; } - else if ((bar_hidden >= 0) && (bar_hidden < numhidden)) + else if (((bar_hidden >= 0) && (bar_hidden < numhidden)) + || ((current && current->label) && (current->screen == s))) { - Client *c = hiddenc[bar_hidden]; - unsigned short int changed = 0; - - if (c->screen == s) - sprintf (tmp, "Hidden [%d/%d] %s", bar_hidden + 1, numhidden, - c->iconname ? c->iconname : c->label); - else - sprintf (tmp, "Other Screen [%d/%d] %s", bar_hidden + 1, numhidden, - c->iconname ? c->iconname : c->label); - - tlen = strlen (tmp); - - while (tlen > 0 && XTextWidth (font, tmp, tlen) > max_tlen) - { - tlen--; - changed = 1; - } - - if (changed && tlen > 10) - { - tmp[tlen - 3] = '\0'; - strcat (tmp, "..."); - } + int changed = 0; + int len; - if (tlen > 0) - { - XDrawString (dpy, s->barwin, s->gc, BAR_HEIGHT, BAR_TEXT_Y, tmp, - tlen); - } - } - else if (current && current->label && (current->screen == s)) - { - unsigned short int changed = 0; + if ((bar_hidden >= 0) && (bar_hidden < numhidden)) + { + Client *c = hiddenc[bar_hidden]; + + if (c->screen == s) + len = snprintf (bartext_winname, bartext_winname_len, "Hidden [%d/%d] %s", + bar_hidden + 1, numhidden, c->iconname ? c->iconname : c->label); + else + len = snprintf (bartext_winname, bartext_winname_len, "Other Screen [%d/%d] %s", + bar_hidden + 1, numhidden, c->iconname ? c->iconname : c->label); + } + else if (current && current->label && (current->screen == s)) + { + len = snprintf (bartext_winname, bartext_winname_len, "%s", + current->label); + } + + if (len >= bartext_winname_len) + { + len = bartext_winname_len - 1; + bartext_winname[len] = '\0'; + } + + if (len > bartext_winname_len_max[s->num]) + { + len = bartext_winname_len_max[s->num]; + changed = 1; + } + + while ((len > 0) + && (XTextWidth (font, bartext_winname, len) > bartext_winname_width_max)) + { + len--; + changed = 1; + } - strcpy (tmp, current->label); - tlen = strlen (tmp); + if (changed) + bartext_winname_len_max[s->num] = len; - while (tlen > 0 && XTextWidth (font, tmp, tlen) > max_tlen) - { - tlen--; - changed = 1; - } + if (len <= 0) + return; - if (changed && tlen > 10) + bartext_winname[len] = '\0'; + if (changed && len > 10) { - tmp[tlen - 3] = '\0'; - strcat (tmp, "..."); + bartext_winname[len - 3] = '.'; + bartext_winname[len - 2] = '.'; + bartext_winname[len - 1] = '.'; } - if (tlen > 0) - { - XDrawString (dpy, s->barwin, s->gc, BAR_HEIGHT, BAR_TEXT_Y, tmp, - tlen); - } + XDrawString (dpy, s->barwin, s->gc, BAR_HEIGHT, BAR_TEXT_Y, bartext_winname, len); } } @@ -373,3 +441,7 @@ return 0; } + +/* + * vim:shiftwidth=2:smarttab:expandtab + */ --- larswm-7.5.3.orig/dat.h +++ larswm-7.5.3/dat.h @@ -2,7 +2,7 @@ /* Many changes by Lars Bernhardsson. */ /* Less changes by Florian Forster */ -#define VERSION "larswm 7.5.3 [15-JUL-2004] by Lars Bernhardsson " +#define VERSION "larswm 7.5.3+patches [22-JAN-2006] by Lars Bernhardsson " #define BORDER 2 #define TILE_PAD 2 @@ -44,6 +44,7 @@ #define MAXAPPS 64 #define MAXBTNAPPS 3 +#define MAXSWITCHCLASSES 64 /* for zooming */ #define DIM_VERT 1 @@ -176,6 +177,8 @@ char *application[MAXAPPS]; char *btnapplication[MAXBTNAPPS]; + char *switchclass[MAXSWITCHCLASSES]; + char *switchclass_app[MAXSWITCHCLASSES]; char *floatclass[MAXFLOATCLASS]; char *toolclass[MAXTOOLCLASS]; @@ -310,6 +313,9 @@ KeySym application_key[MAXAPPS]; unsigned long application_mod[MAXAPPS]; + + KeySym switchclass_key[MAXSWITCHCLASSES]; + unsigned long switchclass_mod[MAXSWITCHCLASSES]; }; /* main.c */ --- larswm-7.5.3.orig/fns.h +++ larswm-7.5.3/fns.h @@ -50,6 +50,7 @@ /* buttons.c */ void button (XButtonEvent *); void spawn (ScreenInfo *, char *); +void window_of_class (ScreenInfo *, char *, char *); void wmdelete (Client *, int); void hide (Client *); void unhide (int, int); --- larswm-7.5.3.orig/larsmenu.man +++ larswm-7.5.3/larsmenu.man @@ -151,7 +151,7 @@ .ft B .nf -larsmenu -popup "XTerm:xterm" "Calculator:xcalc" +larsmenu \-popup "XTerm:xterm" "Calculator:xcalc" .ft .fi --- larswm-7.5.3.orig/larsclock.c +++ larswm-7.5.3/larsclock.c @@ -26,6 +26,7 @@ main (int argc, char **argv) { int i; + int update = 0; time_t t; char *slist; char *format = "%c"; @@ -48,9 +49,13 @@ { format = argv[++i]; } + else if (strcmp (argv[i], "-update") == 0 && i + 1 < argc) + { + update = atoi(argv[++i]); + } else { - fprintf (stderr, "usage: %s [-display display] [-format format]\n", + fprintf (stderr, "usage: %s [-display display] [-format format] [-update seconds]\n", argv[0]); exit (1); } @@ -64,6 +69,11 @@ exit (1); } + if (update == 0) + { + update = 1; + } + bartext_larswm = XInternAtom (dpy, "LARSWM_BARTEXT", False); slist = malloc (CLOCK_LENGTH); @@ -77,6 +87,6 @@ XFree (pr.value); XSync (dpy, False); - sleep (1); + sleep (update); } } --- larswm-7.5.3.orig/larswm.man +++ larswm-7.5.3/larswm.man @@ -359,12 +359,12 @@ .B Complete list of config keywords Another way to get a default .larswmrc is to run larswm -with the -defaults flag. It will print out all the +with the \-defaults flag. It will print out all the possible options with their defaults filled in, all you have to do is uncomment and edit any lines you wish to change. Rather than reproduce that here, you can create your own up to date version by running the command -larswm -defaults and piping it to a file. +larswm \-defaults and piping it to a file. .SH Keyboard commands for all windows and subdesktops @@ -695,8 +695,7 @@ 1. The width of the two tracks are calculated. This is by default set up so the left track uses 60% of the -screen width, but it can be configured in the -.larswmrc file. +screen width, but it can be configured in the .larswmrc file. 2. It calculates how many windows should be in each track, one in the left track and the rest in the right. --- larswm-7.5.3.orig/buttons.c +++ larswm-7.5.3/buttons.c @@ -296,13 +296,13 @@ if (p) { - execl (shell, shell, "-c", p, 0); + execl (shell, shell, "-c", p, (char *) NULL); fprintf (stderr, "larswm: execl %s", shell); perror (" failed"); } else { - execlp ("xterm", "xterm", 0); + execlp ("xterm", "xterm", (char *) NULL); fatal ("execlp xterm"); } } @@ -313,6 +313,70 @@ wait ((int *) 0); } +int +is_switchclass (Client * c, char *sc) +{ + int i; + char *inst; + + if (!sc) + return 0; + + if (!c->class) + return 0; + + if (strcmp (c->class, sc) == 0) + return 1; + + if (!c->instance) + return 0; + if (strcmp (c->instance, sc) == 0) + return 1; + + if ((inst = strchr (sc, '~'))) + { + inst++; + if (strncmp (c->class, sc, strlen (c->class)) == 0) + if (strncmp (c->instance, inst, strlen (c->instance)) == 0) + return 1; + } + + return 0; +} + +void +window_of_class (ScreenInfo *s, char *sc, char *p) +{ + Client *c, *last = 0; + for (c = clients; c; c = c->next) + { + if (is_switchclass(c, sc)) + last = c; + } + if (last) + { + goto_desktop (s, last->desktop); + raise_tbar (s); + + if (last->isnotile) { + if (!s->notile_raised[s->desktop]) + raise_notile (last->screen); + top (last); + XMapRaised (dpy, last->parent); + active (last); + } else { + if (s->notile_raised[s->desktop]) + raise_tile (last->screen, 0); + top (last); + XMapRaised (dpy, last->parent); + tile_all (s); + } + } else { + if (p) + spawn (s, p); + } +} + void wmdelete (Client * c, int shift) { --- larswm-7.5.3.orig/event.c +++ larswm-7.5.3/event.c @@ -141,25 +141,53 @@ { XWindowChanges wc; Client *c; + int dpy_width, dpy_height; c = getclient (e->window, 0); e->value_mask &= ~CWSibling; + dpy_width = DisplayWidth (dpy, c->screen->num); + dpy_height = DisplayHeight (dpy, c->screen->num); + if (c) { gravitate (c, 1); - if (e->value_mask & CWX) - c->x = e->x; - - if (e->value_mask & CWY) - c->y = e->y; - if (e->value_mask & CWWidth) - c->dx = e->width; + { + if (e->width <= dpy_width) + c->dx = e->width; + else + c->dx = dpy_width; + } if (e->value_mask & CWHeight) - c->dy = e->height; + { + if (e->height <= dpy_height) + c->dy = e->height; + else + c->dy = dpy_height; + } + + if (e->value_mask & CWX) + { + if ((e->x + c->dx) < 0) + c->x = 0; + else if (e->x > dpy_width) + c->x = dpy_width - c->dx; + else + c->x = e->x; + } + + if (e->value_mask & CWY) + { + if ((e->y + c->dy) < 0) + c->y = 0; + else if (e->y > dpy_height) + c->y = dpy_height - c->dy; + else + c->y = e->y; + } if (e->value_mask & CWBorderWidth) c->border = e->border_width; --- larswm-7.5.3.orig/keys.c +++ larswm-7.5.3/keys.c @@ -245,6 +245,13 @@ XGrabKey (dpy, XKeysymToKeycode (dpy, prefs.application_key[y]), prefs.application_mod[y], c->parent, True, GrabModeAsync, GrabModeAsync); + + for (y = 0; y < MAXSWITCHCLASSES; y++) + if (prefs.switchclass[y] && prefs.switchclass_key[y]) + XGrabKey (dpy, XKeysymToKeycode (dpy, prefs.switchclass_key[y]), + prefs.switchclass_mod[y], c->parent, True, GrabModeAsync, + GrabModeAsync); + } else { @@ -309,6 +316,13 @@ XGrabKey (dpy, XKeysymToKeycode (dpy, prefs.application_key[y]), prefs.application_mod[y], screens[i].root, True, GrabModeAsync, GrabModeAsync); + + for (y = 0; y < MAXSWITCHCLASSES; y++) + if (prefs.switchclass[y] && prefs.switchclass_key[y]) + XGrabKey (dpy, XKeysymToKeycode (dpy, prefs.switchclass_key[y]), + prefs.switchclass_mod[y], screens[i].root, True, + GrabModeAsync, GrabModeAsync); + } } } @@ -435,6 +449,16 @@ } } + for (i = 0; i < MAXSWITCHCLASSES; i++) + { + if (prefs.switchclass[i] && (k == prefs.switchclass_key[i]) + && (m == prefs.switchclass_mod[i])) + { + window_of_class (s, prefs.switchclass[i], prefs.switchclass_app[i]); + return; + } + } + XAllowEvents (dpy, ReplayKeyboard, e->time); } } --- larswm-7.5.3.orig/larsclock.man +++ larswm-7.5.3/larsclock.man @@ -11,6 +11,10 @@ .B \-format .I fmt ] +[ +.B \-update +.I seconds +] .SH DESCRIPTION .I larsclock is a minimal status bar clock application for the larswm window manager. @@ -25,6 +29,10 @@ .BI \-format " fmt" lets you format how the time is displayed. The default format is "%c". See strftime(3) for details. +.TP 18 +.BI \-update " seconds" +lets you specify the frequency in seconds at which larsclock +should update status bar. .SH SEE ALSO larsmenu(1x), larsremote(1x), larswm(1x), strftime(3x) .SH AUTHORS --- larswm-7.5.3.orig/tiling.c +++ larswm-7.5.3/tiling.c @@ -342,7 +342,7 @@ { if (c->istool && (c->screen == s) && normal (c) && (c->issticky || (c->desktop == s->desktop)) && - s->tile_resize[s->desktop]) + s->tile_resize[s->desktop] && !c->isfloat) { int x1 = c->x - BORDER; int y1 = c->y - BORDER; --- larswm-7.5.3.orig/ChangeLog +++ larswm-7.5.3/ChangeLog @@ -2009,3 +2009,10 @@ 123. Tweaked how colors for 3D borders are calculated. 124. Fixed menu inconsistency in sample.larswmrc. REL_7_5_3 Jul 15, 2004. + + 125. Fixed the behavior for ChangeRequests, so that windows + cannot move themselves off screen. + 126. Rewrite of `draw_tbar' to fix possible buffer- + overflows. + 127. Fixed calls to `execl' in `buttons.c' to pass a valid + sentinel. (Needed to compile with `-Wall -Werror') --- larswm-7.5.3.orig/prefs.c +++ larswm-7.5.3/prefs.c @@ -618,6 +618,15 @@ printf ("! larswm.application_key.0: KeySym\n"); printf ("! larswm.application_mod.0: Modifier\n"); printf ("!\n"); + + printf ("! Shortcuts to switch (focus) to window with defined name or class.\n"); + printf ("!\n"); + printf ("! larswm.switchclass.0: XTerm\n"); + printf ("! larswm.switchclass_app.0: xterm\n"); + printf ("! larswm.switchclass_key.0: KeySym\n"); + printf ("! larswm.switchclass_mod.0: Modifier\n"); + printf ("!\n"); + printf ("! End of larswm configuration.\n"); } @@ -764,6 +773,23 @@ prefs.application[i] = strdup (v.addr); } + for (i = 0; i < MAXSWITCHCLASSES; i++) + { + char res[32], cla[32]; + + sprintf (res, "larswm.switchclass.%d", i); + sprintf (cla, "Larswm.Switchclass.%d", i); + + if (XrmGetResource (db, res, cla, &vt, &v)) + prefs.switchclass[i] = strdup (v.addr); + + sprintf (res, "larswm.switchclass_app.%d", i); + sprintf (cla, "Larswm.Switchclass_app.%d", i); + + if (XrmGetResource (db, res, cla, &vt, &v)) + prefs.switchclass_app[i] = strdup (v.addr); + } + for (i = 0; i < MAXTOOLCLASS; i++) { char res[32], cla[32]; @@ -960,6 +986,22 @@ prefs.application_mod[i] = get_mod (v.addr); } + for (i = 0; i < MAXSWITCHCLASSES; i++) + { + char res[32], cla[32]; + + sprintf (res, "larswm.switchclass_key.%d", i); + sprintf (cla, "Larswm.Switchclass_key.%d", i); + + if (XrmGetResource (db, res, cla, &vt, &v)) + prefs.switchclass_key[i] = XStringToKeysym (v.addr); + + sprintf (res, "larswm.switchclass_mod.%d", i); + sprintf (cla, "Larswm.Switchclass_mod.%d", i); + + if (XrmGetResource (db, res, cla, &vt, &v)) + prefs.switchclass_mod[i] = get_mod (v.addr); + } if (XrmGetResource (db, "larswm.raise_notile_key", "Larswm.Raise_notile_key", &vt, &v)) --- larswm-7.5.3.orig/README.MG_patches +++ larswm-7.5.3/README.MG_patches @@ -0,0 +1,216 @@ +********************************************************************** +* Larswm patches * +********************************************************************** + +Larswm is a small X window manager written by Lars Bernhardsson. What +makes it unique compared to most window managers is its automatic +window tiling. Read more about it at homepage: +http://home.earthlink.net/~lab1701/larswm/ + +These are the patches to customize laswm for my use. + +Applying: +========= + +The patches are again larswm-7.5.3 but you can try it with other +version (if you are feeling lucky :-). + +Unpack larswm source and patches (if you hasn't do it yet): + + tar -xzvf larswm-7.5.3.tar.gz + tar -xzvf larswm-patches_7.5.3-5.tar.gz + +Move patches in unpacked larswm tree: + + mv larswm-patches_7.5.3-5 larswm-7.5.3 + +cd in patches and run patch.sh script: + + cd larswm-7.5.3/larswm-patches_7.5.3-5 + ./patch.sh + +Now you can build larswm. + +You can try to apply only some of the patches: just remove undesired +ones from patches directory before running patch.sh (in many cases it +works, but I didn't check all combinations). Read description of the +patches below to decide which you want. + +If you want to add your patch for this collection, move it in patches +directory and name it something like: xy_some-description.patch (`xy' +-- two letters that will control in what order the patches will be +applied). + +Description: +============ + +0. Patch from Florian Forster (00_larswm-7.5.3+patches.patch). +1. Larsclock `-update' option (aa_larsclock-update.patch). +2. Switch to window with class/name (ca_larswm-switchclass.patch). +3. Two windows on left track (da_larswm-two_on_left.patch). +4. Move window to other desktop (ea_larswm-move_other_desktop.patch). +5. Toggle skip fokus key binding (fa_larswm-toggle_skip_fokus.patch). + + +0. Patch from Florian Forster (00_larswm-7.5.3+patches.patch). +-------------------------------------------------------------- + +This is Florian Forster's patch [*] -- an "unofficial" latest version of +larswm. It contains mainly bug fixes. I strongly recommend to apply this +patch. + +[*] http://article.gmane.org/gmane.comp.window-managers.larswm.devel/105 + + +1. Larsclock `-update' option (aa_larsclock-update.patch). +---------------------------------------------------------- + +This patch adds `-update' option to larsclock: + + -update seconds lets you specify the frequency in seconds at which + larsclock should update status bar. + + +2. Switch to window with class/name (ca_larswm-switchclass.patch). +------------------------------------------------------------------ + +The patch adds shortcuts to switch (focus) to window with defined name +or class. If such window is not found, then corresponding program is +run. For example, if you define in your .larswmrc: + + larswm.switchclass.0: Emacs + larswm.switchclass_app.0: emacs + larswm.switchclass_key.0: e + larswm.switchclass_mod.0: Shift+Control + +then when you hit control+shift+e, larswm will switch to the first +found Emacs window, switching workspaces if necessary, or run "emacs" +in the background if not found. The next control+shift+e will switch +to another Emacs window (if it exists). + +You can spesify class of a window (e.g Emacs, XTerm) or window name +(e.g Emacs~gnus, XTerm~rxvt). + +The idea is stolen from sawfish's gimme.jl written by Stig S. Bakken +. + +Source modifications. + + In button.c: + + is_switchclass() checks if windows match specified class. + window_of_class() finds the window that match specified class + using is_switchclass(). If does not find, spawn new process. + + In dat.h struct Prefs modified adding new members: + char *switchclass[MAXSWITCHCLASSES]; + char *switchclass_app[MAXSWITCHCLASSES]; + KeySym switchclass_key[MAXSWITCHCLASSES]; + unsigned long switchclass_mod[MAXSWITCHCLASSES]; + + keys.c changed to call window_of_class() on switchclass_key && + switchclass_mod event. + + prefs.c changed accordingly. + + +3. Two windows on left track (da_larswm-two_on_left.patch). +----------------------------------------------------------- + +From time to time it is useful to have two windows on left track. For +example, if it is needed to compare something in two different +windows. This patch gives you this functionality. + +Below is detailed description what you can do after applying this +patch. You have three new key combinations. The default shortcuts are: + + ! larswm.two_on_left_key: Left + ! larswm.two_on_left_mod: Shift+Control+Alt + ! larswm.two_on_left_shrink_key: Down + ! larswm.two_on_left_shrink_mod: Shift+Control+Alt + ! larswm.two_on_left_grow_key: Up + ! larswm.two_on_left_grow_mod: Shift+Control+Alt + +Pressing "two_on_left_mod+two_on_left_key" you obtain two windows on +left track. Pressing "two_on_left_shrink_mod+two_on_left_shrink_key" +or "two_on_left_grow_mod+two_on_left_grow_key" you resize vertically +these windows. Pressing "two_on_left_mod+two_on_left_key" again you +get one window on left track back. + +Source modifications: + + In dat.h: + + VERT_GROW=5 is defined (how much per cent grow/shrink windows + at. May be it should be in preffs?). + + In struct ScreenInfo new item is added: + + int two_on_left[MAXDESKTOPS] + + When it is 0, only one window at left track, otherwise it shows + the size in per sent of left bottom window. + + In struct Prefs corresponding items were added for key binding. + + In tiling.c two new functions are added: + + two_on_left() -- toggle s->two_on_left (0 or 50); + two_on_left_grow() -- change s->two_on_left at dy. + + and tile_all() is modified. + + In keys.c and prefs.c: corresponding changes for key binding. + + +4. Move window to other desktop (ea_larswm-move_other_desktop.patch). +--------------------------------------------------------------------- + +This adds the ability to move window to othe virtual desktops. +The default shortcuts are: + + ! larswm.move_next_desktop_key: Right + ! larswm.move_next_desktop_mod: Shift+Alt + ! + ! larswm.move_prev_desktop_key: Left + ! larswm.move_prev_desktop_mod: Shift+Alt + + .... + + ! Move window to desktop shortcuts: Defaults are for the first 12 desktops, F1-F12. + ! If you have more than 12 desktops, you will have to add key bindings for them + ! or just use move prev/next desktop to move window to where you want. + ! + ! larswm.move_desktop_key.0: F1 + ! larswm.move_desktop_mod.0: Shift+Alt + +Source modifications. + + buttons.c:move_other_desktop() added that makes trick. + In Prefs struct the following members added: + + KeySym move_next_desktop_key; + unsigned long move_next_desktop_mod; + + KeySym move_prev_desktop_key; + unsigned long move_prev_desktop_mod; + + KeySym move_desktop_key[MAXDESKTOPS]; + unsigned long move_desktop_mod[MAXDESKTOPS]; + + for keyboard shortcuts. + + +5. Toggle skip fokus key binding (fa_larswm-toggle_skip_focus.patch). +--------------------------------------------------------------------- + +In "official" larswm the skip_focus could be toggled using bar menu, +but if you toggle very often it becomes rather boring. So key binding +to toggle skip_focus is added. + + larswm.toggle_skip_focus_key: f + larswm.toggle_skip_focus_mod: Control+Alt + + +-- +Mikolaj Golub --- larswm-7.5.3.orig/debian/menu +++ larswm-7.5.3/debian/menu @@ -0,0 +1,6 @@ +?package(larswm):\ + needs="wm"\ + section="Window Managers"\ + longtitle="Larswm: tiling window manager for X"\ + title="Larswm"\ + command="/usr/bin/larswm" --- larswm-7.5.3.orig/debian/control +++ larswm-7.5.3/debian/control @@ -0,0 +1,19 @@ +Source: larswm +Section: x11 +Priority: optional +Maintainer: Edelhard Becker +Standards-Version: 3.8.0 +Build-Depends: debhelper (>= 4), groff, libx11-dev, libxext-dev, libxmu-dev, x11proto-core-dev, xutils-dev +Homepage: http://larswm.fnurt.net/ + +Package: larswm +Architecture: any +Depends: ${shlibs:Depends} +Provides: x-window-manager +Description: Lars Window Manager with tiled windows + larswm is a hack for 9wm, adding automatic window tiling, virtual + desktops and many other features designed to make it a very efficient + user environment. It uses very little CPU time and virtual memory. + . + Author: Lars Bernhardsson + --- larswm-7.5.3.orig/debian/prerm +++ larswm-7.5.3/debian/prerm @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$1" = "remove" ]; then + update-alternatives --remove x-window-manager /usr/bin/larswm +fi + +#DEBHELPER# --- larswm-7.5.3.orig/debian/rules +++ larswm-7.5.3/debian/rules @@ -0,0 +1,80 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +.DELETE_ON_ERROR: + +%.ps: %.ms + groff -t $< > $@ + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + xmkmf -a + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/ + $(MAKE) install install.man DESTDIR=$(CURDIR)/debian/larswm \ + BINDIR=/usr/bin MANPATH=/usr/share/man + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs README* + dh_installexamples sample.* debian/example-larswm.mc debian/larswm.m4 debian/example-xmodmap debian/README-M4.html + dh_install debian/larswm.desktop usr/share/xsessions + dh_desktop + dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo +# dh_undocumented + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- larswm-7.5.3.orig/debian/watch +++ larswm-7.5.3/debian/watch @@ -0,0 +1,6 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +version=2 +http://larswm.fnurt.net/ larswm-([\d\.]*)\.tar\.gz debian uupdate --- larswm-7.5.3.orig/debian/changelog +++ larswm-7.5.3/debian/changelog @@ -0,0 +1,255 @@ +larswm (7.5.3-6) unstable; urgency=low + + * Build-depend on xutils-dev rather than xutils (thanks, Daniel Schepler) + Closes: #485208 + * moved homepage from description to control field + * bumped standards to 3.8.0 (moved menu entry) + * fixed manpages (Minus "-" and "." in first column) + * replaced x-dev by x11proto-core-dev on Build-Depends + + -- Edelhard Becker Tue, 10 Jun 2008 23:09:42 +0200 + +larswm (7.5.3-5) unstable; urgency=low + + * updated Mikolajs README and patches to his release 7.5.3-5: + - aa_larsclock-update.patch + - ba_larswm-switchclass.patch + * also include now Florian Forsters bugfix patch + + -- Edelhard Becker Sat, 4 Mar 2006 17:15:41 +0100 + +larswm (7.5.3-4) unstable; urgency=low + + * debian/control: adjust Build-Depends for removed xlibs-dev + (Closes: #346880) + * provide larswm.desktop session file (Closes: #330054) + * bumped standards to 3.6.2 (no changes) + + -- Edelhard Becker Tue, 10 Jan 2006 15:25:07 +0100 + +larswm (7.5.3-3) unstable; urgency=low + + * applied Mikolaj Golubs 'larswm-switchclass' patch, thanks Mikolaj + * added Mikolajs README to the docs + + -- Edelhard Becker Tue, 16 Aug 2005 16:22:30 +0200 + +larswm (7.5.3-2) unstable; urgency=low + + * applied Mikolaj Golubs 'larsclock -update' patch, thanks Mikolaj + * applied Tommy Petterssons 'skip-floating-tools' patch, mailed to + larswm-devel list on Tue, 09 Aug 2005 + + -- Edelhard Becker Tue, 9 Aug 2005 18:07:03 +0200 + +larswm (7.5.3-1) unstable; urgency=low + + * New upstream release + + -- Edelhard Becker Tue, 20 Jul 2004 18:11:51 +0200 + +larswm (7.5.2-1) unstable; urgency=low + + * New upstream release + + -- Edelhard Becker Thu, 8 Jul 2004 23:52:37 +0200 + +larswm (7.5.1-1) unstable; urgency=low + + * New upstream release + + -- Edelhard Becker Tue, 22 Jun 2004 13:49:30 +0200 + +larswm (7.5.0-1) unstable; urgency=low + + * New upstream release + * added Christopher Biggs' m4 macros for generating a larswmrc file with the + necessary changes to debian/{rules,copyright}, thanks Christopher! + + -- Edelhard Becker Sat, 19 Jun 2004 00:55:18 +0200 + +larswm (7.4.8-1) unstable; urgency=low + + * New upstream release + * removed references to Postscript refcards from debian/rules + * corrected larsmenu manpage section + + -- Edelhard Becker Thu, 3 Jun 2004 23:25:59 +0200 + +larswm (7.3.9-1) unstable; urgency=low + + * New upstream release (7.3.7 and 8 were test releases) + * changed URL in debian/{control,copyright,watch} to new DynDNS name + + -- Edelhard Becker Sun, 30 May 2004 12:15:45 +0200 + +larswm (7.3.6-1) unstable; urgency=low + + * New upstream release (Tommy Petterssons sticky-space-per-desktop patch + included) + + -- Edelhard Becker Sun, 16 May 2004 11:45:40 +0200 + +larswm (7.3.5-1) unstable; urgency=low + + * New upstream release + * made package lintian-clean: + - updated manpages section + - cleaned up menu entry + + -- Edelhard Becker Sat, 8 May 2004 15:36:19 +0200 + +larswm (7.3.3-1) unstable; urgency=low + + * New upstream release + + -- Edelhard Becker Sat, 1 May 2004 14:55:36 +0200 + +larswm (7.3.2-1) unstable; urgency=low + + * New upstream release + + -- Edelhard Becker Sat, 17 Apr 2004 19:28:59 +0200 + +larswm (7.3.1-1) unstable; urgency=low + + * New upstream release + * added Tommy Petterssons sticky-space-per-desktop patch (mailed to + larswm-devel list on Jan, 24th 2004 + * bumped standards to 3.6.1 (no changes) + * added author and homepage to package description; updated links to + homepage in copyright and watch file + + -- Edelhard Becker Wed, 7 Apr 2004 18:03:43 +0200 + +larswm (7.2.10-2) unstable; urgency=low + + * debian/control: changed maintainer to my debian account + * debian/control: two empty lines break backporting to woody + * bumped standards to 3.5.10 + + -- Edelhard Becker Wed, 9 Jul 2003 16:19:50 +0200 + +larswm (7.2.10-1) unstable; urgency=low + + * New upstream release + * larsclock format patch added (initial forward was never received by + upstream). Closes: #94016. + * focus flickering fix included in upstream + + -- Edelhard Becker Tue, 29 Apr 2003 10:54:14 +0200 + +larswm (7.2.9-1) unstable; urgency=low + + * New upstream release + * bumped to standards 3.5.9. + * added watch file + * focus flickering fixed. Closes: #182546. + + -- Edelhard Becker Thu, 24 Apr 2003 11:25:57 +0200 + +larswm (7.2.8-3) unstable; urgency=low + + * New maintainer. Closes: #163317. + + -- Edelhard Becker Wed, 26 Feb 2003 16:08:51 +0100 + +larswm (7.2.8-2) unstable; urgency=low + + * QA upload. + * debian/menu: Use `needs=wm' rather than `needs=x11'. Closes: #173196. + + -- Matej Vela Sun, 15 Dec 2002 20:58:52 +0100 + +larswm (7.2.8-1) unstable; urgency=low + + * QA upload. + * New upstream release. + * debian/copyright: Update upstream URL. + + -- Matej Vela Mon, 4 Nov 2002 00:09:43 +0100 + +larswm (7.2.6-1) unstable; urgency=low + + * QA upload. + * New upstream release. + + -- Matej Vela Tue, 1 Oct 2002 21:24:51 +0200 + +larswm (7.2.5-1) unstable; urgency=low + + * QA upload. + * New upstream release. + + -- Matej Vela Sun, 29 Sep 2002 22:52:56 +0200 + +larswm (7.2.3-3) unstable; urgency=low + + * QA upload. + * Added xutils to build dependencies. Closes: #162233. + + -- Matej Vela Wed, 25 Sep 2002 05:39:46 +0200 + +larswm (7.2.3-2) unstable; urgency=low + + * QA upload. + * Built as a non-native package. + * Converted to debhelper. + * Added menu support. Closes: #94015. + * Updated build dependencies. + + -- Matej Vela Mon, 23 Sep 2002 22:51:41 +0200 + +larswm (7.2.3-1) unstable; urgency=low + + * New upstream release (Closes: #153463). + * Bumped policy to 3.5.7 + * Don't fiddle with /usr/doc anymore. + * Orhaned, I don't use larswm anymore. + + -- Tommi Virtanen Sun, 22 Sep 2002 15:40:18 +0300 + +larswm (7.0.13-2) unstable; urgency=low + + * Move everything out of /usr/X11R6. + * prerm was missing alternatives removal; added unconditional + cleaning to postinst (upgrade isn't good enough, the package + could be uninstalled for a while). + * /usr/man -> /usr/share/man + + -- Tommi Virtanen Wed, 21 Feb 2001 20:57:15 +0200 + +larswm (7.0.13-1) unstable; urgency=low + + * New upstream version. + + -- Tommi Virtanen Sat, 2 Dec 2000 18:31:55 +0200 + +larswm (7.0.12-1) unstable; urgency=low + + * New upstream version. + * Beware: the larswm executable has been split to larswm, + larswm-message and larswm-clock. + + -- Tommi Virtanen Sun, 29 Oct 2000 00:36:42 +0300 + +larswm (7.0.10-1) unstable; urgency=low + + * New upstream version. + + -- Tommi Virtanen Fri, 13 Oct 2000 15:27:24 +0300 + +larswm (7.0.8-2) unstable; urgency=low + + * Install the upstream changelog. + * Remove dummy debian/shlibs.local. + + -- Tommi Virtanen Fri, 13 Oct 2000 15:19:43 +0300 + +larswm (7.0.8-1) unstable; urgency=low + + * Initial Release, closes: #74374. + + -- Tommi Virtanen Mon, 9 Oct 2000 09:00:29 +0300 + + --- larswm-7.5.3.orig/debian/postinst +++ larswm-7.5.3/debian/postinst @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ "$1" = "configure" ]; then + update-alternatives \ + --install /usr/bin/x-window-manager \ + x-window-manager /usr/bin/larswm 20 \ + --slave /usr/share/man/man1/x-window-manager.1.gz \ + x-window-manager.1.gz /usr/share/man/man1/larswm.1x.gz +fi + +#DEBHELPER# --- larswm-7.5.3.orig/debian/README-M4.html +++ larswm-7.5.3/debian/README-M4.html @@ -0,0 +1,76 @@ + + + + Hacks for the larswm window manager + + + + +

Hacks for the larswm window manager

+ +

The X11 window manager "larswm" is a minimalist window + manager descended from 9wm, which was itself inspired by Plan 9's + windowing system. The core idea is that windows should arrange + themselves, allowing the user to concentrate on getting the job done, + instead of pixel-dinking.

+ +

I got tired of maintaining a large larswm configuration file + containing lots of custom key definitions for my Logitech iTouch + keyboard, so I wrote some M4 macros to simplify my configuration + file, and to automate the numbering of application key directives. + Those of you who administer sendmail will be familiar + with the process of using a short macro file to produce a long + (and essentially write-only) configuration file. + +

To use the configuration macros you will need:

+ +
+
larswm.m4
+
This file defines macros that + expand to larswm configuration directives. You should not need + to modify this file, just place it in your home dir, or wherever + you keep your "larswm.mc" source file. Comments explain how + to use the macros.
+
larswm.mc
+
This file contains the macro invocations that expand to + larswm directives suitable for .larswmrc
+
A .larswmrc generated from larswm.mc
+
Whenever you modify larswm.mc, regenerate your .larswmrc by + running
m4 larswm.mc >$HOME/.larswmrc
+
+ +

Bugs and gotchas

+ +
    + +
  • Some of macros don't work in BSD m4. I'll fix this someday. + Until then, install GNU m4, and run gm4 instead + of m4. + +
  • If you want larswm to utilise extended keys such as + XF86Standby, make sure they are defined in your X + keymap. If you see "Keysym 0x0, NoSymbol" in the + output of xev when you press your extended keys, + you need to use xmodmap to set the + keycode -> keysym mapping as in this example. If you try to trap + an unknown keysym, larswm will break---clients such as xterm + will just beep plaintively at you when you press any key. + +
+ +
+
Christopher Biggs
+ + +Last modified: Fri Jun 18 20:07:10 EST 2004 + + + --- larswm-7.5.3.orig/debian/compat +++ larswm-7.5.3/debian/compat @@ -0,0 +1 @@ +4 --- larswm-7.5.3.orig/debian/example-larswm.mc +++ larswm-7.5.3/debian/example-larswm.mc @@ -0,0 +1,124 @@ +!!!!!!!!!!!!!!!!!!!!!!!! +! larswm configuration ! +!!!!!!!!!!!!!!!!!!!!!!!! +! +! Don't edit .larswmrc , edit larswm.mc and regenerate your .larswmrc by +! running "m4 larswm.mc >.larswmrc" +! + +include(`larswm.m4')dnl + +! +! Default window properties +! +PROP(background,darkslategray) +PROP(foreground,lightgray) + +! +! Virtual desktop settings +! +PROP(desktops, 4) + +DTASPROP(dtname, 0, `Dink [1---]') +DTASPROP(dtname, 1, `Slay [-2--]') +DTASPROP(dtname, 2, `Hack [--3-]') +DTASPROP(dtname, 3, `Surf [---4]') + +DTASPROP(left_track_width, 0, 69) +DTASPROP(left_track_width, 1, 69) +DTASPROP(left_track_width, 2, 69) +DTASPROP(left_track_width, 3, 69) + + +! +! Focus and tiling behaviour +! +DTALLPROP(tile_resize, False) +DTALLPROP(skip_focus, False) +DTALLPROP(clickthru, False) +DTPROP(clickthru, 0, 3, True) + +! +! Window class patterns +! +TOOLCLASS(`XTerm~eventlog') +TOOLCLASS(`XDaliClock') +TOOLCLASS(`XOsview') +TOOLCLASS(`xmms~XMMS_Player') +TOOLCLASS(`XkbLEDPanel') + +FLOATCLASS(`fXterm~xterm') + +STICKYCLASS(`fXterm~xterm') +STICKYCLASS(`XDaliClock') +STICKYCLASS(`XOsview') + +DOTILECLASS(`tXterm~xterm') +DOTILECLASS(`Emacs') +DOTILECLASS(`Mozilla~Navigator') +dnl DOTILECLASS(`Firefox-bin~Gecko') +dnl DOTILECLASS(`Thunderbird-bin~Gecko') + +DTCLASS(`Mozilla~navigator', 3) +DTCLASS(`Thunderbird-bin', 0) + +! +! Larswm command keys +! +KEY(End, Shift+Control, hide) +KEY(Home, Shift+Control, unhide) +KEY(Delete, Shift+Control, close) +dnl +dnl ! Keys for the two-on-left patch +dnl KEY(Left, Shift+Control+Alt, two_on_left) +dnl KEY(Down, Shift+Control+Alt, two_on_left_shrink) +dnl KEY(Up, Shift+Control+Alt, two_on_left_grow) +dnl +DTKEY(F1, Alt, goto_desktop, 0) +DTKEY(F2, Alt, goto_desktop, 1) +DTKEY(F3, Alt, goto_desktop, 2) +DTKEY(F4, Alt, goto_desktop, 3) + +! +! Application Keys and mouse buttons +! +APPBUTTON(2, `xcolour xterm -ls -class uXterm -fn neep-18 -geometry 80x25') +APPBUTTON(3, `xcolour xterm -ls -class tXterm -fn neep-18') + +APPKEY(u, Control+Alt, `xcolour xterm -ls -class uXterm -fn neep-18 -geometry 80x25') +APPKEY(t, Control+Alt, `xcolour xterm -ls -class tXterm -fn neep-18') +APPKEY(m, Control+Alt, `firefox -P default') +APPKEY(e, Control+Alt, `emacs') +APPKEY(j, Control+Alt, `jpilot') +APPKEY(q, Control+Alt, `larsremote exit') +APPKEY(3, Control+Alt, `xmms') +APPKEY(i, Control+Alt, `xmix') +APPKEY(g, Control+Alt, `emacs -f gnus') +APPKEY(n, Control+Alt, `thunderbird') +APPKEY(Menu, None, `xcolour xterm -ls -class uXterm -fn modd-12 -geometry 80x10+1-1 -e env SHELL=run bash') + +! +! App keys for Logitech iTouch keyboard +! +XF86KEY(Standby, `lock') + +XF86KEY(Finance, `xtightvncviewer') +XF86KEY(MySites, `firefox -P proxytesting') +XF86KEY(Community, `mp3-pl-osd') +XF86KEY(Favorites, `mp3-osd -d 8') + +XF86KEY(AudioPrev, `xmms-remote --rew') +XF86KEY(AudioNext, `xmms-remote --fwd') +XF86KEY(AudioMedia, `xcolour xterm -ls -class uXterm -fn neep-18 -geometry 80x15 -e aumix') +XF86KEY(AudioRaiseVolume, `aumix -v+2') +XF86KEY(AudioLowerVolume, `aumix -v-2') +XF86KEY(AudioMute, `mute') +XF86KEY(AudioPlay, `xmms-remote --play-pause') +XF86KEY(AudioStop, `xmms-remote --stop') + +XF86KEY(iTouch, `vmware') +XF86KEY(Mail, `thunderbird') +dnl XF86KEY(Shop, `') +dnl XF86KEY(Search, `') +XF86KEY(HomePage, `firefox -P default') + --- larswm-7.5.3.orig/debian/larswm.desktop +++ larswm-7.5.3/debian/larswm.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=larswm +Comment=This logs you into a plain larswm session +Exec=/usr/bin/larswm +Terminal=False +TryExec=/usr/bin/larswm +Type=Application --- larswm-7.5.3.orig/debian/larswm.m4 +++ larswm-7.5.3/debian/larswm.m4 @@ -0,0 +1,115 @@ +divert(-1)dnl +!----------------------------------------------------------------------------- +! +! Macros for creating larswm config files +! +! Created by Christopher Biggs , when I realized that +! maintaining my .larswmrc was just too painful, with all the numbered +! window-class and application key sections. These macros allow the +! numbering to be generated automagically. +! +! A second benefit is that the total size of this macro package plus my +! larswm.mc input file is less than half the size of my original .larswmrc! +! + +! +! Counters used for auto-increment properties +! +define(`appkey_counter',`0')dnl +define(`toolclass_counter',`0')dnl +define(`floatclass_counter',`0')dnl +define(`stickyclass_counter',`0')dnl +define(`dotileclass_counter',`0')dnl +define(`dtclass_counter',`0')dnl + +define(`COUNTER_INCR',`define(`$1',incr($1))')dnl + +! +! PROP(`prop', `value') => larswm.prop: value +! +define(`PROP',`larswm.$1: $2') + + +! +! DTPROP(`prop', ,
, `value') => larswm..
.prop: value +! DTASPROP(`prop',
, `value') => larswm.?.
.prop: value +! DTALLPROP(`prop', `value') => larswm.?.?.prop: value +! +! DTPROP sets property on one DeskTop (on one specific screen). +! DTASPROP sets property on one DeskTop (on All Screens). +! DTALLPROP sets property on ALL desktops on all screens. + +define(`DTPROP',`larswm.$2.$3.$1: $4') +define(`DTASPROP',`larswm.?.$2.$1: $3') +define(`DTALLPROP', `larswm.?.?.$1: $2') + +! +! KEY(, , ) => larswm._key: +! larswm._mod: +! +define(`KEY',`larswm.$3_key: $1 +larswm.$3_mod: $2 +') + +! +! DTKEY(, , , ) => larswm._key.n: +! larswm._mod.n: +! +define(`DTKEY',`larswm.$3_key.$4: $1 +larswm.$3_mod.$4: $2 +') + +! +! APPBUTTON(, ) => larswm.buttonn.application: +! + +define(`APPBUTTON',`larswm.button$1.application: $2') + +! +! APPKEY(, , ) => larswm.application.n: +! larswm.application_key.n: +! larswm.application_mod.n: +! +! XF86KEY(, ) => larswm.application.n: +! larswm.application_key.n: XF86 +! larswm.application_mod.n: None +! (n auto-increments, starting at zero) +define(`APPKEY',`larswm.application.appkey_counter: $3 +larswm.application_key.appkey_counter: $1 +larswm.application_mod.appkey_counter: $2 +COUNTER_INCR(`appkey_counter')') + +define(`XF86KEY',`larswm.application.appkey_counter: $2 +larswm.application_key.appkey_counter: XF86$1 +larswm.application_mod.appkey_counter: None +COUNTER_INCR(`appkey_counter')') + + +! +! TOOLCLASS() => larswm.toolclass.n: +! FLOATCLASS() => larswm.floatclass.n: +! STICKYCLASS() => larswm.stickyclass.n: +! DOTILECLASS() => larswm.dotileclass.n: +! +! (n auto-increments, starting at zero) +! +define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl + +define(`FOOCLASS2',`define(`$1CLASS',`larswm.$2.$3: '`COUNTER_INCR(`$3')'$`'1)') +define(`FOOCLASS',`FOOCLASS2(upcase($1),$1class,`$1class_counter')') + +FOOCLASS(`tool') +FOOCLASS(`float') +FOOCLASS(`sticky') +FOOCLASS(`dotile') + +! +! DTCLASS(, dt) => larswm.dtclass.n: +! => larswm.dtnum.n: +! +define(`DTCLASS',`larswm.dtclass.dtclass_counter: $1 +larswm.dtnum.dtclass_counter: $2 +COUNTER_INCR(`dtclass_counter') +') + +divert(0)dnl --- larswm-7.5.3.orig/debian/copyright +++ larswm-7.5.3/debian/copyright @@ -0,0 +1,43 @@ +This package was debianized by Tommi Virtanen tv@debian.org on +Mon, 9 Oct 2000 09:02:29 +0300. + +It was downloaded from http://larswm.fnurt.net/ + +Upstream authors: Lars Bernhardsson + David Hogan (9wm) + +Copyright: + +--8<-- +Licensing: + +Please see the file README.9wm for David Hogan's original 9wm license. +The same type of license applies to larswm. +--8<-- + +--8<-- +Licence +======= + + 9wm is free software, and is Copyright (c) 1994-1996 by David Hogan. + 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 9wm + and whose documentation gives credit where it is due + (4) the author is 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. +--8<-- + +The m4 macros are copyright by Christopher Biggs and were +initially downloaded from http://members.optushome.com.au/cjbiggs/code/larswm/ +and included with the explicit permission of the author. + +----------- Edelhard Becker , Fri Jun 18 23:51:07 UTC 2004 --- larswm-7.5.3.orig/debian/example-xmodmap +++ larswm-7.5.3/debian/example-xmodmap @@ -0,0 +1,29 @@ +! +! Keys for the Logitech iTouch wireless keyboid +! +! Use xev to find out what keycode your keys generate, then choose +! an appropriate keysym from /usr/X11R6/lib/X11/XKeysymDB. +! +keycode 233 = Return + +keycode 223 = XF86Standby +keycode 147 = XF86Finance +keycode 148 = XF86MySites +keycode 149 = XF86Community +keycode 230 = XF86Favorites + +keycode 144 = XF86AudioPrev +keycode 153 = XF86AudioNext +keycode 237 = XF86AudioMedia +keycode 174 = XF86AudioLowerVolume +keycode 176 = XF86AudioRaiseVolume +keycode 160 = XF86AudioMute +keycode 162 = XF86AudioPlay +keycode 164 = XF86AudioStop + +keycode 146 = XF86iTouch +keycode 236 = XF86Mail +keycode 145 = XF86Shop +keycode 229 = XF86Search +keycode 178 = XF86HomePage +