You are not logged in.

#1051 2012-12-23 12:21:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

hazeldf wrote:

one error that I have seen : "error on line bla..bla..bla"

Seriously?  If you want any help you need to actually give the error message.  Do you expect people to use a crystal ball to see what you have done wrong?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#1052 2012-12-23 12:56:48

hazeldf
Member
Registered: 2012-06-10
Posts: 10

Re: DWM Hackers Unite! Share (or request) dwm patches.

Trilby wrote:
hazeldf wrote:

one error that I have seen : "error on line bla..bla..bla"

Seriously?  If you want any help you need to actually give the error message.  Do you expect people to use a crystal ball to see what you have done wrong?

here is the screenshot smile http://i48.tinypic.com/2eq9o5t.png

Offline

#1053 2012-12-23 13:40:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

So ... what's in that screenshot doesn't even resemble the nonsensified version of the error message you presented earlier.

I suspect all the errors in that screenshot are from treating a pointer to a structure as a structure and using the 'dot' operator rather than the '->' operator.  Alternately some variable is declared as a pointer to a structure when it should just be the structure itself.  But I'm just guesing ... if the problem is not presented clearly, the solution certainly can't be.

Last edited by Trilby (2012-12-23 13:41:49)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#1054 2013-01-04 11:20:01

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: DWM Hackers Unite! Share (or request) dwm patches.

comment removed by Ivo

Last edited by ivoarch (2013-01-05 21:33:06)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#1055 2013-01-04 15:43:33

kuraku
Member
Registered: 2012-01-03
Posts: 202

Re: DWM Hackers Unite! Share (or request) dwm patches.

Can anybody take a look at this patch: http://ix.io/2kn/c

It is used to cycle trough workspaces that have 1 or more clients in it. It is used to emulate monsterwm ability to cycle only used workspaces but i have issues in it. If all tags are unused or if i have only one client on one tag and all other are empty,  it cycles first after used tag and one before used. I onther words:
i have only firefox and it is on 2nd tag. If i try to cycle trought used tags, it should not cycle anything because i have only firefox on one tag. At the moment, this patch is cycling 1st and 3rd tag too even tho i have only 2nd tag occupied. If i have more than 1 tag used, it is all okay.

Can somebody help me to remove part where 1st before and 1st tag after used are cycled?

p.s. I did my best to explain my problem neutral

Last edited by kuraku (2013-01-04 15:44:45)

Offline

#1056 2013-01-05 14:43:23

doug piston
Member
From: Seattle
Registered: 2011-09-11
Posts: 387
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Trying to add runorraise.c (from OK100's git) to my setup and having a small issue. I have added it and it works great on Firefox and Pcmanfm but any terminal application I open with a key binding fails to follow the rule. For instance Mutt will just open another instance of it in the correct tag. This is relevent part of my config for Mutt

snippet....
static const char *muttcmd[]       = { "urxvt", "-title", "mutt", "-e", "mutt", NULL };

....

  { MODKEY,                       XK_m,      runorraise,     {.v = muttcmd} },

Whole config.h and runorraise.c

I see Ivoarch did it another by just adding it to the dwm.c itself. Which I have tried yet because I think it is in my naming setup or maybe it just can't do terminal spawned apps. Any thoughts/suggestions/links for me to read?

Cheers.

Offline

#1057 2013-01-05 17:03:46

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: DWM Hackers Unite! Share (or request) dwm patches.

This patch can be used only with applications such as "Emacs", "XTerm", "URxvt", "XClock", "XLoad",  "Xmessage"...
applications with Class names >> WM_CLASS
 

{ "URxvt",  NULL,  NULL,  1  << 0,  False,  -1 }, 
 
static const char *termcmd[]  = { "urxvtc", NULL, "URxvt" };    
 
{ MODKEY,   XK_c,   runorraise,   {.v = termcmd } },  

Last edited by ivoarch (2013-01-05 17:56:46)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#1058 2013-01-06 00:15:38

doug piston
Member
From: Seattle
Registered: 2011-09-11
Posts: 387
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

I suppose that explains my issue. smile Thanks for that and the code to get what I have working.


Cheers.

Offline

#1059 2013-01-07 20:27:01

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: DWM Hackers Unite! Share (or request) dwm patches.

When I launch a fullscreen application that I have set to launch in another tag, it will appear in the current tag.
I have isolated the cause of this to resizeclient()'s

XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);

But if I surround the code in an if statement like so:

if (ISVISIBLE(c)) {
	XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
}

Then mplayer won't be large if it's started in a different tag from the one it's supposed to launch in. (although it does stay to its tag when launched)

I noticed that if I change tags and then back, that the fullscreen window won't still be there in the wrong tag - it will have properly moved to its right tag. So what I am doing now is in setfullscreen()'s in the fullscreen code, using the shiftview (nextprev improvement) patch:

Arg shifted;
shifted.i=1;
shiftview(&shifted);
shifted.i=-1;
shiftview(&shifted);

The visual glitch of quickly switching is a little annoying though.
Can someone think of a more elegant solution?
Just calling restack doesn't work.

[edit]Edit: practically fixed by applying that same if statement to the shiftview stuff. That way there's only a visual glitch in rare cases[/edit]

Last edited by Procyon (2013-01-28 16:24:55)

Offline

#1060 2013-01-17 18:49:40

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: DWM Hackers Unite! Share (or request) dwm patches.

Can anyone point me toward the DWM hg development branch/commit, as mentioned here?  I'd like to try out the native Xft support, but the current git master branch still doesn't contain the dual-draw.c implementation.  Thanks.

EDIT: Clarified my language.

Last edited by ANOKNUSA (2013-01-17 18:52:02)

Offline

#1061 2013-01-17 18:51:34

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

ANOKNUSA wrote:

Can anyone point me toward the DWM mercurial development branch, as mentioned here?  I'd like to try out the native Xft support, but the current git master branch still doesn't contain the dual-draw.c implementation.  Thanks.

They've changed to Git, and the XFT implementation has been reverted (at least for now).

http://git.suckless.org/dwm

However, on my GitHub, in the DWM-XFT repo, you can find the exact same patch that was used.


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

#1062 2013-01-17 18:52:54

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: DWM Hackers Unite! Share (or request) dwm patches.

Should that be applied against the current git pull, then, or 6.0?

Offline

#1063 2013-01-17 18:54:15

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

^ 6.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

#1064 2013-01-17 18:55:20

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: DWM Hackers Unite! Share (or request) dwm patches.

Thanks, I'll give that a shot.

Offline

#1065 2013-01-27 21:41:52

synorgy
Member
From: $HOME
Registered: 2005-07-11
Posts: 272
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Some of you may have seen this patch on the suckless ml, but I wanted to make sure it was seen here too.

I've spent a couple of days working on a patch that allows toggling between normfg and selfg in the status bar. This (obviously) only allows two colors to be used in the status bar, which is significantly more limited than, say, ansistatus or statuscolorsm but it also makes really minimal changes to the code. I've added one function and changed the call to drawtext() for the status bar into a call for my new function. It also adds one constant in config.{def.,}h for the (somewhat poortly named) invert_delimecharter, which defines which character to use for switching between the sel/normfg.

http://ix.io/49L
The patch is against current HEAD, so it might take a bit of finagling to get working with 6.0.


"Unix is basically a simple operating system, but you have to be a genius to understand the simplicity." (Dennis Ritchie)

Offline

#1066 2013-01-28 20:49:55

KaiSforza
Member
Registered: 2012-04-22
Posts: 133
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

So I've seen a lot of people here patching dwm so that it can restart in place and everything, but I've yet to apply a patch for that and I can do it without any issues using systemd --user.

I wrote a good chunk of this guide, and if you get it all running (having systemd manage your whole X session), then you can create a keybind that calls `systemctl --user restart dwm.service` and it'll restart while keeping your windows intact. In my opinion, it's a lot cleaner than having a loop going in your .xinitrc.

I hope this helps someone!


Thinkpad T420 | Intel 3000 | systemd {,--user}
PKGBUILDs I use | pywer AUR helper

Offline

#1067 2013-01-29 07:48:00

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: DWM Hackers Unite! Share (or request) dwm patches.

KaiSforza wrote:

So I've seen a lot of people here patching dwm so that it can restart in place and everything, but I've yet to apply a patch for that and I can do it without any issues using systemd --user.

I wrote a good chunk of this guide, and if you get it all running (having systemd manage your whole X session), then you can create a keybind that calls `systemctl --user restart dwm.service` and it'll restart while keeping your windows intact. In my opinion, it's a lot cleaner than having a loop going in your .xinitrc.

I hope this helps someone!

Do you start systemd --user with auto-login? Following this guide, I set everything up, but every boot stucks at "Reached target graphical"

Offline

#1068 2013-01-29 08:25:44

KaiSforza
Member
Registered: 2012-04-22
Posts: 133
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

OK100 wrote:

Do you start systemd --user with auto-login? Following this guide, I set everything up, but every boot stucks at "Reached target graphical"

Yeah. I do just that. You can check out my git repo to see the ordering I have. Also, make sure any dm's or other systemd --system services that could conflict are disabled. Also, what version of systemd do you have, and did you disable getty@tty1.service?


Thinkpad T420 | Intel 3000 | systemd {,--user}
PKGBUILDs I use | pywer AUR helper

Offline

#1069 2013-01-29 18:05:39

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: DWM Hackers Unite! Share (or request) dwm patches.

KaiSforza wrote:
OK100 wrote:

Do you start systemd --user with auto-login? Following this guide, I set everything up, but every boot stucks at "Reached target graphical"

Yeah. I do just that. You can check out my git repo to see the ordering I have. Also, make sure any dm's or other systemd --system services that could conflict are disabled. Also, what version of systemd do you have, and did you disable getty@tty1.service?

I'm using linux-ck kernel with BFS scheduler which does not implement CGROUPS. After commenting these two lines in user-session@.service it works as expected:

#ControlGroup=%R/user/%I/shared cpu:/ memory:/
#ControlGroupModify=yes

Is it safe to do that?

Last edited by OK100 (2013-01-29 18:06:09)

Offline

#1070 2013-01-30 09:21:43

KaiSforza
Member
Registered: 2012-04-22
Posts: 133
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

OK100 wrote:

I'm using linux-ck kernel with BFS scheduler which does not implement CGROUPS. After commenting these two lines in user-session@.service it works as expected:

#ControlGroup=%R/user/%I/shared cpu:/ memory:/
#ControlGroupModify=yes

Is it safe to do that?

Are all of your cgroups disabled? It may just be the memory cgroup. Try commenting out  just the memory:/.


Thinkpad T420 | Intel 3000 | systemd {,--user}
PKGBUILDs I use | pywer AUR helper

Offline

#1071 2013-02-21 13:54:50

markoer
Member
Registered: 2010-12-15
Posts: 57

Re: DWM Hackers Unite! Share (or request) dwm patches.

I have a patch request if anyone have a time and good will 
I need to be able to show or hide clients which are on current tag, using some kind of toggle function.
I know this can be done, but don't know how could i accomplish this through c. maybe with some loop parsing through all visible clients on currentag and upon that use some EWMH atoms, or using XMoveWindow with passed arguments or for this purpose create some imaginary tag where all clients will be moved. also it cant hurt if position of clients is remebered before toggle function is activated.

purpose of this is conky, i want some info displayed on screen when hotkey is passed to dwm.

so to sumerize:
pressing C-A-h will hide all window on curtag(if there is client at all) and activate conky script which will be killed if i once again press C-A-h and revert to previusly visible clients on curtag.
conky script doesn't need to be activated with same hotkey.

note: maybe creating seperate c file would be easier.
What does it mean sel, selmon, sellt, where can i find some more info

thx

Last edited by markoer (2013-02-21 18:04:13)

Offline

#1072 2013-02-21 18:26:59

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: DWM Hackers Unite! Share (or request) dwm patches.

Take a look at my bgtag patch. It is not the same functionality as you asked for but sort of.


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#1073 2013-02-22 14:38:31

markoer
Member
Registered: 2010-12-15
Posts: 57

Re: DWM Hackers Unite! Share (or request) dwm patches.

that's close enough to my request. Backgorund tag is indeed useful for this purpose. Maybe you know how do I select or focus all clients in specified tag?
This need's some sort of for loop with array of clients. With that I can easly move clients from curtag to background tag, but i am not magician nor C expert, All I have is basic level of C knowladge.

Offline

#1074 2013-02-22 16:45:02

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Anybody know how to remove the space at the far right of the statusbar? I'm using a statuscolors patch but even by default with no patch there is a space there and it annoys me!

I'm trying to transition away from uselessgaps but it just makes this space even more pronounced.

vaGp6OA


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#1075 2013-02-22 17:11:22

pks
Member
From: Germany
Registered: 2012-07-20
Posts: 110

Re: DWM Hackers Unite! Share (or request) dwm patches.

Meyithi wrote:

Anybody know how to remove the space at the far right of the statusbar? I'm using a statuscolors patch but even by default with no patch there is a space there and it annoys me!

I'm trying to transition away from uselessgaps but it just makes this space even more pronounced.

http://ompldr.org/vaGp6OA

You have to change following code in the drawbar(Monitor *m) function. Line numbers are most likely not the same as my version of dwm is customized quite a bit.

--- a/dwm.c
+++ b/dwm.c
@@ -757,7 +757,7 @@ drawbar(Monitor *m) {
         dc.x += dc.w;
     }
     x = dc.x;
-    dc.w = TEXTW(stext);
+    dc.w = TEXTW(stext) - dc.font.height;
     dc.x = m->ww - dc.w;
     if(dc.x < x) {
         dc.x = x;

Last edited by pks (2013-02-22 17:12:11)

Offline

Board footer

Powered by FluxBB