You are not logged in.
I guess all you have to do is to adjust the values in the statuscolors patch?
Offline
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)
Arch64/DWM || My Dropbox referral link
Offline
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)
All configs @ https://github.com/w0ng
Offline
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
Arch64/DWM || My Dropbox referral link
Offline
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.
All configs @ https://github.com/w0ng
Offline
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
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?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
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).
Arch64/DWM || My Dropbox referral link
Offline
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.
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
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
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
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% ) so if any of you feel like coding something, please help me out
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
No-one? Now I drew all those fancy layouts for nothing
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
Oke scratch that last request, it's become my personal computing goal for summer
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
Oke scratch that last request, it's become my personal computing goal for summer
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
Unia wrote:Oke scratch that last request, it's become my personal computing goal for summer
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
*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
OK100 wrote:Unia wrote:Oke scratch that last request, it's become my personal computing goal for summer
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
*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
Yea, are you studying at the same time too or what?
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
Yea, are you studying at the same time too or what?
Nope, I'm playing Call of Duty
Offline
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
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...
Offline
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
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.
Offline
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
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.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline