You are not logged in.

#1 2010-08-14 18:34:57

512es
Member
Registered: 2010-08-14
Posts: 4

dwm trayer patch

Hi.
I am using dwm and trayer to provide a system tray.
I write a patch for dwm 5.8.2 to make it work with trayer or stalonetray.

Please, test it and give me freeback, updates and fixes.

Download the patch

and add it to config:

/* class        instance    title       tags mask     isfloating   monitor */
{ "trayer",        NULL,       NULL,    ~0,        True,    -1 },
{ "stalonetray",    NULL,       NULL,    ~0,        True,    -1 }

already working:

  1. hide from tags

  2. hide from cycle through visible windows

  3. do not focus mouse

  4. do not moving or resize whith mouse

  5. tags not shown then focusing mouse on trayer window

  6. active window border do not change when mouse on trayer window

  7. after close last window focus not move to trayer

known bugs:

  1. support only one panel window

  2. any bugs??

Last edited by 512es (2010-08-31 21:11:52)


А давайте руссифицируем интертет?!

Offline

#2 2010-08-14 19:25:06

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: dwm trayer patch

This would fit better in Community Contributions smile

*calls for a mod*

Offline

#3 2010-08-14 19:41:37

512es
Member
Registered: 2010-08-14
Posts: 4

Re: dwm trayer patch

itsbrad212 wrote:

This would fit better in Community Contributions smile

Yep, you a right)) but i can't move toptic..


А давайте руссифицируем интертет?!

Offline

#4 2010-08-14 19:43:51

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: dwm trayer patch

512es wrote:
itsbrad212 wrote:

This would fit better in Community Contributions smile

Yep, you a right)) but i can't move toptic..

Sadly neither can I. Nice work on this by the way. If I was still using dwm this would definitely come in handy! smile

Offline

#5 2010-08-14 21:20:16

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: dwm trayer patch

Moved.

itsbrad212 - the forum report function works as intended, so there is no need to *call for a mod*.

Offline

#6 2010-08-14 21:40:34

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: dwm trayer patch

tomk wrote:

Moved.

itsbrad212 - the forum report function works as intended, so there is no need to *call for a mod*.

Sorry about that. I reported it soon after I posted that smile

Last edited by itsbrad212 (2010-08-14 21:40:43)

Offline

#7 2010-08-14 23:35:31

512es
Member
Registered: 2010-08-14
Posts: 4

Re: dwm trayer patch

i think it done!)
trayer works perfectly which patched dwm!

trayer --widthtype request --align right --height 16 --transparent true --alpha 0 --tint 0x0B0B0B --margin 220 &

but stalonetray have a problem. it starts which wery big icons and i don't know how to fix it.


А давайте руссифицируем интертет?!

Offline

#8 2010-08-21 18:20:16

choogi
Member
Registered: 2009-10-06
Posts: 60

Re: dwm trayer patch

I'd like to try this patch but it keeps failing to apply for me.  When I execute "patch < systray.diff" I get the following:

Hunk #1 succeeded at 251 (offset -18 lines).
Hunk #2 FAILED at 313.
Hunk #3 FAILED at 690.
Hunk #4 FAILED at 820.
Hunk #5 FAILED at 871.
Hunk #6 FAILED at 958.
Hunk #7 FAILED at 1141.
Hunk #8 FAILED at 1212.
Hunk #9 FAILED at 1377.
Hunk #10 FAILED at 1588.
Hunk #11 FAILED at 1733.
10 out of 11 hunks FAILED -- saving rejects to file dwm.c.rej

I also have pertag, attachaside, and nmaster installed.  What is the correct way to apply this patch?

Last edited by choogi (2010-08-21 18:20:32)

Offline

#9 2010-08-31 14:01:46

bharani
Member
From: Karaikudi, India
Registered: 2009-07-12
Posts: 202

Re: dwm trayer patch

choogi wrote:

I'd like to try this patch but it keeps failing to apply for me.  When I execute "patch < systray.diff" I get the following:

Hunk #1 succeeded at 251 (offset -18 lines).
Hunk #2 FAILED at 313.
Hunk #3 FAILED at 690.
Hunk #4 FAILED at 820.
Hunk #5 FAILED at 871.
Hunk #6 FAILED at 958.
Hunk #7 FAILED at 1141.
Hunk #8 FAILED at 1212.
Hunk #9 FAILED at 1377.
Hunk #10 FAILED at 1588.
Hunk #11 FAILED at 1733.
10 out of 11 hunks FAILED -- saving rejects to file dwm.c.rej

I also have pertag, attachaside, and nmaster installed.  What is the correct way to apply this patch?

I tried to patch vanilla dwm but the patch fails for me too.
I ran

 patch < try.diff 

But it fails for 10 out of 11 hunks. (Same as the one quoted).
Am i missing something?


Tamil is my mother tongue.

Offline

#10 2010-08-31 21:13:22

512es
Member
Registered: 2010-08-14
Posts: 4

Re: dwm trayer patch

ok, it's a forum bug.

download patch here:
http://drm.su/dwm-5.8.2-trayer.patch


А давайте руссифицируем интертет?!

Offline

#11 2010-09-01 16:46:08

bharani
Member
From: Karaikudi, India
Registered: 2009-07-12
Posts: 202

Re: dwm trayer patch

512es wrote:

ok, it's a forum bug.

download patch here:
http://drm.su/dwm-5.8.2-trayer.patch

Thanks . It works well.


Tamil is my mother tongue.

Offline

#12 2010-10-01 04:50:39

Crisis
Member
Registered: 2009-04-04
Posts: 24

Re: dwm trayer patch

Hi, I need some help.
I applied the patch to a clean dwm config, and it works great. However:
Trayer seems to be sitting in the middle of my panel.
Here is what it looks like:
http://imgur.com/o4Zhd.jpg
I'm running dual monitors, my main monitor is on the right and trayer sits right in the middle of it, even though I've configured it to align right.
Here is how I'm starting trayer:

trayer --widthtype request --edge top --align right --height 16 --transparent true --alpha 0 --distancefrom right --distance 0 &

Can anyone help? Thanks!

Last edited by Crisis (2010-10-01 04:51:35)

Offline

#13 2010-10-15 03:24:42

triplc
Member
From: Hanoi, Vietnam
Registered: 2009-08-23
Posts: 34

Re: dwm trayer patch

Since the "unmovable panel" is a bit anoying (to me), I add the follows code to automatically move tha panel to the place next to the status notification area:

( in the function *drawbar* )

...
          if(m == selmon) { /* status is only drawn on selected monitor */
                  dc.w = TEXTW(stext);
                  dc.x = m->ww - dc.w;
                  if(dc.x < x) {
                          dc.x = x;
                          dc.w = m->ww - x;
                  }
                  drawtext(stext, dc.norm, False);
          }
          else
                  dc.x = m->ww;
        /* panel hack -- move the panel (if any) over here -- begins */
        if(panel && (m == panel->mon)) {
                if(m->topbar) {
                        if(panel->x != dc.x - panel->w || panel->y != m->my)
                                resizeclient(panel, dc.x - panel->w, m->my, panel->w, panel->h);
                } else {
                        if(panel->x != dc.x - panel->w || panel->y != m->mh - panel->h)
                                resizeclient(panel, dc.x - panel->w, m->mh - panel->h, panel->w, panel->h);
                }    
        }    
        /* ends */
          if((dc.w = dc.x - x) > bh) {
                  dc.x = x;
                  if(m->sel) {
                          col = m == selmon ? dc.sel : dc.norm;
                          drawtext(m->sel->name, col, False);
                          drawsquare(m->sel->isfixed, m->sel->isfloating, False, col);
                  }
                  else
                          drawtext(NULL, dc.norm, False);
          }
...

Last edited by triplc (2010-10-15 03:37:25)

Offline

Board footer

Powered by FluxBB