You are not logged in.
I would like to request the statuscolors patch for use with the upstream/Head version of dwm. Together with instructions on how to use it in say sh script or conky script.
According to this:
https://bbs.archlinux.org/edit.php?id=1530303
I've applied version 6.1 of the patch but I don't get any colours.
This is what the conky script looks BTW.
out_to_console yes
out_to_x no
background no
update_interval 4
update_interval_on_battery 15
total_run_times 0
use_spacer none
override_utf8_locale yes
#font -*-terminus2-medium-r-*-*-12-*-*-*-*-*-*-*
times_in_seconds true
short_units true
#format_human_readable false
TEXT
${execp echo -e \\x03} È ${cpu cpu0}% Þ $memperc% Å $swap /${fs_used_perc /}% /tmp ${fs_used_perc /tmp}% Ð ${diskio_write sda} Ñ ${diskio_read sda} À ${wireless_essid wlan0} (${wireless_link_qual_perc wlan0}%) ${execpi 30 wget -O - http://ip.tupeux.com | tail}${if_up ppp0} Ð ${downspeedf ppp0}K (${totaldown ppp0}) Ñ ${upspeedf ppp0}K (${totalup ppp0})$else Ð ${downspeedf wlan0}K (${totaldown wlan0}) Ñ ${upspeedf wlan0}K (${totalup wlan0})$endif Ä $battery_short ${format_time $battery_time "\hh \mm"} Õ ${time %l:%M %a %d %b}
EDIT.
If I apply the dwm-6.1-statuscolors.diff patch to dwm Head, there appear to be defintions missing which are supposed to be in config.h. This is my guess of what's missing:
#define NUMCOLORS 9
static const char colors[NUMCOLORS][SchemeLast][8] = {
// border foreground background
{ "#cccccc", "#000000", "#cccccc" }, // 0 = normal
{ "#0066ff", "#ffffff", "#0066ff" }, // 1 = selected
{ "#0066ff", "#0066ff", "#ffffff" }, // 2 = urgent/warning
{ "#ff0000", "#ffffff", "#ff0000" }, // 3 = error
// add more here
};
The patched source compiles more or less successfully but doesn't execute properly.
Does anyone have an up to date patch file for coloring the status bar together with a brief example of its usage??
EDIT.
1.
Indeed the snippet of color definitions in config.h is supposed to be as follows:
#define NUMCOLORS 4
static const char colors[NUMCOLORS][MAXCOLORS][8] = {
// border foreground background
{ "#cccccc", "#000000", "#cccccc" }, // 0 = normal
{ "#0066ff", "#ffffff", "#0066ff" }, // 1 = selected
{ "#0066ff", "#0066ff", "#ffffff" }, // 2 = urgent/warning
{ "#ff0000", "#ffffff", "#ff0000" }, // 3 = error
// add more here
};
2.
The console output from conky (using extended characters) can only be realized via a /bin/bash shell rather than /bin/sh. Each of these shells has its own implementation of echo and echo -e is only available in BASH.
Last edited by wildfowl (2015-05-24 16:59:57)
Offline
Hey guys, sorry. I drift in and out of checking the forums from time to time. Below you'll find my config.h, I hope it helps.
TL;DR: wildfowl was correct
/* See LICENSE file for copyright and license details. */
/* appearance */
#include "tcl.c"
static const char *fonts[] = {
"Termsyn.Icons:size=10.5",
"VL Gothic:size=10.5",
"WenQuanYi Micro Hei:size=10.5",
};
#define NUMCOLORS 5
static const char colors[NUMCOLORS][MAXCOLORS][8] = {
// border foreground background
{ "#A3AE7E", "#A3AE7E", "#5C604D" }, // normal
{ "#E5E7E1", "#E5E7E1", "#A3AE7E" }, // selected
{ "#ff0000", "#000000", "#ffff00" }, // urgent/warning (black on yellow)
{ "#ff0000", "#ffffff", "#ff0000" }, // error (white on red)
{ "#A3AE7E", "#C8CFB4", "#5C604D" }, //icon
// add more here
};
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const Bool showbar = True; /* False means no bar */
static const Bool topbar = True; /* False means bottom bar */
/* tagging */
static const char *tags[] = { "Web", "Code", "Media", "Comm" };
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, True, -1 },
{ "Skype", NULL, NULL, 1 << 2, True, -1 },
{ "Firefox", NULL, NULL, 1, False, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
{ "|[]|", tcl}
};
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-nb", colors[0][2], "-nf", colors[0][1], "-sb", colors[1][2], "-sf", colors[1][1], NULL };
static const char *termcmd[] = { "urxvt", NULL };
static const char *wificmd[] = { "/home/komon/bin/dmenu_wifi", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_q, spawn, {.v = dmenucmd } },
{ MODKEY, XK_x, spawn, {.v = termcmd } },
{ MODKEY, XK_w, spawn, {.v = wificmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */
/* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};
Offline
In case anyone else was bothered by attachaside attaching to master if the window was spawned on a non-visible tag, I've extended the patch to cover that case.
You can find the new patch on the same page at http://dwm.suckless.org/patches/attachaside, under "version updated to work with tags".
Offline
In case anyone else was bothered by attachaside attaching to master if the window was spawned on a non-visible tag, I've extended the patch to cover that case.
You can find the new patch on the same page at http://dwm.suckless.org/patches/attachaside, under "version updated to work with tags".
Hi, I tried your updatet patch with a fresh unpatched git-version of dwm and it gave me this;
╭─andreas@andreas-pc ~/dwm ‹master›
╰─$ patch -p1 < ~/Dokumente/custom/dwm-patches/01-dwm-6.1-attachaside-tagfix.diff
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git dwm.c dwm.c
|index 169adcb..cd299e0 100644
|--- dwm.c
|+++ dwm.c
--------------------------
File to patch: dwm.c
patching file dwm.c
Other than that it asks for which file to patch the patch itself is applied.
Offline
The output says it all! You used
patch -p1
but "Perhaps you used the wrong -p or --strip option?" So maybe try without -p1
Offline
The output says it all! You used
patch -p1
but "Perhaps you used the wrong -p or --strip option?" So maybe try without -p1
well I did it just as it's explained in the wiki and it worked fine with the previous version of this patch:
cd dwm-directory
patch -p1 < path/to/patch.diff
Offline
Hi everyone, I was hoping someone could point me in the right direction, I was looking for a patch to allow me to cycle through tags. The first page of this thread, had a url to a patch called cycle whcih looked perfect, but it is now a dead link, if someone has that or another solution for the same thing I would be eternally greatful.
thanks for any help
Arch Awesome, Ranger & Vim the coding triple threat.
Offline
Is this what you're looking for?
Offline
Wow I think it is, I don't know how I missed this, I have been through that whole list. thanks for giving me a Duh! moment
Arch Awesome, Ranger & Vim the coding triple threat.
Offline
hey there.
i'm using KOMON's statuscolors patch for git-HEAD (https://gist.github.com/KOMON/0a4819f030e4d6f84ebe).
managed to apply it and it seems to be working, but it "eats characters".
does anybody have a solution for that?
here's an example of what's going on:
without any color strings in statuscolor:
added "\x03" after song string:
Offline
^^ I wish to know as well as I am having the same problem, albeit with the statuscolors, Xft and systray patches which I am using.
Could someone kindly drop a brief hint as to which part of the source to look at?
Another nagging issue I've been having for some time is when switching from [T] to [F] mode say (T - Tile, F - Float), windows aren't resized back to their original size and position when in [F] mode. The size and position of the window remains the same as determined by Tile mode. I'm not sure if the patch I believe this is covered by the save-floats patch. It's a simple patch but having applied it, it doesn't have any effect on restoring tiled windows back to floating windows. Would appreciate any further hints..
Thx
Offline
hey there.
i'm using KOMON's statuscolors patch for git-HEAD (https://gist.github.com/KOMON/0a4819f030e4d6f84ebe).
managed to apply it and it seems to be working, but it "eats characters".
does anybody have a solution for that?here's an example of what's going on:
without any color strings in statuscolor:
http://i.imgur.com/xplIF0V.pngadded "\x03" after song string:
http://i.imgur.com/zok6L5x.png
Increase the char stext array from 256 to something like 384 in file dwm.c. This should fix it.
Offline
.
Last edited by wildfowl (2015-10-19 20:56:45)
Offline
spychalski wrote:hey there.
i'm using KOMON's statuscolors patch for git-HEAD (https://gist.github.com/KOMON/0a4819f030e4d6f84ebe).
managed to apply it and it seems to be working, but it "eats characters".
does anybody have a solution for that?here's an example of what's going on:
without any color strings in statuscolor:
http://i.imgur.com/xplIF0V.pngadded "\x03" after song string:
http://i.imgur.com/zok6L5x.pngIncrease the char stext array from 256 to something like 384 in file dwm.c. This should fix it.
Unfortunately it doesn't work for me.
Is there a solution? Thank you in advance.
Offline
Changing the length of stext doesn't fix it for me either.
^^ I wish to know as well as I am having the same problem, albeit with the statuscolors, Xft and systray patches which I am using.
Could someone kindly drop a brief hint as to which part of the source to look at?
It might have something to do with this build error:
drw.c: In function ‘drw_text’:
drw.c:250:14: warning: variable ‘th’ set but not used [-Wunused-but-set-variable]
int tx, ty, th;
^
Relevant part of diff:
@@ -289,10 +313,10 @@ drw_text(Drw *drw, int x, int y, unsigne
for (i = len; i && i > len - 3; buf[--i] = '.');
if (render) {
- th = curfont->ascent + curfont->descent;
- ty = y + (h / 2) - (th / 2) + curfont->ascent;
+ th = pad ? (curfont->ascent + curfont->descent) : 0;
+ ty = y + ((h + curfont->ascent - curfont->descent) / 2);
tx = x + (h / 2);
- XftDrawStringUtf8(d, invert ? &drw->scheme->bg->rgb : &drw->scheme->fg->rgb, curfont->xfont, tx, ty, (XftChar8 *)buf, len);
+ XftDrawStringUtf8(d, &drw->scheme->fg->rgb, curfont->xfont, tx, ty, (XftChar8 *)buf, len);
}
Edit: that variable only affects y position so it must be unrelated.
Last edited by Ocypheum (2015-11-22 22:52:46)
Offline
I figured out what the problem was but in order to fix it I had to increase the padding between different colored strings. See here.
Offline
Is there an easy way to disable statusbar ?
I only use fullscreen apps and my st terminal with tmux as all info I want in powerline
Thank you very much.
Offline
Set
static const Bool showbar = False;
in your config.h
Offline
Thank you very much "null" : it works tremendously !!!
Offline
Fixed another bug in statuscolors patch. Get the latest here.
Offline
Fixed another bug in statuscolors patch. Get the latest here.
So I have a question about this patch... I'm using dualstatus and I was wondering what I have to do to make statuscolors to work because I would love to have color in both of my status bars. Thank you for an amazing patch!
Just trying to figure things out in this world
Offline
There's another version here. I'll stop messing with it now. Probably.
I'm using dualstatus and I was wondering what I have to do to make statuscolors to work because I would love to have color in both of my status bars.
If the patches aren't compatible, you should end up with a file named diff.rejects (or something like that) which you can then merge manually.
Edit: also, you might try changing line 77 of dualstatus patch to call `drw_colored_text` instead of `drw_text`
drw_colored_text(drw, scheme, NUMCOLORS, 0, 0, mons->ww, bh, eb.text);
Can't say if it will work without further modifications though.
Last edited by Ocypheum (2015-11-28 23:35:46)
Offline
Does anyone know if there is a working centerclock patch for 6.1 yet?
Offline
Does anyone know if there is a working centerclock patch for 6.1 yet?
Was there one for a previous version? I don't see anything named centerclock here.
Offline
Unia has a well working Patch for 6.0 there:
https://github.com/Unia/dwm-patches/blo … clock.diff
But if there isn't any alternative I'll just make this one work as soon as I have the time to dig a bit into it
Offline