Re: [dwm] Java patch
On Sat, Apr 26, 2008 at 02:05:34PM -0300, Luiz wrote: I've made a simple hack (based on the xmonad one) to get Java applications (which use the XToolkit/XAWT backend) working. With this patch you won't get any grey windows anymore. The patch for dwm-4.9 is available here: http://files.luizribeiro.org/dwm/dwm-4.9-java.diff Does this really work for everyone? I remember I evaluated a similiar solution last year without success. ;( Regards, -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361
Re: [dwm] Java patch
On Sun, Apr 27, 2008 at 2:45 PM, Anselm R. Garbe [EMAIL PROTECTED] wrote: Does this really work for everyone? I remember I evaluated a similiar solution last year without success. ;( If it does, I'm all for it, provided that it goes between some clear #ifdef UGLY_JAVA_HACK ... #endif or something similar. Greetings, Sander.
Re: [dwm] bloq may used to ignore keybindings
On Sat, Apr 26, 2008 at 09:52:54AM +0200, Kalle Svensson wrote: On Thu, Apr 24, 2008 at 08:37:23AM +0200, markus schnalke wrote: tutorial for X (uses `xmodmap' which is in package xbase-clients on Debian systems) in the .xinitrc: /usr/bin/xmodmap $HOME/.xmodmaprc in .xmodmaprc ! have CAPS_LOCK as second ESC remove Lock = Caps_Lock keysym Caps_Lock = Escape This does, for some reason, not work for me. When the X session starts the xmodmap rules have not been applied, though when manually executed they work fine. I was experiencing a similar problem. Showed up that when using setxkbmap to change keyboard layout, all xmodmap settings were removed. As I use xbindkeys to launch setxkbmap, I just added ; xmodmap ~/.xmodmaprc after setxkbmap. Maybe the gnome-settings-daemon (which is also exexuted in my .xinitrc) owerwrites this? It does seem pretty likely that Gnome messes with it. Regards, KSV Sincerely, - Asbjørn
Re: [dwm] Java patch
It works for me (JRE 1.6.0u5). Anyone else tried it and can give any feedback? On Sun, Apr 27, 2008 at 10:33 AM, Sander van Dijk [EMAIL PROTECTED] wrote: On Sun, Apr 27, 2008 at 2:45 PM, Anselm R. Garbe [EMAIL PROTECTED] wrote: Does this really work for everyone? I remember I evaluated a similiar solution last year without success. ;( If it does, I'm all for it, provided that it goes between some clear #ifdef UGLY_JAVA_HACK ... #endif or something similar. Greetings, Sander. -- Luiz Ribeiro http://luizribeiro.org/
[dwm] small cleanup of drawtext()
Hi, I do small cleanup of drawtext(): - buf[] is not needed to be global - there's no need to end buf[] with zero byte, as all function take length parameter - w dc.w can be true iff length of printed text is zero -Ph -- Premysl Anydot Hruby, http://www.redrum.cz/ diff -r 042cef9c6ace dwm.c --- a/dwm.c Fri Apr 25 00:04:27 2008 +0200 +++ b/dwm.c Sun Apr 27 18:15:02 2008 +0200 @@ -210,7 +210,7 @@ void zoom(const char *arg); /* variables */ -char stext[256], buf[256]; +char stext[256]; int screen, sx, sy, sw, sh; int (*xerrorxlib)(Display *, XErrorEvent *); int bx, by, bw, bh, blw, bgw, mx, my, mw, mh, mox, moy, mow, moh, tx, ty, tw, th, wx, wy, ww, wh; @@ -600,22 +600,23 @@ int x, y, w, h; unsigned int len, olen; XRectangle r = { dc.x, dc.y, dc.w, dc.h }; + char buf[256]; XSetForeground(dpy, dc.gc, col[invert ? ColFG : ColBG]); XFillRectangles(dpy, dc.drawable, dc.gc, r, 1); if(!text) return; + olen = strlen(text); + len = MIN(olen, sizeof buf); + memcpy(buf, text, len); w = 0; - olen = strlen(text); - len = MIN(olen, sizeof buf - 1); - memcpy(buf, text, len); - buf[len] = 0; h = dc.font.ascent + dc.font.descent; y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent; x = dc.x + (h / 2); /* shorten text if necessary */ - while(len (w = textnw(buf, len)) dc.w - h) - buf[--len] = 0; + for(; len (w = textnw(buf, len)) dc.w - h; len--); + if (!len) + return; if(len olen) { if(len 1) buf[len - 1] = '.'; @@ -624,8 +625,6 @@ if(len 3) buf[len - 3] = '.'; } - if(w dc.w) - return; /* too long */ XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]); if(dc.font.set) XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
Re: [dwm] Yet another simplification, this time sel/prevtags
On Sun, Apr 20, 2008 at 09:49:37PM +0200, yy wrote: I like this change, good work Premysl! But once you are using the array, you don't need seltags any more. The attached patch saves 2 or 3 loc. It also includes the functionality of my patch to see prevtags, but if you do the XOR inside memcpy you can save another line of code. I have also changed a little your notation (because I don't like underscores in variable names), but maybe you can think of better names. I think I will like dwm 5.0... Applied tagset patch -- - yiyus || JGL . -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361
Re: [dwm] Yet another simplification, this time sel/prevtags
On Sun, Apr 20, 2008 at 10:24:32PM +0200, Premysl Hruby wrote: void view(const char *arg) { seltags ^= 1; memset(tagset[seltag], (NULL == arg), TAGSZ); tagset[seltag][idxoftag(arg)] = True; arrange(); } I simplified view() accordingly. -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361
Re: [dwm] fgeom patch
On Tue, Apr 15, 2008 at 12:05:53PM +0200, yy wrote: There was an error in monocle, and the floating() definition hadn't been removed... (ok, ok, yesterday it was not my day...). I have also changed zoom() so that it does an arrange if lt-isfloating or sel-isfloating; this way, after having manually resized windows while in [M] (or = or |) you can rearrange your windows without toggling layouts. I think the changes (which now only adds one loc if you don't count the example layouts) allows much more flexibility in dwm, especially in floating layouts (now you can have floating layouts to arrange your windows in a grid, for example), and I won't need defines to not remember floating layout (I can use =). Well, now I will really wait to see what you have to say, going back to plan9,,, sorry again for all this noise. Applied. -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361
Re: [dwm] Yet another simplification, this time sel/prevtags
On Sun, Apr 27, 2008 at 07:41:08PM +0200, Anselm R. Garbe wrote: On Sun, Apr 20, 2008 at 10:24:32PM +0200, Premysl Hruby wrote: void view(const char *arg) { seltags ^= 1; memset(tagset[seltag], (NULL == arg), TAGSZ); tagset[seltag][idxoftag(arg)] = True; arrange(); } I simplified view() accordingly. With the current change in mind, do we still need viewprev()? Kind regards, -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361
Re: [dwm] Yet another simplification, this time sel/prevtags
On (27/04/08 19:58), Anselm R. Garbe wrote: With the current change in mind, do we still need viewprev()? Short answer: yes, we do :) Long answer: yes, we do because: - you are not able to see previous tagset if you have currently selected more than one tag - for switching to previous tagset you doesn't need to know what is/are current tag, you simply press key for viewprev, and it's simply done :) -Ph -- Premysl Anydot Hruby, http://www.redrum.cz/
Re: [dwm] Yet another simplification, this time sel/prevtags
2008/4/27 Anselm R. Garbe [EMAIL PROTECTED]: On Sun, Apr 27, 2008 at 07:41:08PM +0200, Anselm R. Garbe wrote: On Sun, Apr 20, 2008 at 10:24:32PM +0200, Premysl Hruby wrote: void view(const char *arg) { seltags ^= 1; memset(tagset[seltag], (NULL == arg), TAGSZ); tagset[seltag][idxoftag(arg)] = True; arrange(); } I simplified view() accordingly. With the current change in mind, do we still need viewprev()? Kind regards, -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361 After the last change in hg tip, viewprev is the only way to view the previous tags, the change when trying to view the currently selected tag is not working any more, if you remove viewprev you can then remove all the tagset stuff. Another thing, now if you press twice in a tag to view it you will lose your previous tags, I don't think that's the expected behavior. -- - yiyus || JGL .
Re: [dwm] Yet another simplification, this time sel/prevtags
On (27/04/08 20:33), yy wrote: To: dynamic window manager dwm@suckless.org From: yy [EMAIL PROTECTED] Subject: Re: [dwm] Yet another simplification, this time sel/prevtags Reply-To: dynamic window manager dwm@suckless.org List-Id: dynamic window manager dwm.suckless.org After the last change in hg tip, viewprev is the only way to view the previous tags, the change when trying to view the currently selected tag is not working any more, if you remove viewprev you can then remove all the tagset stuff. Another thing, now if you press twice in a tag to view it you will lose your previous tags, I don't think that's the expected behavior. No, you will not lost anything :) I thought that too (and write it here, too), but try it. It somewhat not so easilly imaginable code. -Ph -- Premysl Anydot Hruby, http://www.redrum.cz/
Re: [dwm] Java patch
Anselm R. Garbe -- dwm (2008-04-27 14:45:58 +0200): On Sat, Apr 26, 2008 at 02:05:34PM -0300, Luiz wrote: I've made a simple hack (based on the xmonad one) to get Java applications (which use the XToolkit/XAWT backend) working. With this patch you won't get any grey windows anymore. The patch for dwm-4.9 is available here: http://files.luizribeiro.org/dwm/dwm-4.9-java.diff Does this really work for everyone? I remember I evaluated a similiar solution last year without success. ;( It doesn't work for me. Just tested with jdk 1.5.0 and netbeans... Regards, Jukka -- bashian roulette: $ ((RANDOM%6)) || rm -rf ~
Re: [dwm] Java patch
On Sun, Apr 27, 2008 at 4:59 PM, Jukka Salmi [EMAIL PROTECTED] wrote: It doesn't work for me. Just tested with jdk 1.5.0 and netbeans... I think the LG3D Java compatibility came with jdk 1.6. Remember that the hack sets the NET_WM_NAME to LG3D. Maybe setting it to a different name could work with jdk 1.5. But I'm not sure about that, or what window manager name you should use. -- Luiz Ribeiro http://luizribeiro.org/
Re: [dwm] Java patch
luizribeiro: On Sun, Apr 27, 2008 at 4:59 PM, Jukka Salmi [EMAIL PROTECTED] wrote: It doesn't work for me. Just tested with jdk 1.5.0 and netbeans... I think the LG3D Java compatibility came with jdk 1.6. Remember that the hack sets the NET_WM_NAME to LG3D. Maybe setting it to a different name could work with jdk 1.5. But I'm not sure about that, or what window manager name you should use. This patch has been in xmonad for a while, there's some more documentation here, http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-SetWMName.html Several users have reported this as useful. -- Don
Re: [dwm] Java patch
Tuncer Ayaz dixit (2008-04-27, 21:49): Btw, what about the Tk issues I read here IIRC a long time ago? Are there any problem with Tk 8.5? No I'm not noticing any. I'm using hg 1122, though. -- [a] signature.asc Description: Digital signature
[dwm] [dvtm] [PATCH] Fix compilation on Mac OS X
Signed-off-by: Rainer Müller [EMAIL PROTECTED] --- madtty.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/madtty.c b/madtty.c index dd5e26d..49a1f84 100644 --- a/madtty.c +++ b/madtty.c @@ -38,7 +38,7 @@ # include pty.h #elif defined(__FreeBSD__) # include libutil.h -#elif defined(__OpenBSD__) || defined(__NetBSD__) +#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) # include util.h #endif #include madtty.h -- 1.5.4.5