You are not logged in.
After I start Firefox, it takes 4 seconds before it shows up. Is there a way/patch to get some feedback (like the title bar showing "Starting Mozilla Firefox...")? Because otherwise I might think it doesn't start, and start a second instance.
Offline
ArchLinux, DWM does not have anything to do with that (nor would any window manager). That is entirely the responsibility of the application. DWM presents a window when firefox maps it. If firefox takes a long time to map a window, DWM has nothing to do. In fact, DWM wouldn't even know firefox is starting until the app maps a window.
One thing you could do if you really want something like this is write a wrapper for firefox that would create a temporary dialog (zenity or xdialog for example) fbefore starting firefox and close the dialog after a few seconds.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
One thing you could do if you really want something like this is write a wrapper ...that would create a temporary dialog (zenity or xdialog for example)
I really like your idea Trilby . Can you point me somewhere appropriate to look at ? (any documentation etc.)
I am not much of a coder.
Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github
Offline
I've never done this, it was just an idea. But if you change your keybinding from something like 'SHCMD("firefox")' to 'SHCMD("jumpstart firefox")' and create a script called jumpstart, it could contain something like the following:
#!/bin/bash
Xdialog --msgbox "Starting $1 ..." 100 100 &
$1 &
until pgrep $1; do sleep 0.25; done
killall Xdialog
This could be used to "jumpstart" any slow starting apps. It will NOT, of course, make them faster. But it will provide a quick dialog that will close once they start.
This seems a bit odd and ugly to me, but if you want such a thing, feel free to tweak it as desired.
Edit: sorry, you asked for documentation, not example... but the only real documentation I could suggest is `man Xdialog` or `man zenity`
Edit2: OK, I realized the first version I posted here was absolutely useless - sorry if anyone tried it. This one too has a fatal flaw: I think pgrep will return true as soon as the firefox process starts, not waiting for the window to be ready. But it's a start. If nothing else, you could take out the pgrep loop and just sleep for a fixed time interval based on your estimate of how long it normally takes firefox to start up.
EDIT: turns out I think this is easier to do well in C. Check out Jumpstart on github. Jumpstart creates a "blank" window with the title "Loading <app> ..." until the command passed as a parameter loads a window. Then jumpstart exits and gets out of the way. This will only work if the application name is in the window name - but it does deal with capitalized titles ok.
Last edited by Trilby (2012-09-15 00:01:50)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Nice work Trilby , now I think I need to polish my "C" . You at least gave me a good base to start. Thanks...
Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github
Offline
@Trilby: Thanks! I will take a look at Jumpstart. I thought there might be a patch for dwm, to do just that (because it seems simple).
Offline
A bit of request if anyone could ( Trilby gave a hint at it a few pages back ), I still haven't been able to get it to work, as I am still really new to all of this.
But I just wanted to know if anyone could help with adding a border to the bar. Should in theory be easy, but it seems to be over my head at this present point in time.
Registered Linux user #536591.
Offline
@Crunch
Try something like this
+void
+draw_border(unsigned long col[ColLast]) {
+ XGCValues gcv;
+ XRectangle r = {dc.x, dc.y, dc.w, 2 };
+ gcv.foreground = col[ColBorder];
+ XChangeGC(dpy, dc.gc, GCForeground, &gcv);
+ XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
void
drawbar(Monitor *m) {
drawtext(tags[i], col, urg & 1 << i);
+draw_border(col);
drawtext(m->ltsymbol, dc.norm, False);
+draw_border(col);
if(m == selmon) { /* status is only drawn on selected monitor */
dc.w = TEXTW(stext);
drawtext(stext, dc.norm, False);
+draw_border(col);
if(m->sel) {
col = m == selmon ? dc.sel : dc.norm;
drawtext(m->sel->name, col, False);
+draw_border(col);
Offline
Ooor .... Just add two lines to the end of drawbar():
drawsquare(m->sel->isfixed, m->sel->isfloating, col);
}
else
drawtext(NULL, dc.colors[0], False);
}
+ XSetForeground(dpy, dc.gc, dc.colors[0][ColBorder]);
+ XDrawRectangle(dpy,dc.drawable,dc.gc,0,0,m->ww-1,bh-1);
XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0);
XSync(dpy, False);
}
This is assuming you have the colorstatus patch (I'm not sure if a border would make sense without colors). But if you don't you can just change the 3rd parameter to XSetForeground to an appropriate color.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Doh! Seems so easy now...
Thanks Trilby!
Registered Linux user #536591.
Offline
does anyone here have a working status colors patch for 6.0? been looking though this thread and found one but the link is broken. thanks!
Offline
does anyone here have a working status colors patch for 6.0? been looking though this thread and found one but the link is broken. thanks!
I haven't tried it, but Unia has some dwm 6.0 patches: https://github.com/Unia/DWM
Offline
Yep, mine work. Watch the queu tho, if you want to apply in a different order you might have to hand patch them first.
EDIT: ah, I see statuscolors is the first in the queu, so it should work on a vanilla dwm.c
Last edited by Unia (2012-10-02 22:43:11)
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
JLloyd13 wrote:does anyone here have a working status colors patch for 6.0? been looking though this thread and found one but the link is broken. thanks!
I haven't tried it, but Unia has some dwm 6.0 patches: https://github.com/Unia/DWM
thanks!
Offline
Hi,
it is pretty hard going through these 34 pages of this thread...hence I want to ask if there is a patch like the "dwm-6.0-single_window_no_border.diff" which removes borders for every application being started. The mentioned patch is to find here and just removes the border of a single running client. Adding a second ,i.e. terminal, the border appears again and shows up this unlikely gap at the bottom of the screen.
Thanks,
L-K
Offline
Hi,
it is pretty hard going through these 34 pages of this thread...hence I want to ask if there is a patch like the "dwm-6.0-single_window_no_border.diff" which removes borders for every application being started. The mentioned patch is to find here and just removes the border of a single running client. Adding a second ,i.e. terminal, the border appears again and shows up this unlikely gap at the bottom of the screen.
Thanks,
L-K
Can't you set border width to 0?
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
ok...how ? should this be like
static const unsigned int border_width = 0;
?
Offline
^ I guess..
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
nope, this has no visible effect. At the bottom there is still this stupid gap, which simply occupies expensive space of the display....any other idea ?
Offline
nope, this has no visible effect. At the bottom there is still this stupid gap, which simply occupies expensive space of the display....any other idea ?
If this happens (mostly) with terminal emulators, try setting this in config.h:
static const Bool resizehints = False; // True means respect size hints in tiled resizals
Last edited by Unia (2012-10-04 15:17:30)
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
brilliant :-) this works perfect. It is quite sad that the source code is not that much commented/explained. C is in general not the problem, but it is a big mess understanding all these variables and constants necessary to tinker a bit the dwm...
Offline
brilliant :-) this works perfect. It is quite sad that the source code is not that much commented/explained. C is in general not the problem, but it is a big mess understanding all these variables and constants necessary to tinker a bit the dwm...
Offline
Hello,
I am new to Linux and would like to know... If I want install windows manager (DWM, awesome, monsterwm ) do I need install xfce or kde also? or just windows manager dynamic?
Thanks
Offline
Just WM is fine.
Offline
Hi, is there any attachaside patch for 6.1? I only found one for 5.7 and 5.6( http://dwm.suckless.org/patches/attachaside )...
Offline