[dwm] Re: displaydate patch for dwm 5.4
On Mon, 09 Feb 2009, bill lam wrote: while(running !XNextEvent(dpy, ev)) { + { + time_t t; + + t = time(NULL); + strftime(stext, sizeof stext - 1, %a %e %b, %I:%M%p, localtime(t)); + /* Depending on the implementation of strftime, stext might + * not be null terminated. */ + stext[sizeof stext - 1] = '\0'; + drawbar(); + } if(handler[ev.type]) (handler[ev.type])(ev); /* call handler */ } On further testing, this eats up a lot of cpu time, the following should be better, while(running !XNextEvent(dpy, ev)) { if(handler[ev.type]) { { time_t t; t = time(NULL); strftime(stext, sizeof stext - 1, %a %e %b, %I:%M%p, localtime(t)); /* Depending on the implementation of strftime, stext might * not be null terminated. */ stext[sizeof stext - 1] = '\0'; drawbar(); } (handler[ev.type])(ev); /* call handler */ } } -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 唐詩150 劉禹錫 蜀先主廟 天地英雄氣 千秋尚凜然 勢分三足鼎 業復五銖錢 得相能開國 生兒不象賢 淒涼蜀故妓 來舞魏宮前
Re: [dwm] Virtual keyboards
Hi Peter, 2009/2/9 Peter Hartlich sg...@hartlich.com: It appears to me that both the onscreen keyboard and the client with the input focus should have a selfg border -- at least that makes most sense in my opinion. But you need to be able to distinguish between dwm's _selected_ (for tagging, closing etc.) client and X's _focused_ client. Killing your terminal window on accident could be awful. What's wrong with focussing the next in the stack? Introducing another couple just for that sounds quite over-engineered to me. Agreed. What I would propose is the attached series of patches for hg import: The first renames focus() to selclient() and focusstack() to selstack(). The second adds a new focus() function calling XSetInputFocus() and saving the client in a global foc (analogue to sel) variable; it then implements isfocusable based on the Gottox port + selfgcolor border for focused, but unselected windows. Agreed, I'll apply your patches. By the way, your last commits have a...@null as the author? I will address this. I'm using a fresh host. Kind regards, --Anselm
Re: [dwm] Virtual keyboards
Hi Anselm, It appears to me that both the onscreen keyboard and the client with the input focus should have a selfg border -- at least that makes most sense in my opinion. But you need to be able to distinguish between dwm's _selected_ (for tagging, closing etc.) client and X's _focused_ client. What I meant was imagine you have an unselected but focused window (e.g. a vkbd) and an unfocused but selected other window (e.g. a terminal). If both get the same border, how would you know which one will close if you press Shift+Mod+c? (Except looking at the window title and guessing.) What's wrong with focussing the next in the stack? Instead of focusing the last focused window saved in foc, if I understand you right? Wouldn't that make using a virtual keyboard pretty hard? Regards, Peter
Re: [dwm] Bottom Stack Patch
Hi, Is there a patch to have pure horizontal tiling? Meaning: +--+ || +--+ || +--+ || +--+ Regards Thierry On Sun, Feb 8, 2009 at 10:29 AM, James Turner ja...@bsdgroup.org wrote: On Sun, Feb 08, 2009 at 10:25:41AM -0500, David Neu wrote: Hi, I was just about to download the bottom stack patch for dwm-5.4.1 from, http://www.suckless.org/dwm/patches/bottom_stack.html but noticed it's dated 20081217. Is this correct? Many thanks! Cheers, David Hello there, I create a new bottom stack patch against hg the minute something changes and tag it for the up coming release. It should apply fine to 5.4.1 as well but I havent tested it. Let me know if you have issues. -- James Turner BSD Group Consulting http://www.bsdgroup.org
Re: [dwm] Bottom Stack Patch
On Mon, Feb 09, 2009 at 02:01:03PM -0500, thierry beauquier wrote: Hi, Is there a patch to have pure horizontal tiling? Meaning: +--+ || +--+ || +--+ || +--+ Regards Thierry On Sun, Feb 8, 2009 at 10:29 AM, James Turner ja...@bsdgroup.org wrote: On Sun, Feb 08, 2009 at 10:25:41AM -0500, David Neu wrote: Hi, I was just about to download the bottom stack patch for dwm-5.4.1 from, http://www.suckless.org/dwm/patches/bottom_stack.html but noticed it's dated 20081217. Is this correct? Many thanks! Cheers, David Hello there, I create a new bottom stack patch against hg the minute something changes and tag it for the up coming release. It should apply fine to 5.4.1 as well but I havent tested it. Let me know if you have issues. -- James Turner BSD Group Consulting http://www.bsdgroup.org I believe the original bottom stack patch did support that, when I kind of took over keeping it up to date I dropped that support since I didn't use it. You might be able to find an older patch via google that still has the behavior and bring it up to date. -- James Turner BSD Group Consulting http://www.bsdgroup.org
Re: [dwm] Bottom Stack Patch
Do you remenber when it was and if it was the same patch's name?? This would help my googling :-) On Mon, Feb 9, 2009 at 2:04 PM, James Turner ja...@bsdgroup.org wrote: On Mon, Feb 09, 2009 at 02:01:03PM -0500, thierry beauquier wrote: Hi, Is there a patch to have pure horizontal tiling? Meaning: +--+ || +--+ || +--+ || +--+ Regards Thierry On Sun, Feb 8, 2009 at 10:29 AM, James Turner ja...@bsdgroup.org wrote: On Sun, Feb 08, 2009 at 10:25:41AM -0500, David Neu wrote: Hi, I was just about to download the bottom stack patch for dwm-5.4.1 from, http://www.suckless.org/dwm/patches/bottom_stack.html but noticed it's dated 20081217. Is this correct? Many thanks! Cheers, David Hello there, I create a new bottom stack patch against hg the minute something changes and tag it for the up coming release. It should apply fine to 5.4.1 as well but I havent tested it. Let me know if you have issues. -- James Turner BSD Group Consulting http://www.bsdgroup.org I believe the original bottom stack patch did support that, when I kind of took over keeping it up to date I dropped that support since I didn't use it. You might be able to find an older patch via google that still has the behavior and bring it up to date. -- James Turner BSD Group Consulting http://www.bsdgroup.org
[dwm] stdin to statusbar output removed?
Hello, I just downloaded dwm-5.4.1 and noticed that stdin-to-statusbar output mechanism was removed. Sadly, I don't seem to remember any discussion about that. Was there any? If not, what are the reasons for this removal? -- Evgeny
Re: [dwm] Bottom Stack Patch
Works perfectly well. Thanks again Thierry On Mon, Feb 9, 2009 at 2:50 PM, Jeremy Jay dinkuma...@gmail.com wrote: not incredibly difficult to modify the existing tile() function for this this isnt the most up-to-date version of dwm, but plop something similar to this into your config.h --- static void htile(void) { int y, h; unsigned int i, n; Client *c; for(n = 0, c = nexttiled(clients); c; c = nexttiled(c-next), n++); if(n == 0) return; /* tile stack */ y = wy; h = wh / n; if(h bh) h = wh; for(i = 0, c = nexttiled(clients); c; c = nexttiled(c-next), i++) { resize(c, wx, y, ww - 2 * c-bw, /* remainder */ ((i + 1 == n) ? wy + wh - y - 2 * c-bw : h - 2 * c-bw), resizehints); if(h != wh) y = c-y + HEIGHT(c); } } static Layout layouts[] = { /* symbol arrange function */ { []=, tile },/* first entry is default */ { ===, htile }, /* horizontal tile */ { , NULL },/* no layout function means floating behavior */ { [M], monocle }, }; - On Mon 09 Feb 2009 - 02:26PM, James Turner wrote: On Mon, Feb 09, 2009 at 02:19:05PM -0500, thierry beauquier wrote: Do you remenber when it was and if it was the same patch's name?? This would help my googling :-) On Mon, Feb 9, 2009 at 2:04 PM, James Turner ja...@bsdgroup.org wrote: On Mon, Feb 09, 2009 at 02:01:03PM -0500, thierry beauquier wrote: Hi, Is there a patch to have pure horizontal tiling? Meaning: +--+ || +--+ || +--+ || +--+ Regards Thierry On Sun, Feb 8, 2009 at 10:29 AM, James Turner ja...@bsdgroup.org wrote: On Sun, Feb 08, 2009 at 10:25:41AM -0500, David Neu wrote: Hi, I was just about to download the bottom stack patch for dwm-5.4.1 from, http://www.suckless.org/dwm/patches/bottom_stack.html but noticed it's dated 20081217. Is this correct? Many thanks! Cheers, David Hello there, I create a new bottom stack patch against hg the minute something changes and tag it for the up coming release. It should apply fine to 5.4.1 as well but I havent tested it. Let me know if you have issues. -- James Turner BSD Group Consulting http://www.bsdgroup.org I believe the original bottom stack patch did support that, when I kind of took over keeping it up to date I dropped that support since I didn't use it. You might be able to find an older patch via google that still has the behavior and bring it up to date. -- James Turner BSD Group Consulting http://www.bsdgroup.org I don't remember how many dwm's ago it was but the format should be the same as dwm-5.4-bstack.diff. Maybe look in the 3 or earlier 4 releases? -- James Turner BSD Group Consulting http://www.bsdgroup.org
Re: [dwm] stdin to statusbar output removed?
Evgeny Grablyk dixit (2009-02-09, 23:02): I just downloaded dwm-5.4.1 and noticed that stdin-to-statusbar output mechanism was removed. Sadly, I don't seem to remember any discussion about that. Was there any? If not, what are the reasons for this removal? Bumped into the same problem today. You set the status bar using the root windows title property now. xsetroot -title text -- [a] signature.asc Description: Digital signature
Re: [dwm] stdin to statusbar output removed?
Antoni Grzymala wrote: Evgeny Grablyk dixit (2009-02-09, 23:02): I just downloaded dwm-5.4.1 and noticed that stdin-to-statusbar output mechanism was removed. Sadly, I don't seem to remember any discussion about that. Was there any? If not, what are the reasons for this removal? Bumped into the same problem today. You set the status bar using the root windows title property now. xsetroot -title text Thanks for pointing that out. A little fix: it's '-name', not '-title'. -- Evgeny
Re: [dwm] stdin to statusbar output removed?
Evgeny Grablyk dixit (2009-02-09, 23:32): Antoni Grzymala wrote: Evgeny Grablyk dixit (2009-02-09, 23:02): I just downloaded dwm-5.4.1 and noticed that stdin-to-statusbar output mechanism was removed. Sadly, I don't seem to remember any discussion about that. Was there any? If not, what are the reasons for this removal? Bumped into the same problem today. You set the status bar using the root windows title property now. xsetroot -title text Thanks for pointing that out. A little fix: it's '-name', not '-title'. Right, sorry about that. -- [a] signature.asc Description: Digital signature
[dwm] Bottom-posting and reply trimming (was: Bottom Stack Patch)
Folks, May I suggest that you get into the habit of trimming your replies? This is more important for bottom-posting, where your reply goes after the quoted text. Scrolling up and down to follow the conversation in the Bottom Stack Patch thread was mildly annoying :) That's all, thanks for your attention. Neale
Re: [dwm] stdin to statusbar output removed?
Evgeny Grablyk evgeny.grab...@gmail.com writes: I just downloaded dwm-5.4.1 and noticed that stdin-to-statusbar output mechanism was removed. Sadly, I don't seem to remember any discussion about that. Was there any? Someone suggested the idea, I think in jest, and I was foolish enough to implement it. I've been running this way for quite ever since, and I've been pleased with how it works. Here's the thread about it: http://thread.gmane.org/gmane.comp.window-managers.dwm/6874 And here Anselm announces it's going in: http://thread.gmane.org/gmane.comp.window-managers.dwm/6924 Neale