Re: [dwm] patch to store layouts per tagset

2008-07-13 Thread Henrik Holst
 Date: Tue, 08 Jul 2008 23:44:27 +0200
 From: Christoph Schied [EMAIL PROTECTED]
 Subject: Re: [dwm] patch to store layouts per tagset
 To: dynamic window manager dwm@suckless.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 
 Henrik Holst wrote:
 
  This seems like something really useful!
  Does this work together with stdin pipes? Does the PID change?
  
 
 
 the stdin pipe and the PID will remain.
 
 
 

I have compiled a new version of dwm and want to replace
to and then reload it. Is that possible? I get this error:
cp: cannot create regular file `/home/holst/bin/dwm': Text file busy

--
Henrik Holst, Sweden  | TYPING IS NO SUBSTITUTE FOR THINKING
holst CHR(64) matmech.com | - A Manual for BASIC,
  |   Darthmouth College, 1 October 1964



Re: [dwm] patch to store layouts per tagset

2008-07-13 Thread Christoph Schied



I have compiled a new version of dwm and want to replace
to and then reload it. Is that possible? I get this error:
cp: cannot create regular file `/home/holst/bin/dwm': Text file busy



you need to use mv, or delete the dwm binary first



Re: [dwm] patch to store layouts per tagset

2008-07-09 Thread Christoph Schied

thanks for this drawbar method, i'm using it right now :)



Re: [dwm] patch to store layouts per tagset

2008-07-08 Thread Henrik Holst
 Date: Mon, 07 Jul 2008 14:12:23 +0200
 From: Christoph Schied [EMAIL PROTECTED]
 Subject: [dwm] patch to store layouts per tagset
 To: dwm@suckless.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 
 Hi!
 
 
 http://caustic.ath.cx/~caustic/tagsave.patch
 http://caustic.ath.cx/~caustic/config.h
 
 screenshot:
 http://caustic.ath.cx/~caustic/2008-07-05-163410_1024x768_scrot.png
 
 this patch against current hg will add the following features:
 
Snip!
 - sending signal USR_1 to dwm lets dwm reexec its binary, so you can 
 update dwm without restarting X

This seems like something really useful!
Does this work together with stdin pipes? Does the PID change?

-- 
Henrik Holst, Sweden  | TYPING IS NO SUBSTITUTE FOR THINKING
holst CHR(64) matmech.com | - A Manual for BASIC,
  |   Darthmouth College, 1 October 1964



Re: [dwm] patch to store layouts per tagset

2008-07-08 Thread Christoph Schied

Henrik Holst wrote:


This seems like something really useful!
Does this work together with stdin pipes? Does the PID change?




the stdin pipe and the PID will remain.



Re: [dwm] patch to store layouts per tagset

2008-07-08 Thread Donald Chai
- shows all windownames in the statusbar (this is nice for the  
maximized layout, as you wouldnt see there are multiple windows on  
that tag otherweise). that stuff is a little bit messy, id like to  
see suggestions how to make that better. it uses a defined maximum  
length for the title, and if the length of all windownames gets too  
long, the title will not be drawn.



IMHO, it looks like most of the messiness is due to the 1px  
separators: the code is much cleaner without them. The version below  
omits them, and divides the available space if the length of all  
windownames gets too long.


If you really like the 1px separators, maybe you should draw a big  
box before anything else, and add

dc.x++
wherever you want one?

void
drawbar(void) {
int i, x;
Client *c;

dc.x = 0;
for(i = 0; i  LENGTH(tags); i++) {
dc.w = TEXTW(tags[i]);
if(tagset[seltags]  1  i)
drawtext(tags[i], dc.norm, True);
else if(isurgent(i))
drawtext(tags[i], dc.sel, False);
else
continue;
dc.x += dc.w;
}
if(blw  0) {
dc.w = blw;
drawtext(lt[sellt]-symbol, dc.norm, issaved());
x = dc.x + dc.w;
}
else
x = dc.x;
dc.w = TEXTW(stext);
dc.x = ww - dc.w;
if(dc.x  x) {
dc.x = x;
dc.w = ww - x;
}
drawtext(stext, dc.norm, False);

if((dc.w = dc.x - x)  bh) {
int nvis = 0;
int cw   = 0;
int w;

dc.w = dc.x - x;
dc.x = x;
drawtext(NULL, dc.norm, False);
w = dc.w;

/* get the number of visible clients */
for(c = clients; c; c = c-next) {
if(ISVISIBLE(c)) {
nvis++;
cw += TEXTW(c-name);
}
}
for(c = clients; c; c = c-next) {
if(!ISVISIBLE(c))
continue;
dc.w = (cw  w) ? (w / nvis) : TEXTW(c-name);
drawtext(c-name, dc.norm, sel == c);
dc.x += dc.w;
}
}
XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, ww, bh, 0, 0);
XSync(dpy, False);
}




Re: [dwm] patch to store layouts per tagset

2008-07-08 Thread Alexander Polakov
* Christoph Schied [EMAIL PROTECTED] [080707 16:21]:
 - shows all windownames in the statusbar (this is nice for the maximized  
 layout, as you wouldnt see there are multiple windows on that tag  
 otherweise). that stuff is a little bit messy, id like to see  
 suggestions how to make that better. it uses a defined maximum length  
 for the title, and if the length of all windownames gets too long, the  
 title will not be drawn.

You can take a look at my old code [1] for this. It divides statusbar
into 'taskbar' and 'status' area, so status can be hidden. Taskbar
scales well for many windows. Here's a screenie [2].

[1] http://rootshell.be/~polachok/trash/dwm-ion-new-1004.tar.gz
[2] http://rootshell.be/~polachok/trash/dwmtabbed.png
-- 
Alexander Polakov | http://rootshell.be/~polachok/



[dwm] patch to store layouts per tagset

2008-07-07 Thread Christoph Schied

Hi!


http://caustic.ath.cx/~caustic/tagsave.patch
http://caustic.ath.cx/~caustic/config.h

screenshot:
http://caustic.ath.cx/~caustic/2008-07-05-163410_1024x768_scrot.png

this patch against current hg will add the following features:

- store the layout for a specific selection of tags. all tags tegsets 
that havent any stored settings will use a globallayout

- layoutcolors in the statusbar will be inverted when the tagset is saved
- define layout settings for specific tagselections in config.h
- shows all windownames in the statusbar (this is nice for the maximized 
layout, as you wouldnt see there are multiple windows on that tag 
otherweise). that stuff is a little bit messy, id like to see 
suggestions how to make that better. it uses a defined maximum length 
for the title, and if the length of all windownames gets too long, the 
title will not be drawn.
- sending signal USR_1 to dwm lets dwm reexec its binary, so you can 
update dwm without restarting X
- only the selected tags will be shown. if some tag recieves a highlight 
it will be shown too (in a different color)



i can seperate this to multiple patches if wanted :)