You are not logged in.

#426 2011-11-01 15:18:15

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

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

Anyone know, how to set (Russian-Bulgarian letters)(Cyrillic) on the panel?

Last edited by ivoarch (2011-11-01 15:22:23)


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

Offline

#427 2011-11-02 02:14:08

nqs
Member
Registered: 2011-10-31
Posts: 4

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

OK100 wrote:

@nqs
Or try fbpanel-dwm from AUR (https://aur.archlinux.org/packages.php?ID=34594).

Well, i got the original patch to compile, but it does nothing.

I hand patched this code (i'm on gentoo, not arch, and TBH, haven't even looked at how arch's package management system works, or even if it's compatible with my hardware), and got it to work, with one exception, it I set dwm bar to "top" and fbpanel to "top-right", it doesn't work.  does work in any other positioning of fb panel, and with the bar on bottom or top.  it just won't work in the configuration I desire.

as I said, i'm still pretty new to coding, and am unsure if this is a fbpanel or dwm problem.

NQS


These opinions are mine, mine I say! Piss off and get your own.

Offline

#428 2011-11-02 11:39:23

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

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

nqs wrote:
OK100 wrote:

@nqs
Or try fbpanel-dwm from AUR (https://aur.archlinux.org/packages.php?ID=34594).

Well, i got the original patch to compile, but it does nothing.

I hand patched this code (i'm on gentoo, not arch, and TBH, haven't even looked at how arch's package management system works, or even if it's compatible with my hardware), and got it to work, with one exception, it I set dwm bar to "top" and fbpanel to "top-right", it doesn't work.  does work in any other positioning of fb panel, and with the bar on bottom or top.  it just won't work in the configuration I desire.

as I said, i'm still pretty new to coding, and am unsure if this is a fbpanel or dwm problem.

NQS

Here is my fbpanel config:

Global {
    edge = top
    allign = right
    margin = 0
    widthtype = request
    width = 86
    height = 12
    transparent = true
    tintcolor = #0d131a
    alpha = 255
    setdocktype = true
    setpartialstrut = true
    autohide = false
    heightWhenHidden = 0
    roundcorners = false
    roundcornersradius = 7
    layer = above
    MaxElemHeight = 14
    setlayer = false
}
Plugin {
    type = tray
}

I have dwm bar on top, fbpanel on top right, with no problem.
Did you use this fbpanel source http://julienpecqueur.com/pkgs/fbpanel-dwm-6.1.tar.gz or from fbpanel's home page?

Last edited by OK100 (2011-11-02 11:43:18)

Offline

#429 2011-11-02 16:46:01

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

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

Is it possible to make leantagbar work together with the patch that only show active tags? The problem is this part:

active tag patch:

     dc.x = 0;
     for(i = 0; i < LENGTH(tags); i++) {
-        dc.w = TEXTW(tags[i]);
-        col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
-        drawtext(tags[i], col, urg & 1 << i);
-        drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
-                   occ & 1 << i, urg & 1 << i, col);
-        dc.x += dc.w;
+        if (ISTAGVISIBLE(m, occ, i)) {
+            dc.w = TEXTW(tags[i]);
+            col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
+            drawtext(tags[i], col, urg & 1 << i);
+            drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
+                       occ & 1 << i, urg & 1 << i, col);
+            dc.x += dc.w;
+        } 

leantagbar:

  }
  dc.x = 0;
  for(i = 0; i < LENGTH(tags); i++) {
- dc.w = TEXTW(tags[i]);
- col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
- drawtext(tags[i], col, urg & 1 << i);
- drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
- occ & 1 << i, urg & 1 << i, col);
+ col = (hasurgent = urg & 1 << i) ? dc.urg : dc.norm;
+ if(m->tagset[m->seltags] & 1 << i) {
+ snprintf(stag, sizeof stag, "[%s]", tags[i]);
+ dc.w = TEXTW(stag);
+ drawtext(stag, col, hasurgent);
+ }
+ else {
+ dc.w = TEXTW(tags[i]);
+ drawtext(tags[i], col, hasurgent);
+ }
  dc.x += dc.w;
  }

Thanks.

Offline

#430 2011-11-02 16:54:05

nqs
Member
Registered: 2011-10-31
Posts: 4

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

OK100 wrote:

Did you use this fbpanel source http://julienpecqueur.com/pkgs/fbpanel-dwm-6.1.tar.gz or from fbpanel's home page?

I had originally patched the version @ fbpanel's page, the other source compiled clean and works correct.

Also dwm works a lot better if one doesn't use ')' for '}'.  dunno why...

NQS


These opinions are mine, mine I say! Piss off and get your own.

Offline

#431 2011-11-02 16:58:26

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

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

kaptenen wrote:

Is it possible to make leantagbar work together with the patch that only show active tags?

I've been doing this for a long time.  Grab the patches from my gist: https://gist.github.com/1334192
My dwm bar looks like this.


This silver ladybug at line 28...

Offline

#432 2011-11-03 10:42:16

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

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

lolilolicon wrote:

How do you get colours in the right side of the bar? Using dzen or conky?

Offline

#433 2011-11-03 10:54:10

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

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

x33a wrote:
lolilolicon wrote:

How do you get colours in the right side of the bar? Using dzen or conky?

It's the colorstatus patch, pretty sure there're several working variants floating around.


This silver ladybug at line 28...

Offline

#434 2011-11-03 13:16:16

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

x33a wrote:
lolilolicon wrote:

How do you get colours in the right side of the bar? Using dzen or conky?

I asked this some posts ago

Offline

#435 2011-11-03 14:05:25

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

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

lolilolicon wrote:
x33a wrote:

How do you get colours in the right side of the bar? Using dzen or conky?

It's the colorstatus patch, pretty sure there're several working variants floating around.


Oh, i remember i am using this patch already tongue . Well i haven't messed around with my dwm config for a while, but now i remember i was having trouble getting it to work properly with conky. Will investigate around when i have the time.

Thanks.

Offline

#436 2011-11-04 08:51:33

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

The links ivoarch provided actually describe it very nicely. I could correct my conkyrc very quickly, so you'll be able as well smile

Offline

#437 2011-11-06 00:47:44

milso
Member
Registered: 2010-11-16
Posts: 112
Website

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

I haven't been through this entire thread, so forgive me if I over looked it, but is there a patch for dwm 5.9 that draws windows into the stacking area instead of making new windows master? The one on suckless.org is for older versions.

Offline

#438 2011-11-06 01:08:30

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

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

I have just tested it for you, and the attachaside patch on suckless.org works fine for vanilla dwm-5.9...

The dwm version number of a patch, is just the version is was made against and is guarentied to work with, but often it still works on later versions also and hence, there where no need to update them, so always try it out for yourself first...

Offline

#439 2011-11-06 03:43:03

milso
Member
Registered: 2010-11-16
Posts: 112
Website

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

Thanks, guess I could have tried it first but my first assumption was that it wouldn't work. Guess that's what happens when I assume.

Offline

#440 2011-11-06 16:32:08

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

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

I came up with a general approach to master-slave layouts.  You can find
the patch created against the current dwm hg tip here:

https://gist.github.com/1343109

Before reading the code, you may want to read a little background story.

About a week ago, I found that nmaster had been included in dwm hg tip,
used by the `tile' layout.  I read the code a bit and started to think
about the possibilities with the idea of having more than one master.
Later on, I mailed my idea to the suckless.org mailing list, along with a
quick patch I had just hacked up. You can read the thread here:

http://comments.gmane.org/gmane.comp.misc.suckless/7634

For you grasshoppers, the patch basically provides a way to combine two
arbitrary layouts into a single layout, one applied to the master area,
and the other applied to the slaves.  You can see in the code that once we
have two layout algorithms lt_stackh and lt_stackv, we can define layouts
such as tile, bstack, col and more (2 ** 2 * 4 + 2 = 18), each with a
single oneliner.  The possibilities are explosive.

There will be no change in the usage, except now mfact and nmaster is
specific both to monitor and layout.  This means any mfact/nmaster change
to one layout won't disturb another, which is obviously the only
reasonable thing to do when you have several different layouts that just
can't all look good with the same mfact or nmaster.  Also note master area
can be on the right or bottom, too, so changing mfact may feel a little
backwards in such layouts.

I personally am in love with my spiral layout.  It's just perfect.  When I
found that a 80-char wide terminal with a 11 pixel font in the slave area
on the left makes the master area on the right almost a squared rectangle,
It just feels perfect.  Indeed, my screen ratio is close to golden radio
(the dwm bar makes it even closer), with mfact = 0.618 I get a terminal
window exactly 80 characters wide, as well as a squared rectangle in which
I do the simple and fancy spiral.  It's beautiful, it's like something
I've always wanted falling into place.

And here's an early screenshot of spiral:

vYjVtMA

I'd like to see improvements on the idea and the code.  I also would like
to see you introduce new interesting layouts you invent and find useful to
me and everyone else.  This will be fun.


This silver ladybug at line 28...

Offline

#441 2011-11-06 17:32:29

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

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

@lolilolicon

Looks great!
Can work with bottomstack.patch and pertag?

Last edited by ivoarch (2011-11-06 17:37:22)


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

Offline

#442 2011-11-06 17:35:38

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

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

@ivoarch, I don't know; but my patch includes a bstack layout as an example layout. My patch supersedes many of the layouts wink


This silver ladybug at line 28...

Offline

#443 2011-11-06 17:36:15

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

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

lolilolicon wrote:

@ivoarch, I don't know; but my patch includes a bstack layout as an example layout. My patch supersedes many of the layouts wink

One patch to rule them all...

smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#444 2011-11-06 17:38:20

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

lolilolicon, that's very interesting!!!

Offline

#445 2011-11-06 17:40:40

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

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

Thanks, i will prove later.

Last edited by ivoarch (2011-11-06 17:41:30)


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

Offline

#446 2011-11-06 18:38:02

ozzem
Member
Registered: 2010-11-29
Posts: 14

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

lolilolicon wrote:

/me takes his chance for the golden seat;

leantagbar: http://github.com/lolilolicon/dwm/blob/ … agbar.diff

I wrote this for a "leaner" tag bar.

http://github.com/lolilolicon/dwm/raw/m … tagbar.png

In the screenshot above, the "[term]" shows how selected tags are surrounded by [], and the "code" tag shows how urgent tags are shown in urgent color. Note also that I removed the drawsquare(...) line so the little squares are gone.

This is leantagbar patch for dwm 5.7.2.

It tweaks the display of dwm bar -> tags section:
    * display selected tags as [tag] instead of in sel*color;
    * for urgent tags, it uses inverted urgent colors instead of just invert the sel*color; you need to add urg*color defs in config.h ;
    * as a bonus, urgent windows have urgbordercolor borders;
    * no tiny little squares, thanks;

Example color definitions in config.h:

static const char urgbordercolor[] = "#ff0066";
static const char urgbgcolor[] = "#ff0066";
static const char urgfgcolor[] = "#ffffff";

@simongmzlj
Kudos for opening this thread!
btw, you should put those to a more permanent place smile

Could you PLEASE tell me how you surrounded the tags with '[]' ?

Offline

#447 2011-11-06 19:24:54

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

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

@ozzem calm down man, why are you yelling?
You can do it like this, in the drawbar function:

diff -up a/dwm.c b/dwm.c
--- a/dwm.c	2011-11-06 19:20:02.921605779 +0000
+++ b/dwm.c	2011-11-06 19:21:20.181537652 +0000
@@ -724,6 +724,7 @@ dirtomon(int dir) {
 void
 drawbar(Monitor *m) {
 	int x;
+	char tagtext[32];
 	unsigned int i, occ = 0, urg = 0;
 	unsigned long *col;
 	Client *c;
@@ -735,9 +736,17 @@ drawbar(Monitor *m) {
 	}
 	dc.x = 0;
 	for(i = 0; i < LENGTH(tags); i++) {
-		dc.w = TEXTW(tags[i]);
-		col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
-		drawtext(tags[i], col, urg & 1 << i);
+		if(m->tagset[m->seltags] & 1 << i) {
+			snprintf(tagtext, sizeof tagtext, "[%s]", tags[i]);
+			col = dc.sel;
+			dc.w = TEXTW(tagtext);
+			drawtext(tagtext, col, urg & 1 << i);
+		}
+		else {
+			col = dc.norm;
+			dc.w = TEXTW(tags[i]);
+			drawtext(tags[i], col, urg & 1 << i);
+		}
 		drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
 		           occ & 1 << i, urg & 1 << i, col);
 		dc.x += dc.w;

This silver ladybug at line 28...

Offline

#448 2011-11-07 14:25:40

ozzem
Member
Registered: 2010-11-29
Posts: 14

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

Excuse the yelling, I tried it yesterday for some hours but with no good result.
But now it works, thank you!:-)

Offline

#449 2011-11-09 15:38:39

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

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

This is not a patch, but a trick that kind of blew my mind.

I was going to make a pertag variant, albeit I knew it's not conceptually
suited with the dwm tag.  What I want is to switch layout in the current
selected tag, and then when I temporarily view the previously selected
tag, I don't want it be rearranged by the new layout.  This is very
annoying when you switch back and forth repeatedly using Mod+Tab.  Then I
realized, there is a "><>" layout, a.k.a. float, a.k.a. "don't arrange my
windows, leave them alone!"  Yeah, I don't need pertag, I just need to
tell dwm to temporarily leave my windows alone smile


This silver ladybug at line 28...

Offline

#450 2011-11-12 14:07:47

lutherus
Member
From: Croatia;Varaždin
Registered: 2011-03-17
Posts: 150

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

i would like to have icons for tag names in dwm. i tried with fonts but it dosn`t work. any idea how to do that?


I`m not a nerd.I`m a level 55   dwarf monk-psychic ninja ;-)

my github

Offline

Board footer

Powered by FluxBB