You are not logged in.

#951 2012-11-09 19:59:54

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

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

Unia wrote:

I have updated the whole Pango version, so it's exactly the same as what I use in the XFT version (except for that it uses Pango tongue)

That means, that the statuscolors patch is also (almost) the same. This makes me think the error is in the Pango patch and not in the statuscolors one. I have no idea where to look for it, though, as I found this Pango patch somewhere around the web. I don't even know if I had to modify it.

In case you (illusionist) or anyone else wants the new code to look for themselves, I have updated the Git repo.

Trying to make it work for 6 hours but failed every time. I am out of ideas now. Maybe you or someone else can come up with something. Seems like textnw, drawtext, drawcoloredtext are the problematic areas. Also second to last hunk in (pango) statuscolors patch could be modified by changing the xftcolors array.
I dont know anything other than that . My programming skills are very limited. I read the xlib description online just to understand what is going on in dwm.c . neutral

Now I am laughing on myself . big_smile

edit reason: typo

Last edited by illusionist (2012-11-09 20:02:20)


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

Offline

#952 2012-11-09 20:08:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

If you are looking for a clean statuscolours patch to apply against tip, use this:
https://pikacode.com/jasonwryan/dwm-pat … tuscolours


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#953 2012-11-09 20:17:16

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

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

^ ^Seems like you and me are on the same level, then tongue I have honestly no idea what's wrong, but I assume it's somewhere in the mix of XFT colors and regular colors..

EDIT: @ jason, didn't mine work? https://github.com/Unia/DWM-XFT/blob/ma … 0-xft.diff

Last edited by Unia (2012-11-09 20:19:27)


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

#954 2012-11-09 20:19:00

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

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

jasonwryan wrote:

If you are looking for a clean statuscolours patch to apply against tip, use this:
https://pikacode.com/jasonwryan/dwm-pat … tuscolours

It looks like this patch is for xft. Actually I am trying to patch dwm 6.0 with pango and statuscolors. Patching works fine but I am not able to get more than 2 colors working.


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

Offline

#955 2012-11-09 20:19:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

Your patch is number 5 in your queue, and it seems to include remnants of other patches in it: I didn't look into what they are or do, just removed all the extraneous stuff and applied it against tip to create the diff.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#956 2012-11-09 20:21:22

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

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

jasonwryan wrote:

Your patch is number 5 in your queue, and it seems to include remnants of other patches in it: I didn't look into what they are or do, just removed all the extraneous stuff and applied it against tip to create the diff.

Ah, obvious. I also linked to my XFT patch, what am I doing? neutral


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

#957 2012-11-09 20:21:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

illusionist wrote:
jasonwryan wrote:

If you are looking for a clean statuscolours patch to apply against tip, use this:
https://pikacode.com/jasonwryan/dwm-pat … tuscolours

It looks like this patch is for xft. Actually I am trying to patch dwm 6.0 with pango and statuscolors. Patching works fine but I am not able to get more than 2 colors working.

Oh, I hadn't been able to follow your part of the thread. Why not just use that patch against tip: forget pango, it is obsolete...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#958 2012-11-09 20:25:33

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

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

jasonwryan wrote:

forget pango, it is obsolete...

It is? Could you elaborate, or give a link?


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

#959 2012-11-09 20:27:22

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

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

Unia wrote:

^ ^Seems like you and me are on the same level, then tongue I have honestly no idea what's wrong, but I assume it's somewhere in the mix of XFT colors and regular colors..

EDIT: @ jason, didn't mine work? https://github.com/Unia/DWM-XFT/blob/ma … 0-xft.diff

AFAIK the problem is in statuscolors patch . I'll try to merge (xft) statuscolors with pango one. That means I need to learn about pango.h . hmm
My mind is f*d right now. Can not think of anything else.

Last edited by illusionist (2012-11-09 20:29:37)


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

Offline

#960 2012-11-09 20:27:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

I should have been clearer: in the context of dwm. Now that Xft is included, the pango patch is obsolete...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#961 2012-11-09 20:31:16

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

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

jasonwryan wrote:

I should have been clearer: in the context of dwm. Now that Xft is included, the pango patch is obsolete...

Yea, once 6.1 comes out it's a whole different story. I guess I will remove my GitHub repo on Pango then. To be honest I never understood (nor looked into) the difference between XFT and Pango.


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

#962 2012-11-09 20:33:27

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

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

jasonwryan wrote:

Oh, I hadn't been able to follow your part of the thread. Why not just use that patch against tip: forget pango, it is obsolete...

Actually my native language is only supported by pango so xft is not useful for me.


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

Offline

#963 2012-11-09 21:05:05

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

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

illusionist wrote:
jasonwryan wrote:

Oh, I hadn't been able to follow your part of the thread. Why not just use that patch against tip: forget pango, it is obsolete...

Actually my native language is only supported by pango so xft is not useful for me.

I'm about to delete the Pango repo from my GitHub. I just want to make sure you have a copy. Do you? smile


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

#964 2012-11-09 21:12:38

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

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

Let me clone it .

EDIT: Cloned ! ... Go ahead .

Last edited by illusionist (2012-11-09 21:14:40)


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

Offline

#965 2012-11-09 22:00:43

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

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

illusionist wrote:

Let me clone it .

EDIT: Cloned ! ... Go ahead .

big_smile Good luck on getting it to work. You're free to send me an email if you want to figure it out together wink


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

#966 2012-11-09 22:12:53

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

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

Pranavg1890 wrote:

Hi Friends, can anyone give me a patch for cyclic selection of windows in tiling mode for dwm 6.0 ? I tried googling but most of the links are dead or the patch is for older versions of dwm.

I was just reading the mailing list when I came across this post:

http://lists.suckless.org/dev/1211/13219.html

Perhaps it's what you're looking for.

EDIT: I just skimmed through the ML, but I didn't see anything on DWM 6.1. Does Suckless do the "when it's ready"-schedule, or am I missing something?

Also, since DWM now comes with XFT by default; does anyone know if Dmenu will too?

Last edited by Unia (2012-11-09 22:18:08)


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

#967 2012-11-09 22:50:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

Unia wrote:

EDIT: I just skimmed through the ML, but I didn't see anything on DWM 6.1. Does Suckless do the "when it's ready"-schedule, or am I missing something?

Also, since DWM now comes with XFT by default; does anyone know if Dmenu will too?

Yes; generally Anselm will post to the list that he is preparing a new release. As a lot of people just use tip, it is not such a big deal.

Re. dmenu: I would imagine it is only a matter of time...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#968 2012-11-09 23:11:10

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

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

Yea I also just switched to tip smile thanks for clearing this up Jason!


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

#969 2012-11-10 01:35:38

mjheagle8
Member
From: /home/mjheagle8
Registered: 2009-07-12
Posts: 186

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

Pranavg1890 wrote:

Hi friends, the links are as follows:

https://bitbucket.org/jasonwryan/workst … at=default

https://github.com/mjheagle8/dwm/blob/m … cycle.diff

I don't know if these are the only one's that provide me the required functionality. (I just did a google search and nothing else). also, the link given for cycle at very first post of thread is dead.

I was going to say, one of those links is my github and im using 6.0 smile

but jasonwryan beat me to it

Last edited by mjheagle8 (2012-11-10 01:35:47)


Desktop/Laptop - DWM :: VM - screen
Registered Linux User Number 483137 :: Victory! :: GitHub

Offline

#970 2012-11-10 12:22:24

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

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

Unia wrote:
illusionist wrote:

Let me clone it .

EDIT: Cloned ! ... Go ahead .

big_smile Good luck on getting it to work. You're free to send me an email if you want to figure it out together wink

Sure..!
I think I am getting somewhere. I'll let you know. smile


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

Offline

#971 2012-11-11 09:25:27

la11111
Member
Registered: 2012-11-11
Posts: 11

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

hello all, first post! I'm glad to find this thread and that it's recently been updated. Seems like some of you understand the DWM source pretty well.

I'm having an issue with a patch I'm working on, and I wonder if someone here might have some insight.

It's status bar colors patch that lets you use ansi escape codes to specify colors in your status script rather than declaring a bunch of new ones in config.h and mucking around a bunch of color-related stuff in dwm.c - I'm having an minor issue though. The fix is probably simple.

what I do in the patch is - I parse the ansi escape codes out of the input text, then chop the text into blocks and output them one at a time using the colors specified in the escape sequence, using a slightly modified version of the drawtext function.

The issue is - the TEXTW macro doesn't seem to account for the padding that's added on whenever XDrawString is called. So each time you change the color, you get leading & trailing padding on that portion, which is not what I want (see screenshot below - I want the output to be identical to the plaintext output, only colorized, like you'd have in xterm.). But, I can't figure out how to specify this. Or if I should use a different Xlib function.

Here's a screenshot; this is the corner of the screen. The green/black is supposed to be a bar graph - I added the chars in so that you can see the padding issue. The date/time is getting pushed clear off the edge of the screen.

dwcolorstat_screenshot.png

type the following into xterm to see the difference:

python -c "print '\x1b[48;5;46m#\x1b[48;5;233m.....\x1b[0m'"

any suggestions? Thanks,
-la0x1f

Offline

#972 2012-11-11 09:56:28

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

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

Hello,
I modified the dwm-tip to work with pango and statuscolors. The colors issue is somewhat ( maybe completely ?) resolved. But now the text on my status bar is  not updating instead it is getting overridden with the new one.

Image:
http://ompldr.org/vZzhhNQ/bar.png

Patch:
https://github.com/nixmeal/dwm/blob/wor … patch.diff

I think these are the areas to look for (just a suggestion) "drawtext" "textnw" and "initfont" .
Any help would be appreciated .

Last edited by illusionist (2012-11-11 09:58:55)


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

Offline

#973 2012-11-11 10:38:34

la11111
Member
Registered: 2012-11-11
Posts: 11

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

illusionist - I'm not sure of the context of what you're trying to do, but - it's because you commented out XFillRectangle in your patch within the drawtext method ... the text doesn't get cleared after you draw it, so the next XDrawString just writes on top of it.

Offline

#974 2012-11-11 11:01:08

la11111
Member
Registered: 2012-11-11
Posts: 11

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

to post an update regarding my earlier question on the patch I'm writing: I've resolved the issue. Dumb me.

So it works now! woop!

dwmcoloredstatus_fixed.png

here I dumped a bunch of colors onto it as a test - nothing breaks! I think it's reasonably stable!

dwm_colors_test.png

I'm pretty stoked - I did this to brush up on my C, and I think it did the trick. I'm using dwm 5.9 right now, but I'll make some patches for the latest few versions and put them up on github.

Offline

#975 2012-11-11 11:08:55

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

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

la11111 wrote:

illusionist - I'm not sure of the context of what you're trying to do, but - it's because you commented out XFillRectangle in your patch within the drawtext method ... the text doesn't get cleared after you draw it, so the next XDrawString just writes on top of it.

Hey thank you man and welcome to the forum.
Actually the status colors patch was not working properly with pango (showing only 2 colors). And only pango works with my locale ( xft was not working).  Since the dwm tip ( dwm 6.1 )  is already patched with xft , I thought to use it with statuscolors and pango.

The mistake you pointed is working . Now the text is rendering clearly. But now there is some empty space on my bar , can you tell me what could that be.

Here is the image:
https://raw.github.com/nixmeal/pkgbuild/master/pic.png

Thank you.

Edit: nice work, does your patch needs statuscolors ? I think not.

Last edited by illusionist (2012-11-11 11:11:57)


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

Offline

Board footer

Powered by FluxBB