You are not logged in.
I'm also interested in borderlessness in dwm: but I'm looking for possibility to draw particular window (namely Mplayer) with no borders. How to achieve this?
Offline
I've fixed the problem with useless gap - here is my patch. This is my first time in the dwm code, but the problem was tile() recalculating the height of a window after resizing it, and thus placing the next one right bellow.
I'm not sure if this breaks something else, but if it does, it might be better to alter the HEIGHT macro itself.
I've managed to get consistent height gaps but please for the love of god can anybody help remove double gaps on width as per http://ompldr.org/vY2pvZw - It's driving me insane, 2 years it's been fine consistent gaps then all of a sudden inconsistent, and why is height fine but width fubar?
EDIT/ no matter, since I don't use nmaster (which is the culprit somehow) I just stripped all nmaster stuff away and used the old tile function, and it works!
http://ompldr.org/vY2sxYw
diff file -nmaster +uselessgaps +statuscolors http://codepad.org/9tVxrODt
Last edited by Meyithi (2012-01-31 19:18:08)
Offline
Guys, it is possible to center all the text in the status bar (as scrotwm for example)?
I have a huge space between the window name and the date. It could be good to gather tags, windows names, statusbar and have a more condensed infos.
Offline
LordLandon wrote:I've fixed the problem with useless gap - here is my patch. This is my first time in the dwm code, but the problem was tile() recalculating the height of a window after resizing it, and thus placing the next one right bellow.
I'm not sure if this breaks something else, but if it does, it might be better to alter the HEIGHT macro itself.
I've managed to get consistent height gaps but please for the love of god can anybody help remove double gaps on width as per http://ompldr.org/vY2pvZw - It's driving me insane, 2 years it's been fine consistent gaps then all of a sudden inconsistent, and why is height fine but width fubar?
EDIT/ no matter, since I don't use nmaster (which is the culprit somehow) I just stripped all nmaster stuff away and used the old tile function, and it works!
http://ompldr.org/vY2sxYwdiff file -nmaster +uselessgaps +statuscolors http://codepad.org/9tVxrODt
http://ompldr.org/vY2s2Mg/gaps.diff but it depends on pertag2 with bstack..
dont forget to add
static const unsigned int gappx = 4; /* gap pixel between windows */
to your config.h
and make also the layouts part look like this:
static const Layout layouts[] = {
/* symbol gaps arrange function */
{ "[T]", True, tile }, /* first entry is default */
{ "[F]", False, NULL }, /* no layout function means floating behavior */
{ "[M]", False, monocle },
{ "[b]", True, bstack },
};
have fun..
Arch64/DWM || My Dropbox referral link
Offline
Offline
So decided new year, new system, new WM! I've applied a few patches and so far I really like dwm. There is one thing that bothers me though, and that is how it handles dual screens. I've done some searching but come up short on answers. Is there a patch for having dwm handle dual screens more like XMonad, where a single tag shows on each screen, and both screens share 9 tags? I really don't need 18 tags ... and definitely need to move windows between tags/screens.
I saw this was asked in this thread back in 2010, but didn't see an answer. Sorry if this is like the most asked question or something.
#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.
Offline
2lifeafter2am
You can see how i've resolve this problem here: https://bitbucket.org/cf8/dwm/raw/feafb3446f6c/config.h
All i need is to "pin" tags to physical screens (first tag on screen0, the other on screen1), and here is what i've done:
Modify tagkeys like this:
#define TAGKEYS(KEY,TAG, MON) \
{ MODKEY, KEY, focusmon, {.i = MON } }, \
{ MODKEY|ShiftMask, KEY, tagmon, {.i = MON } }, \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
and hotkeys like this:
TAGKEYS( XK_1, 0, 0)
TAGKEYS( XK_2, 1, 1)
ah, and i've also aplied one patch from @guelfi for absolute monitor addressing
p.s mmm, its probably not what you've requested, but may be usefull for someone.
Last edited by cf8 (2012-02-01 04:47:04)
Offline
Hi guys, i use Dwm whit external-bar and multimon-bar patches from https://bitbucket.org/djpohly/dwm-patches/src
the current patch assumes the output is going to dzen2, more info about this: https://bitbucket.org/djpohly/dwm-patch … README.rst
The problem is how to output this in dzen2
void
drawbarnum(Monitor *m, unsigned int i) {
unsigned int occ = 0, urg = 0;
Client *c;
for(c = m->clients; c; c = c->next) {
occ |= c->tags;
if(c->isurgent)
urg |= c->tags;
}
printf("%d\n", i);
for(i = 0; i < LENGTH(tags); i++) {
if(m->tagset[m->seltags] & 1 << i) {
printf("^fg(%s)^bg(%s)", normbgcolor, normfgcolor);
if(m == selmon && selmon->sel && selmon->sel->tags & 1 << i)
printf("(%s)^bg()^fg()", tags[i]);
else
printf(" %s ^bg()^fg()", tags[i]);
} else if(occ & 1 << i) {
if(m == selmon && selmon->sel && selmon->sel->tags & 1 << i)
printf("(%s)", tags[i]);
else
printf(" %s ", tags[i]);
}
}
printf(" %s ", m->ltsymbol);
if(m->sel)
printf("^fg(%s)^bg(%s) %s ^bg()^fg()", normbgcolor, normfgcolor, m->sel->name);
printf("\n");
fflush(stdout);
}
I tried with this but not work for me
#!/bin/bash
tee >(sed -un 'N;s/^0\n//p' | dzen2 -xs 1 "$@") | sed -un 'N;s/^1\n//p' | dzen2 -xs 2 "$@"
any idea?
anyone know another way to make it?
Thanks!!!
Last edited by ivoarch (2012-02-03 16:41:42)
Offline
This is for those who use a multi-monitor setup, and want to use different tagnames on different monitors. It depends on pertag2, so apply that first and then apply 02-multitags.patch (this is a temporary location, so in future it may be available on my bitbucket, or not). The patch is hard coded so you'll have to use the same number of tags on all monitors, and if you want to change the numbers of tags, you'll have to change your config.h in something like this:
#define NUM_TAGS 9
static const Tag tags[][NUM_TAGS]
or simply
static const Tag tags[][9]
Have fun.
Arch64/DWM || My Dropbox referral link
Offline
Could one of you guys give me a hint how I can define the height of dwm's bar? The bar wastes some pixels (2 pixels above the text, 1 pixel below), which I'd like to have for my terminals (I get one extra line with these 3 pixels, not much, but better than nothing). I looked into the sources, but I can't find the piece which defines the height of the bar. Must be in either drawbar or drawtext, right?
Offline
Function setup, bh = dc.h = dc.font.height + 2.
Arch64/DWM || My Dropbox referral link
Offline
Ah crap, didn't see that, it's so obvious! Thanks JokerBoy!
Offline
Hello Archers
Here is my first patch EVER It adds a way of changing the height of the master top window . I searched a bit for a patch that did that for me, but I ended coding it myself.
(also, you need to define mhfact and some bind to setmhfact in config.h)
edit: screenshots here http://imgur.com/a/cM23y#0
Last edited by fd (2012-02-09 02:15:37)
Offline
Could you provide screenshots to demonstrate what the patch really does?
Offline
Could one of you guys give me a hint how I can define the height of dwm's bar? The bar wastes some pixels (2 pixels above the text, 1 pixel below), which I'd like to have for my terminals (I get one extra line with these 3 pixels, not much, but better than nothing). I looked into the sources, but I can't find the piece which defines the height of the bar. Must be in either drawbar or drawtext, right?
Also you can decrease internal border if you use urxvt:
urxvt.internalBorder: 1
Offline
I already have that set to zero. But thanks anyways for the hint!
Offline
OK100 - ok, iscentred added to rules.
patch: http://hg.punctweb.ro/dwm/src/0da6d857f … ating.diff
example to ignore gimp:
static const Rule rules[] = { /* class instance title tags mask isfloating iscentred monitor */ { "Gimp", NULL, NULL, 0, True, False, -1 }, };
Holy crap! How did I miss this? This is awesome, the amount of windowed apps I use (games, emulators) I've had to drag to the centre, solved!
Thanks JokerBoy.
Offline
Could you provide screenshots to demonstrate what the patch really does?
Sure!
Offline
Thanks! Now I get it! Pretty nice, I think I'll include into my patchset.
I again need a hint:
Where do I find the code pieces in dwm.c, which define, that floating clients are always on top? I don't like that, because this way it's impossible to use floating clients together with tiled clients with the same tag.
Offline
Why is it impossibe? Just untag the floating client when it's not needed.
Offline
I could do that, but it's really not very handy..
Offline
On a sidenote, I think the default keybindings for 'view' and 'toggleview' in dwm are backwards. I can't believe this is how it's intended to be (and I've been using dwm for 4+ years!). Pulling tags in and sending them out is far more useful than going to one, separate tag. Switching these bindings makes dwm much more enjoyable, IMO.
Offline
Holy crap! How did I miss this? This is awesome, the amount of windowed apps I use (games, emulators) I've had to drag to the centre, solved!
Thanks JokerBoy.
My pleasure.
fd - Nice idea @ mhfact..
Arch64/DWM || My Dropbox referral link
Offline
On a sidenote, I think the default keybindings for 'view' and 'toggleview' in dwm are backwards. I can't believe this is how it's intended to be (and I've been using dwm for 4+ years!). Pulling tags in and sending them out is far more useful than going to one, separate tag. Switching these bindings makes dwm much more enjoyable, IMO.
Agreed. If toggleview pulled the tag to master by default, it would be even better...
Offline
Thanks! Now I get it! Pretty nice, I think I'll include into my patchset.
fd - Nice idea @ mhfact..
I'm glad you liked it
There is room for improvements, setmhfact() and setmfact() should be the same function with an argument for modifying the width or height instead of being the same copypasted function haha, I was lazy
On a sidenote, I think the default keybindings for 'view' and 'toggleview' in dwm are backwards. I can't believe this is how it's intended to be (and I've been using dwm for 4+ years!). Pulling tags in and sending them out is far more useful than going to one, separate tag. Switching these bindings makes dwm much more enjoyable, IMO.
Cool! Swapped that bindings, I think its better too.
Also, it emphatizes more that tags are not workspaces (unless pertag)
Last edited by fd (2012-02-09 20:15:45)
Offline