Re: cwmrc(5) small cleanup
Hi, On Sat 2017.03.18 at 20:53 -0400, Michael Reed wrote: > The signatures for the functions bind-key and bind-mouse do > not match how they are used. How so? The usage is "bind-key "; for example, "bind-key C4-equal window-vmaximize" and say for mouse, "bind-mouse M-2 window-resize" If it's not working for you, please send me a snippet of the config that's not. Thanks, Okan > diff --git a/app/cwm/cwmrc.5 b/app/cwm/cwmrc.5 > index fbecaedb..1da9c08c 100644 > --- a/app/cwm/cwmrc.5 > +++ b/app/cwm/cwmrc.5 > @@ -63,7 +63,7 @@ The name and class values, respectively, for existing > windows > are both set in the WM_CLASS property and may be obtained using > .Xr xprop 1 . > .Pp > -.It Ic bind-key Ar key function > +.It Ic bind-key Ar key Ns - Ns Ar function > Bind or rebind key > .Ar key > to > @@ -92,7 +92,7 @@ may either be one from the > .Sx BIND FUNCTION LIST > (see below) or the command line that is to be executed. > .Pp > -.It Ic bind-mouse Ar button function > +.It Ic bind-mouse Ar button Ns - Ns Ar function > Bind or rebind button > .Ar button > to > @@ -245,7 +245,6 @@ A special > keyword > .Dq all > can be used to unbind all buttons. > -.Pp > .El > .Sh BIND FUNCTION LIST > .Bl -tag -width 23n -compact >
cwmrc(5) small cleanup
The signatures for the functions bind-key and bind-mouse do not match how they are used. diff --git a/app/cwm/cwmrc.5 b/app/cwm/cwmrc.5 index fbecaedb..1da9c08c 100644 --- a/app/cwm/cwmrc.5 +++ b/app/cwm/cwmrc.5 @@ -63,7 +63,7 @@ The name and class values, respectively, for existing windows are both set in the WM_CLASS property and may be obtained using .Xr xprop 1 . .Pp -.It Ic bind-key Ar key function +.It Ic bind-key Ar key Ns - Ns Ar function Bind or rebind key .Ar key to @@ -92,7 +92,7 @@ may either be one from the .Sx BIND FUNCTION LIST (see below) or the command line that is to be executed. .Pp -.It Ic bind-mouse Ar button function +.It Ic bind-mouse Ar button Ns - Ns Ar function Bind or rebind button .Ar button to @@ -245,7 +245,6 @@ A special keyword .Dq all can be used to unbind all buttons. -.Pp .El .Sh BIND FUNCTION LIST .Bl -tag -width 23n -compact
Re: Documentation fix for cwmrc(5)
On 2015-05-16 23.49.34 -0500, Kent R. Spillner wrote: On Sat, May 16, 2015 at 05:48:24PM -0400, Okan Demirmen wrote: Ah, I suspect if you looked at the errors, it would show a syntax error with the above. Like the example in the man page, use: autogroup 4 xterm,UXTerm and see if that works. Thanks for pointing that out, Okan; that was indeed the issue. Apologies for the noise. Okan reminded me I had an old diff that fixes this so the quotes are no longer necessary. If you follow -current you can checkout the latest xenocara and rebuild cwm to use it. Thanks for this change, Kent; it works beautifully. -Mike
Re: Documentation fix for cwmrc(5)
On Fri, May 15, 2015 at 3:11 AM, Mike Burns mike+open...@mike-burns.com wrote: This is essentially the opposite of this fix by Holger Mikolon, which was never merged: http://marc.info/?l=openbsd-techm=127765978812199 For a reason cwmrc(5) autogroup takes the windowname and windowclass in the opposite order than specified in the man page. Fix the man page. The man page should be accurate; how are you determining that it is wrong? Take the example from cwmrc(5) and try it: # Autogroup definitions autogroup 3 aterm,XTerm autogroup 3 xterm,XTerm The current logic comes from the fact that xprop(1) displays name then class. That said, I do want to reverse the logic in cwm(1) along with other config format changes, so I prefer to do that all at once. Please let me know how/why you've come to the below conclusion. Thanks. Index: app/cwm/cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.59 diff -u -p -r1.59 cwmrc.5 --- app/cwm/cwmrc.5 25 Aug 2014 12:49:19 - 1.59 +++ app/cwm/cwmrc.5 15 May 2015 07:08:45 - @@ -40,7 +40,7 @@ The following options are accepted: .Pp .Bl -tag -width Ds -compact .It Ic autogroup Ar group windowclass -.It Ic autogroup Ar group windowname,windowclass +.It Ic autogroup Ar group windowclass,windowname Automatically add new windows to .Ar group if their class property matches
Re: Documentation fix for cwmrc(5)
On Sat, May 16, 2015 at 5:22 PM, Mike Burns mike+open...@mike-burns.com wrote: On 2015-05-16 16.54.18 -0400, Okan Demirmen wrote: On Fri, May 15, 2015 at 3:11 AM, Mike Burns mike+open...@mike-burns.com wrote: cwmrc(5) autogroup takes the windowname and windowclass in the opposite order than specified in the man page. Fix the man page. The man page should be accurate; how are you determining that it is wrong? Perhaps I am misunderstanding the output from xprop(1). I see: $ xprop | grep CLASS WM_CLASS(STRING) = xterm, UXTerm I added the following to my cwmrc(5): autogroup 4 xterm,UXTerm autogroup 5 UXTerm,xterm I then opened a new uxterm, and when I grouponly4 I see nothing, but on a grouponly5 I see the new uxterm. Is that what the man page is describing? Ah, I suspect if you looked at the errors, it would show a syntax error with the above. Like the example in the man page, use: autogroup 4 xterm,UXTerm and see if that works. Thanks. Take the example from cwmrc(5) and try it: # Autogroup definitions autogroup 3 aterm,XTerm autogroup 3 xterm,XTerm The current logic comes from the fact that xprop(1) displays name then class. That said, I do want to reverse the logic in cwm(1) along with other config format changes, so I prefer to do that all at once. Please let me know how/why you've come to the below conclusion. Thanks. Index: app/cwm/cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.59 diff -u -p -r1.59 cwmrc.5 --- app/cwm/cwmrc.5 25 Aug 2014 12:49:19 - 1.59 +++ app/cwm/cwmrc.5 15 May 2015 07:08:45 - @@ -40,7 +40,7 @@ The following options are accepted: .Pp .Bl -tag -width Ds -compact .It Ic autogroup Ar group windowclass -.It Ic autogroup Ar group windowname,windowclass +.It Ic autogroup Ar group windowclass,windowname Automatically add new windows to .Ar group if their class property matches
Re: Documentation fix for cwmrc(5)
On 2015-05-16 16.54.18 -0400, Okan Demirmen wrote: On Fri, May 15, 2015 at 3:11 AM, Mike Burns mike+open...@mike-burns.com wrote: cwmrc(5) autogroup takes the windowname and windowclass in the opposite order than specified in the man page. Fix the man page. The man page should be accurate; how are you determining that it is wrong? Perhaps I am misunderstanding the output from xprop(1). I see: $ xprop | grep CLASS WM_CLASS(STRING) = xterm, UXTerm I added the following to my cwmrc(5): autogroup 4 xterm,UXTerm autogroup 5 UXTerm,xterm I then opened a new uxterm, and when I grouponly4 I see nothing, but on a grouponly5 I see the new uxterm. Is that what the man page is describing? Take the example from cwmrc(5) and try it: # Autogroup definitions autogroup 3 aterm,XTerm autogroup 3 xterm,XTerm The current logic comes from the fact that xprop(1) displays name then class. That said, I do want to reverse the logic in cwm(1) along with other config format changes, so I prefer to do that all at once. Please let me know how/why you've come to the below conclusion. Thanks. Index: app/cwm/cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.59 diff -u -p -r1.59 cwmrc.5 --- app/cwm/cwmrc.5 25 Aug 2014 12:49:19 - 1.59 +++ app/cwm/cwmrc.5 15 May 2015 07:08:45 - @@ -40,7 +40,7 @@ The following options are accepted: .Pp .Bl -tag -width Ds -compact .It Ic autogroup Ar group windowclass -.It Ic autogroup Ar group windowname,windowclass +.It Ic autogroup Ar group windowclass,windowname Automatically add new windows to .Ar group if their class property matches
Documentation fix for cwmrc(5)
This is essentially the opposite of this fix by Holger Mikolon, which was never merged: http://marc.info/?l=openbsd-techm=127765978812199 cwmrc(5) autogroup takes the windowname and windowclass in the opposite order than specified in the man page. Fix the man page. Index: app/cwm/cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.59 diff -u -p -r1.59 cwmrc.5 --- app/cwm/cwmrc.5 25 Aug 2014 12:49:19 - 1.59 +++ app/cwm/cwmrc.5 15 May 2015 07:08:45 - @@ -40,7 +40,7 @@ The following options are accepted: .Pp .Bl -tag -width Ds -compact .It Ic autogroup Ar group windowclass -.It Ic autogroup Ar group windowname,windowclass +.It Ic autogroup Ar group windowclass,windowname Automatically add new windows to .Ar group if their class property matches
Re: [PATCH] cwmrc.5: rename autogroup parameter
On Tue 2012.10.30 at 00:21 -0500, Kent R. Spillner wrote: Hey, dude- On Sun, Oct 28, 2012 at 04:14:07PM -0400, Okan Demirmen wrote: A slightly altered version of your diff was applied -thanks! Cool, thanks! I noticed you and jmc@ removed the .Xr XClassHint 3 pointer. What do you think about the addition below? Basically, I was really confused at first because autogroup didn't behave the way I expected it to. Long story short, the problem was that I thought the WM_CLASS property mapped to what cwmrc(5) calls windowclass, and WM_NAME mapped to windowname. After much head-scratching I had to turn to the cwm source to figure out that windowclass and windowname both come from WM_CLASS (I thought the two values were two different classes, i.e. windows could belong to multiple classes). I'll defer to you and jmc@ on this one, but I personally think something along these lines would be helpful for XClassHint noobs like myself. Hi, Well, we did have the wrong line in cwmrc(5), so hopefully that will fix some confusion. However, I can see the point about not knowing what 'windowname' and 'windowclass' are assigned to with xprop(1) output - xprop doesn't exactly document what 'WM_CLASS(STRING) = xterm, XTerm' means. Then again, XClassHint(3) won't tell you what the output of xprop(1) will be either. How about helping xprop along like so? Index: cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.45 diff -u -p -r1.45 cwmrc.5 --- cwmrc.5 31 Oct 2012 19:30:19 - 1.45 +++ cwmrc.5 31 Oct 2012 19:49:06 - @@ -59,7 +59,8 @@ used to override .Dq sticky group mode . .Pp The name and class values for existing windows may be obtained using -.Xr xprop 1 . +.Xr xprop 1 , +output as windowname,windowclass. .Pp .It Ic bind Ar keys command Cause the creation of a keybinding, or replacement of a default
Re: [PATCH] cwmrc.5: rename autogroup parameter
Hey, dude- On Sun, Oct 28, 2012 at 04:14:07PM -0400, Okan Demirmen wrote: A slightly altered version of your diff was applied -thanks! Cool, thanks! I noticed you and jmc@ removed the .Xr XClassHint 3 pointer. What do you think about the addition below? Basically, I was really confused at first because autogroup didn't behave the way I expected it to. Long story short, the problem was that I thought the WM_CLASS property mapped to what cwmrc(5) calls windowclass, and WM_NAME mapped to windowname. After much head-scratching I had to turn to the cwm source to figure out that windowclass and windowname both come from WM_CLASS (I thought the two values were two different classes, i.e. windows could belong to multiple classes). I'll defer to you and jmc@ on this one, but I personally think something along these lines would be helpful for XClassHint noobs like myself. Thanks again! Best, Kent Index: cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.44 diff -p -u -r1.44 cwmrc.5 --- cwmrc.5 28 Oct 2012 20:13:02 - 1.44 +++ cwmrc.5 30 Oct 2012 05:08:35 - @@ -60,6 +60,8 @@ used to override .Pp The name and class values for existing windows may be obtained using .Xr xprop 1 . +Both values come from the WM_CLASS property as described in +.Xr XClassHint 3 . .Pp .It Ic bind Ar keys command Cause the creation of a keybinding, or replacement of a default
Re: [PATCH] cwmrc.5: rename autogroup parameter
Hey, dude- -Control automatic window grouping, based on the name and/or class -properties, where +Control automatic window grouping based on either the class property, +or on the name and class properties, where I like your wording, and I think it is clearer. However, after this change now I think the Control automatic window grouping could use a little attention. What do you think about completely revising the whole autogroup description? (This bikeshed needs another wing) Below is a new diff which incorporates your suggestion (plus a few additions), and revises the rest of the description as well. Comments? Thanks again! Best, Kent Index: cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.43 diff -N -p -u cwmrc.5 --- cwmrc.5 6 Jul 2012 08:41:29 - 1.43 +++ cwmrc.5 28 Oct 2012 07:29:30 - @@ -39,19 +39,30 @@ Arguments containing whitespace should be surrounded b The following options are accepted: .Pp .Bl -tag -width Ds -compact -.It Ic autogroup Ar group windowname +.It Ic autogroup Ar group windowclass .It Ic autogroup Ar group windowname,windowclass -Control automatic window grouping, based on the name and/or class -properties, where +Automatically add new windows to .Ar group +if their class property matches +.Ar windowclass , +or name and class properties match +.Ar windowname +and +.Ar windowclass . +.Ar Group is a number between 0 and 9. -If the group number is 0, then the window will not be grouped; this to -allow for -.Dq sticky -windows in sticky group mode. +When +.Ar group +is 0 matching windows will not be added to any group; this may be +used to override +.Dq sticky group mode . .Pp -The name and class of a window may be obtained using -.Xr xprop 1 . +The name and class values for existing windows may be obtained using +.Xr xprop 1 +.Po see +.Xr XClassHint 3 +for details +.Pc . .Pp .It Ic bind Ar keys command Cause the creation of a keybinding, or replacement of a default
cwmrc(5) color options (take 2)
Hello again, this patch adds the possibility to specify colors for the menu and its font in the cwmrc(5), this time without breaking subpixel hinting. Please note that the syntax is not the same as last time, see the manpage for details. I've tested this with a variety of different colors over the course of a few days (on amd64). Apart from the colors there's only one additional change in behaviour: The first entry in the ``exec program'' dialog is always highlighted, even when selected with the mouse. Index: calmwm.h === RCS file: /cvs/xenocara/app/cwm/calmwm.h,v retrieving revision 1.98 diff -u calmwm.h --- calmwm.h27 Aug 2009 01:38:08 - 1.98 +++ calmwm.h11 Sep 2009 13:01:57 - @@ -47,6 +47,8 @@ CWM_COLOR_BORDER_UNGROUP, CWM_COLOR_FG_MENU, CWM_COLOR_BG_MENU, + CWM_COLOR_FG_FONT, + CWM_COLOR_BG_FONT, CWM_COLOR_MAX }; @@ -77,7 +79,8 @@ struct cycle_entry_q mruq; XftDraw *xftdraw; - XftColor xftcolor; + XftColor xftcolorfg; + XftColor xftcolorbg; int xinerama_no; XineramaScreenInfo *xinerama; @@ -275,6 +278,8 @@ #define CONF_COLOR_UNGROUPBORDER red #define CONF_COLOR_MENUFG black #define CONF_COLOR_MENUBG white +#define CONF_COLOR_FONTFG white +#define CONF_COLOR_FONTBG black struct color color[CWM_COLOR_MAX]; char termpath[MAXPATHLEN]; @@ -484,12 +489,13 @@ voidfont_init(struct screen_ctx *); int font_width(const char *, int); voidfont_draw(struct screen_ctx *, const char *, int, -Drawable, int, int); +Drawable, int, int, int); XftFont*font_make(struct screen_ctx *, const char *); #define font_ascent() Conf.DefaultFont-ascent #define font_descent() Conf.DefaultFont-descent #definefont_height() Conf.FontHeight +#define font_baseline()(font_ascent() + 1) /* Externs */ Index: conf.c === RCS file: /cvs/xenocara/app/cwm/conf.c,v retrieving revision 1.70 diff -u conf.c --- conf.c 25 Aug 2009 12:05:11 - 1.70 +++ conf.c 11 Sep 2009 13:01:58 - @@ -74,14 +74,20 @@ for (i = 0; i CWM_COLOR_MAX; i++) { xu_freecolor(sc, sc-color[i].pixel); sc-color[i].pixel = xu_getcolor(sc, c-color[i].name); + + xfree(sc-color[i].name); + sc-color[i].name = xstrdup(c-color[i].name); } } void conf_reload(struct conf *c) { + struct screen_ctx *sc; struct client_ctx *cc; + sc = screen_current(); + if (parse_config(c-conf_path, c) == -1) { warnx(config file %s has errors, not reloading, c-conf_path); return; @@ -91,6 +97,17 @@ TAILQ_FOREACH(cc, Clientq, entry) client_draw_border(cc); conf_font(c); + + XDestroyWindow(X_Dpy, sc-menuwin); + XFreeGC(X_Dpy, sc-gc); + menu_init(sc); + + XftDrawDestroy(sc-xftdraw); + XftColorFree(X_Dpy, DefaultVisual(X_Dpy, sc-which), + DefaultColormap(X_Dpy, sc-which), sc-xftcolorfg); + XftColorFree(X_Dpy, DefaultVisual(X_Dpy, sc-which), + DefaultColormap(X_Dpy, sc-which), sc-xftcolorbg); + font_init(sc); } static struct { @@ -202,6 +219,10 @@ xstrdup(CONF_COLOR_MENUFG); c-color[CWM_COLOR_BG_MENU].name = xstrdup(CONF_COLOR_MENUBG); + c-color[CWM_COLOR_FG_FONT].name = + xstrdup(CONF_COLOR_FONTFG); + c-color[CWM_COLOR_BG_FONT].name = + xstrdup(CONF_COLOR_FONTBG); c-DefaultFontName = xstrdup(DEFAULTFONTNAME); } Index: cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.28 diff -u cwmrc.5 --- cwmrc.5 24 Aug 2009 23:54:41 - 1.28 +++ cwmrc.5 11 Sep 2009 13:01:58 - @@ -96,6 +96,14 @@ .It Ic color ungroupborder Ar color Set the color of the border while ungrouping a window. .Pp +.It Ic color primary Ar foreground background +Set the primary colors of the menus. These are for example used for the not +selected entries in the application menu. +.Pp +.It Ic color secondary Ar foreground background +Set the secondary colors of the menus. These are for example used to highlight +the currently selected entry in the application menu. +.Pp .It Ic command Ar name path Every .Ar name Index: font.c === RCS file: /cvs/xenocara/app/cwm/font.c,v retrieving revision 1.9 diff -u font.c --- font.c 17 May 2009 23:40:57 - 1.9
Re: cwmrc(5) color options
On Fri, 7 Aug 2009 19:34:04 +0200 Simon Nicolussi simon.nicolu...@student.uibk.ac.at wrote: Edd Barrett wrote: How do the menu item foreground and background relate? Are they just inverted? It would be better to have an explicit option for each. An additional option to choose the color of the font in the selected entry has also been one of the suggestions made by Thomas Pfaff. This seems to require a bit more work, unfortunately. Maybe I'll take a look at it later or someone else will step in. For the record, what I suggested on #openbsd was something like color menu fg/bg fgsel/bgsel or color menu fg bg fgsel bgsel the latter being slightly more consistent with regards to the gap option, if that matters. Not that I have anything to do with cwm, but personally I think the current solution is a bit annoying and you really need to be able to specify all four colors ;-) Cheers, Thomas
cwmrc(5) color options
Hello, this patch adds the possibility to specify colors for the menu and its font in the cwmrc(5). Thanks to Thomas Pfaff for brief testing and further suggestions. Tested it on amd64. Index: calmwm.h === RCS file: /cvs/xenocara/app/cwm/calmwm.h,v retrieving revision 1.94 diff -u calmwm.h --- calmwm.h26 Jun 2009 12:21:58 - 1.94 +++ calmwm.h5 Aug 2009 00:25:48 - @@ -47,6 +47,7 @@ CWM_COLOR_BORDER_UNGROUP, CWM_COLOR_FG_MENU, CWM_COLOR_BG_MENU, + CWM_COLOR_FONT, CWM_COLOR_MAX }; @@ -272,6 +273,7 @@ #define CONF_COLOR_UNGROUPBORDER red #define CONF_COLOR_MENUFG black #define CONF_COLOR_MENUBG white +#define CONF_COLOR_FONTblack struct color color[CWM_COLOR_MAX]; char termpath[MAXPATHLEN]; Index: conf.c === RCS file: /cvs/xenocara/app/cwm/conf.c,v retrieving revision 1.66 diff -u conf.c --- conf.c 26 Jun 2009 12:21:58 - 1.66 +++ conf.c 5 Aug 2009 00:25:49 - @@ -74,14 +74,20 @@ for (i = 0; i CWM_COLOR_MAX; i++) { xu_freecolor(sc, sc-color[i].pixel); sc-color[i].pixel = xu_getcolor(sc, c-color[i].name); + + xfree(sc-color[i].name); + sc-color[i].name = xstrdup(c-color[i].name); } } void conf_reload(struct conf *c) { + struct screen_ctx *sc; struct client_ctx *cc; + sc = screen_current(); + if (parse_config(c-conf_path, c) == -1) { warnx(config file %s has errors, not reloading, c-conf_path); return; @@ -91,6 +97,15 @@ TAILQ_FOREACH(cc, Clientq, entry) client_draw_border(cc); conf_font(c); + + XDestroyWindow(X_Dpy, sc-menuwin); + XFreeGC(X_Dpy, sc-gc); + menu_init(sc); + + XftDrawDestroy(sc-xftdraw); + XftColorFree(X_Dpy, DefaultVisual(X_Dpy, sc-which), + DefaultColormap(X_Dpy, sc-which), sc-xftcolor); + font_init(sc); } void @@ -190,6 +205,8 @@ xstrdup(CONF_COLOR_MENUFG); c-color[CWM_COLOR_BG_MENU].name = xstrdup(CONF_COLOR_MENUBG); + c-color[CWM_COLOR_FONT].name = + xstrdup(CONF_COLOR_FONT); c-DefaultFontName = xstrdup(DEFAULTFONTNAME); } Index: cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.25 diff -u cwmrc.5 --- cwmrc.5 17 May 2009 23:40:57 - 1.25 +++ cwmrc.5 5 Aug 2009 00:25:49 - @@ -96,6 +96,16 @@ .It Ic color ungroupborder Ar color Set the color of the border while ungrouping a window. .Pp +.It Ic color selectedentry Ar color +Set the color of the selected entry in the menu. +.Pp +.It Ic color unselectedentry Ar color +Set the color of the unselected entries in the menu. +.Pp +.It Ic color font Ar color +Set the color of the font. Note that the color of the font used in the +selected entry of the menu may differ. +.Pp .It Ic command Ar name Ar path Every .Ar name Index: font.c === RCS file: /cvs/xenocara/app/cwm/font.c,v retrieving revision 1.9 diff -u font.c --- font.c 17 May 2009 23:40:57 - 1.9 +++ font.c 5 Aug 2009 00:25:49 - @@ -28,7 +28,8 @@ errx(1, XftDrawCreate); if (!XftColorAllocName(X_Dpy, DefaultVisual(X_Dpy, sc-which), - DefaultColormap(X_Dpy, sc-which), black, sc-xftcolor)) + DefaultColormap(X_Dpy, sc-which), sc-color[CWM_COLOR_FONT].name, + sc-xftcolor)) errx(1, XftColorAllocName); } Index: parse.y === RCS file: /cvs/xenocara/app/cwm/parse.y,v retrieving revision 1.21 diff -u parse.y --- parse.y 20 Jun 2009 00:22:39 - 1.21 +++ parse.y 5 Aug 2009 00:25:49 - @@ -70,6 +70,8 @@ %token COLOR %token ACTIVEBORDER INACTIVEBORDER %token GROUPBORDER UNGROUPBORDER +%token SELECTEDENTRY UNSELECTEDENTRY +%token FONT %token ERROR %token v.string STRING %token v.number NUMBER @@ -194,6 +196,18 @@ free(conf-color[CWM_COLOR_BORDER_UNGROUP].name); conf-color[CWM_COLOR_BORDER_UNGROUP].name = $2; } + | SELECTEDENTRY STRING { + free(conf-color[CWM_COLOR_FG_MENU].name); + conf-color[CWM_COLOR_FG_MENU].name = $2; + } + | UNSELECTEDENTRY STRING { + free(conf-color[CWM_COLOR_BG_MENU].name); + conf-color[CWM_COLOR_BG_MENU].name = $2; + } + | FONT STRING { + free(conf-color
Re: cwmrc(5) color options
On Fri, Aug 07, 2009 at 02:18:50PM +0159, Simon Nicolussi wrote: Hello, this patch adds the possibility to specify colors for the menu and its font in the cwmrc(5). Thanks to Thomas Pfaff for brief testing and further suggestions. Works i386, will try sparc64 at some point. Really great! I have wanted to change the colors for ages! How do the menu item foreground and background relate? Are they just inverted? It would be better to have an explicit option for each. Also note that the sub-pixel hinting looks awful: http://www.flickr.com/photos/vext01/3797404275/sizes/o/ Perhaps a change of default font or turning off hinting (if possible) would help? Thanks -- Best Regards Edd Barrett (Freelance software developer / technical writer / open-source developer) http://students.dec.bmth.ac.uk/ebarrett
Re: cwmrc(5) color options
Edd Barrett wrote: How do the menu item foreground and background relate? Are they just inverted? It would be better to have an explicit option for each. The color of the font in the selected entry is made by XORing the background of the selected entry (called CWM_COLOR_FG_MENU in the source) with the background of the unselected entries (called CWM_COLOR_BG_MENU) and then XORing the result with the color of the font in the unselected entries. See menu_init() in menu.c for details. An additional option to choose the color of the font in the selected entry has also been one of the suggestions made by Thomas Pfaff. This seems to require a bit more work, unfortunately. Maybe I'll take a look at it later or someone else will step in. Edd Barrett wrote: Also note that the sub-pixel hinting looks awful: http://www.flickr.com/photos/vext01/3797404275/sizes/o/ Thanks, I didn't notice this with my settings: color selectedentry red color unselectedentry black color fontgreen Edd Barrett wrote: Perhaps a change of default font or turning off hinting (if possible) would help? Turning off hinting makes it even worse. Turning off antialiasing does help, but that cure is actually worse then the disease. -- Simon Nicolussi, simon.nicolu...@student.uibk.ac.at http://homepage.uibk.ac.at/~csag9583/
Re: cwmrc(5) color options
On Fri, Aug 07, 2009 at 07:30:47PM +0100, Edd Barrett wrote: Anyway, it works on sparc64 too. Good work :) No it doesnt. Oops :) When moving windows in cwm (with the mouse) on a blade 1000, bits of other window borders get stuck over the window you are dragging. See screenshot: http://www.flickr.com/photos/vext01/3798156549/sizes/o/ I have an expert3d card with the firmware loaded. -- Best Regards Edd Barrett (Freelance software developer / technical writer / open-source developer) http://students.dec.bmth.ac.uk/ebarrett
Re: cwmrc(5) color options
On Fri 2009.08.07 at 19:34 +0200, Simon Nicolussi wrote: Edd Barrett wrote: How do the menu item foreground and background relate? Are they just inverted? It would be better to have an explicit option for each. The color of the font in the selected entry is made by XORing the background of the selected entry (called CWM_COLOR_FG_MENU in the source) with the background of the unselected entries (called CWM_COLOR_BG_MENU) and then XORing the result with the color of the font in the unselected entries. See menu_init() in menu.c for details. An additional option to choose the color of the font in the selected entry has also been one of the suggestions made by Thomas Pfaff. This seems to require a bit more work, unfortunately. Maybe I'll take a look at it later or someone else will step in. hi and thanks! yes, i had support for this when i re-worked colors a while back, but pulled those bits. some of the issues that you may run into is due to the way reload happens - those will be solved once i finish a diff to re-vamp all that, but that's a few down on the list for now. and for those other cwm diff's sitting here, i haven't forgotten about them... cheers, okan
cwmrc(5)
Because it is more consistent with the documentation for the other options, and because e.g. autogroup 1 ``XTerm'' in .cwmrc doesn't work: Index: cwmrc.5 === RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v retrieving revision 1.25 diff -u -r1.25 cwmrc.5 --- cwmrc.5 17 May 2009 23:40:57 - 1.25 +++ cwmrc.5 4 Aug 2009 20:30:07 - @@ -27,8 +27,8 @@ The following options are accepted in the configuration file: .Pp .Bl -tag -width Ds -compact -.It Ic autogroup Ar group Dq windowclass -.It Ic autogroup Ar group Dq windowclass,windowname +.It Ic autogroup Ar group Ar windowclass +.It Ic autogroup Ar group Ar windowclass,windowname Control automatic window grouping, based on the class and/or name properties, where .Ar group