On Wed 2022.05.25 at 05:05 +0300, u...@mailo.com wrote:
> > > There are 2 special `command`s: `term` and `lock`.  
> > 
> > No, there are two special commands: 'terminal' and 'lock'.
> > 
> > You probably want:
> > 
> > bind-key M-Return terminal
> 
> I see, so there are  https://man.openbsd.org/cwmrc#command
> 
> command term ...
> command lock ...
> 
> but https://man.openbsd.org/cwmrc#BIND_FUNCTION_LIST
> 
> bind-key ... terminal
> bind-key ... lock
> 
> lock is lock,
> term is terminal.
> 
> Unexpected, TBH, and confusing...
> 
> That works, thank you Crystal

Yes, that seems to be inconsistent and overlooked long time ago, and
this is the first I recall of someone noticing it! I'm hesitant to
change grammer at the moment for just this.  The more appropriate way
might be to change 'term' to 'terminal' across the board, but that
likely breaks more configs - again, not worth it imho now.

Maybe just allowing 'term' in bindings is enough without documenting;
then when some grammer changes are required for something more
substantial, it can be unified better at that time.

Any users or okay's for this?

Index: conf.c
===================================================================
RCS file: /home/open/cvs/xenocara/app/cwm/conf.c,v
retrieving revision 1.255
diff -u -p -r1.255 conf.c
--- conf.c      26 Feb 2022 15:19:18 -0000      1.255
+++ conf.c      25 May 2022 12:21:19 -0000
@@ -186,6 +186,7 @@ static const struct {
        { FUNC_SC(menu-exec, menu_exec, 0) },
        { FUNC_SC(menu-exec-wm, menu_wm, 0) },
 
+       { FUNC_SC(term, exec_term, 0) }, /* since command is 'term' */
        { FUNC_SC(terminal, exec_term, 0) },
        { FUNC_SC(lock, exec_lock, 0) },
        { FUNC_SC(restart, cwm_status, CWM_EXEC_WM) },

Reply via email to