You are not logged in.

#726 2012-04-24 16:14:20

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

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

I guess all you have to do is to adjust the values in the statuscolors patch?

Offline

#727 2012-04-24 16:52:23

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641
Website

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

w0ng wrote:

patch request: Is it possible to get >10 colours into the standard dwm statusbar (preferably 16-24)?

Yes, just increase the NUMCOLORS constant (MAXCOLORS also), and add more colors.. and then use more hexadecimal numbers \x00, ..., \x09, \x0A, \x0B, \x0C, \x0D, \x0E, \x0F, \x10, etc.

Last edited by JokerBoy (2012-04-24 16:52:46)

Offline

#728 2012-04-25 13:10:08

w0ng
Member
From: Australia
Registered: 2009-06-04
Posts: 88
Website

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

JokerBoy wrote:
w0ng wrote:

patch request: Is it possible to get >10 colours into the standard dwm statusbar (preferably 16-24)?

Yes, just increase the NUMCOLORS constant (MAXCOLORS also), and add more colors.. and then use more hexadecimal numbers \x00, ..., \x09, \x0A, \x0B, \x0C, \x0D, \x0E, \x0F, \x10, etc.

I tried doing this.
I'm using jasonwryan's statuscolors patch and dwm-6.0.
When making the change in config.h:

diff --git a/config.h b/config.h
index c097b05..f30a6dc 100644
--- a/config.h
+++ b/config.h
@@ -2,8 +2,8 @@
 
 /* appearance */
 static const char font[]            = "-*-terminus2-medium-r-*-*-12-*-*-*-*-*-*-*";
-#define NUMCOLORS 9 
-static const char colors[NUMCOLORS][ColLast][9] = {
+#define NUMCOLORS 10
+static const char colors[NUMCOLORS][ColLast][10] = {
   // border foreground background
   { "#073642", "#657b83", "#002b36" }, // 0 = normal (grey on black)
   { "#b58900", "#fdf6e3", "#002b36" }, // 1 = selected (white on black)
@@ -14,6 +14,7 @@ static const char colors[NUMCOLORS][ColLast][9] = {
   { "#073642", "#268bd2", "#002b36" }, // 6 = blue
   { "#073642", "#6c71c4", "#002b36" }, // 7 = magenta
   { "#073642", "#2aa198", "#002b36" }, // 8 = cyan
+  { "#073642", "#000000", "#002b36" }, // 9 = grey2
 };
 static const unsigned int borderpx  = 2;        /* border pixel of windows */
 static const unsigned int snap      = 32;       /* snap pixel */

It compiles fine, but breaks my topbar i.e.
When NUMCOLORS = 9 -> http://ompldr.org/vZGljOA
When NUMCOLORS = 10 -> http://ompldr.org/vZGljOQ

Last edited by w0ng (2012-04-25 13:12:37)

Offline

#729 2012-04-25 16:41:16

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641
Website

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

try

-#define NUMCOLORS 9
-static const char colors[NUMCOLORS][ColLast][9] = {
+#define NUMCOLORS 10
+static const char colors[NUMCOLORS][ColLast][8] = {

and define MAXCOLORS to 10 or a bigger number, from dwm.c

Offline

#730 2012-04-25 17:03:01

w0ng
Member
From: Australia
Registered: 2009-06-04
Posts: 88
Website

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

JokerBoy wrote:

try

-#define NUMCOLORS 9
-static const char colors[NUMCOLORS][ColLast][9] = {
+#define NUMCOLORS 10
+static const char colors[NUMCOLORS][ColLast][8] = {

and define MAXCOLORS to 10 or a bigger number, from dwm.c

thanks. MAXCOLORS in dwm.c did it.

Offline

#731 2012-05-02 03:45:22

a0x
Member
Registered: 2012-05-02
Posts: 3

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

Sorry if this has been asked already, but is there a patch for the statusbar so that it stays on one monitor and doesn't follow focus? I just want it to stay on my main monitor.

Offline

#732 2012-05-02 11:45:11

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,982
Website

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

RE: 10 or more colors.

I use 11 colors and ignore number 10, as so far I don't know how to put color 10 in my status bar.  The character \x0A is a line feed and breaks the string.  I suspect something similar might happen with \x0D.  Does this happen to others, or is there a better work around than adding an 11th color and ignoring number 10?


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#733 2012-05-02 12:19:42

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641
Website

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

a0x wrote:

Sorry if this has been asked already, but is there a patch for the statusbar so that it stays on one monitor and doesn't follow focus? I just want it to stay on my main monitor.

http://hg.punctweb.ro/dwm/raw/e13cd33fb … usmon.diff

and add this to your config.h

static const unsigned int statusmon = 0;        /* On which monitor should the status appear */"

statusmon is the monitor number, starting with 0 (mon 1 = 0, mon 2 = 1, etc).

Offline

#734 2012-05-02 14:31:59

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

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

I had already posted about this in another thread but as it mainly concerns dwm afiak, so I'll post it here too. I made a new font that just contains "icons". It uses the Unicode Private Use area (U+E000 - U+F8FF). It's called stlarch_font and it's in the AUR as well. It's 8x13 and the glyphs are mostly around 8x8 size, so it should go well with many fonts. It should basically work like xbm icons. The way this is done is by defining two fonts in config.h, like this:

static const char font[]            = "-*-stlarch-medium-r-*-*-13-*-*-*-*-*-*-*" "," "-*-terminus-medium-r-*-*-12-*-*-*-*-*-*-*";

   You can then do something like

echo -e '\uE015'

for example and copy the output into a script. It appears as a box in urxvt to me, but go ahead and copy it and it should work and display the correct glyph. This example will display a clock glyph. Here's a screenshot showing all the glyphs so far. I will probably add more soon.
tZGxmaw
This is a better solution than using a font with icons drawn in, as it wont conflict this way if that has been a problem for you. BTW, if anyone knows how to make this work in snapwm (or elsewhere), please let me know. Cheers

edit: Much thanks to sunaku for figuring all of this out. Thanks dude!

Last edited by stlarch (2012-05-02 14:47:04)

Offline

#735 2012-05-02 19:10:37

a0x
Member
Registered: 2012-05-02
Posts: 3

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

JokerBoy wrote:
a0x wrote:

Sorry if this has been asked already, but is there a patch for the statusbar so that it stays on one monitor and doesn't follow focus? I just want it to stay on my main monitor.

http://hg.punctweb.ro/dwm/raw/e13cd33fb … usmon.diff

and add this to your config.h

static const unsigned int statusmon = 0;        /* On which monitor should the status appear */"

statusmon is the monitor number, starting with 0 (mon 1 = 0, mon 2 = 1, etc).

Thanks! The diff didn't quite work for me, but that was probably because of a different patch I applied. I did it manually, works fine.

I also use a systray patch, and it seems the tray still follows focus, while the status stays put. I might try to make a patch that incorporates this one and the systray, so they both stay put. I'll post it here if I get it to work.

Offline

#736 2012-05-03 03:48:42

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

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

I updated stlarch_font and made it 8x10 because it put a little too much space at the top of the bar for smaller fonts (11). So you'll have to change it to something like

-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*

The icons are in the same positions as before.

The full name is

-misc-stlarch-medium-r-normal-*-10-100-75-75-c-80-iso10646-1

Last edited by stlarch (2012-05-03 05:41:19)

Offline

#737 2012-05-06 18:34:50

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,472
Website

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

Hey all,

A while ago I have requested to adjust the chat-layout patch for when I have multiple clients running (emesene and Skype). The layout works as follows: place the buddy list on the right of the screen and divide the remaining space over the chat clients in a grid layout. However, I make use of both emesene and Skype and when Skype is running, I would like a similar placement for the Skype buddy list: I wanted to divide the right space of the emesene buddy list in two and place both emesene's and Skype's lists there. Since no-one replied I guess it's not possible (or too much work) so I have been using the patch as is and close either one of the buddy lists. I do want to fix this and because there are no more issues to resolve (yay!:P) I'm focusing on this one now.

So, the standard chat-layout patch has the following layout:

+-----+-----+--+ // Layout 0
|     |     |  |
+-----+-----+  |
|     |     |  |
+-----+-----+--+

In an older post, I asked if it could be made so that when one has multiple clients running, their buddy lists would be split across the right "space", as such:

+-----+-----+--+ // Layout 1
|     |     |  |
+-----+-----+--+
|     |     |  |
+-----+-----+--+

No-one replied there, so as I said I guess this is either not possible or too hard to code. My new request is the following layouts:

+----+----+--+--+ // Layout 2
|    |    |  |  |
+----+----+  |  |
|    |    |  |  |
+----+----+--+--+

Please note that if you hadn't seen my previous request, I prefer layout 1 over layout 2. Also, if no second messenger is running, I would like to have layout 0. Here's my current chat-layout patch: http://pastebin.com/qcLi3bX3

EDIT: I will try to have a go at this myself, but chances are small (probably <1% tongue) so if any of you feel like coding something, please help me out big_smile
EDIT2: If you don't have the time to have a go at this (which I perfectly understand! It's a mere request after all) could you at least give me some pointers as to what I have to do? I have just started learning C so I can read the basic syntax and come up with something, but taking this up from scratch is a too big step for me.

Last edited by Unia (2012-05-06 18:46:43)


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

#738 2012-05-07 16:45:56

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,472
Website

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

No-one? Now I drew all those fancy layouts for nothing tongue

All jokes aside, I guess I'll have to take this as a long term project following up on my progress on learning C. I noticed that OK100 is using a different approach (see: https://github.com/ok100/dwm/blob/master/im-grid.c )

If I were to work on this myself, which file would be easier to base it upon; my patch of OK100's im-grid.c?


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

#739 2012-05-08 17:44:27

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,472
Website

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

Oke scratch that last request, it's become my personal computing goal for summer tongue

I have another question though: is there a patch that sets monocle layout automatically when there is only one client running, and then switches to the defined layout from pertag2 when there's more than one?


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

#740 2012-05-08 18:05:34

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

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

Unia wrote:

Oke scratch that last request, it's become my personal computing goal for summer tongue

I have another question though: is there a patch that sets monocle layout automatically when there is only one client running, and then switches to the defined layout from pertag2 when there's more than one?

Why do you want this? I there's only one client, t doesn't matter what layout is set.

Offline

#741 2012-05-08 18:14:01

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,472
Website

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

OK100 wrote:
Unia wrote:

Oke scratch that last request, it's become my personal computing goal for summer tongue

I have another question though: is there a patch that sets monocle layout automatically when there is only one client running, and then switches to the defined layout from pertag2 when there's more than one?

Why do you want this? I there's only one client, t doesn't matter what layout is set.

Ehhhh....... you're right. I meant to hide gaps when there's only one client tongue

*I should not post this stuff when I'm at the same time studying*


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

#742 2012-05-08 18:33:12

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

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

Unia wrote:
OK100 wrote:
Unia wrote:

Oke scratch that last request, it's become my personal computing goal for summer tongue

I have another question though: is there a patch that sets monocle layout automatically when there is only one client running, and then switches to the defined layout from pertag2 when there's more than one?

Why do you want this? I there's only one client, t doesn't matter what layout is set.

Ehhhh....... you're right. I meant to hide gaps when there's only one client tongue

*I should not post this stuff when I'm at the same time studying*

http://dwm.suckless.org/patches/noborder
EDIT: Ah, you want to hide gaps, not borders, right?

Last edited by OK100 (2012-05-08 18:34:19)

Offline

#743 2012-05-08 18:48:12

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,472
Website

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

Yea, are you studying at the same time too or what? big_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

#744 2012-05-08 19:16:35

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

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

Unia wrote:

Yea, are you studying at the same time too or what? big_smile

Nope, I'm playing Call of Duty tongue

Offline

#745 2012-05-14 20:52:00

prohna
Member
Registered: 2009-04-20
Posts: 13

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

Is there anyway we could get a sticky or maybe someone to edit the first post with a list of the working patches available? It seems like theres alot in this thread that are great but its a bit of a pain to search through.

Offline

#746 2012-05-14 21:05:48

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 19,019
Website

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

prohna wrote:

Is there anyway we could get a sticky or maybe someone to edit the first post with a list of the working patches available? It seems like theres alot in this thread that are great but its a bit of a pain to search through.

You could always start one right here.

A more logical place to keep an up-to-date list of working patches would be the wiki...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#747 2012-05-14 21:22:49

prohna
Member
Registered: 2009-04-20
Posts: 13

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

jasonwryan wrote:
prohna wrote:

Is there anyway we could get a sticky or maybe someone to edit the first post with a list of the working patches available? It seems like theres alot in this thread that are great but its a bit of a pain to search through.

You could always start one right here.

A more logical place to keep an up-to-date list of working patches would be the wiki...

I would if i had a justifiable amount of knowledge. I feel all id be doing is listing patches i have less than a working understanding of. If just a list was enough tho i think i could handle that.

Offline

#748 2012-05-14 21:26:15

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 19,019
Website

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

Once you make a start, others will contribute.


Just add the patches that you know work with 6.0 (or note what the last version they compiled against was) and include a link to wherever it is that they are hosted.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#749 2012-05-18 05:44:10

Crunch
Member
From: -+-
Registered: 2011-02-17
Posts: 56

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

I've got a question / request...

Has anyone made an occupied color for work space tags like WMFS has?  I know it wouldn't be hard to add but thought it would be neat to be able to differentiate between selected/occupied/normal a bit better than just a box.


Registered Linux user #536591.

Offline

#750 2012-05-18 12:20:51

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,982
Website

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

Crunch, I'm not familiar with one, but that would be very easy.  Just add a conditional to the for loop around line 740 in dwm.c in drawbar() function.  I say "about" because I believe I have made some changes to the file already that may have moved this a bit.

I'd just take the conditions from the call to drawsquare() and put them in a conditional that sets the col variable to something else.  I suspect it would be a single line patch.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

Board footer

Powered by FluxBB