aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y (unfollow)
Commit message (Collapse)AuthorLines
2022-01-17Allow bare numbers for key and mouse bindings; taken from similar support in ↵okan-6/+17
other parse.y's; from Leon Fischer <lfischer@airmail.cc>.
2021-12-03sync parse.y changes from base; ok naddy@okan-11/+11
original from naddy@: > Don't declare variables as "unsigned char *" that are passed to > functions that take "char *" arguments. Where such chars are > assigned to int or passed to ctype functions, explicitly cast them > to unsigned char. > > For OpenBSD's clang, -Wpointer-sign has been disabled by default, > but when the parse.y code was built elsewhere, the compiler would > complain. > > With help from millert@ > ok benno@ deraadt@
2021-04-27Add BSD compatibility functions and headersWynn Wolf Arbor-1/+1
Original file locations in the OpenBSD tree: - lib/libc/stdlib/reallocarray.c - lib/libc/stdlib/strtonum.c - lib/libc/string/strlcat.c - lib/libc/string/strlcpy.c - sys/sys/queue.h
2021-04-27Revert "use u_char for buffers in yylex"Wynn Wolf Arbor-5/+5
This reverts commit 603548105b9bf9ffd11eb053e62db99f9433e821. Using u_char instead of char will generate signedness warnings for strtonum(), lookup(), and xstrdup().
2020-04-18Allow configuring a percentage window size of the master window during ↵okan-2/+18
htile/vtile actions. From Uwe Werler, with a few manpage tweaks.
2018-11-09merge from base, from sashan@:okan-2/+3
> - odd condition/test in PF lexer > (and other lexers too) > > This commit rectifies earlier change: > > in the lex... even inside quotes, a \ followed by space or tab should > expand to space or tab, and a \ followed by newline should be ignored > (as a line continuation). compatible with the needs of hoststated > (which has the most strict quoted string requirements), and ifstated > (where one commonly does line continuations in strings). > > OK deraadt@, OK millert@
2018-02-19Do not print any parse errors when ~/.cwmrc is missing. Regression introduced inanton-11/+11
revision 1.109 of calmwm.c. ok okan@
2018-02-02Simplification; use asprintf where appropriate now.okan-5/+7
2017-12-29Convert menu-exec-wm from an abritrary exec menu, into a config-based menu fromokan-2/+13
which one may configure (wm <name> <path_and_args>) (and choose) specific window managers to replace the running one. 'wm cwm cwm' is included by default. No objections and seems sensible to sthen.
2017-04-26Switch bwidth type; unfortunately X11 is inconsistent.okan-2/+2
2016-12-01Normalize bind function names, based on a few categories: window, group, menuokan-17/+36
and pointer. Replace 'bind' and 'mousebind' options with 'bind-key' and 'bind-mouse', respectively, replace special 'unmap' keyword with 'unbind-key' and 'unbind-mouse', and additionally allow unbinding all with 'all' keyword.
2016-11-14Define callbacks, then default bindings.okan-2/+2
2016-10-03Defaults are split between defines and conf_init(); normalize these, asokan-5/+2
well as give 'sticky' groups its own variable.
2015-05-17Fix autogroup so name,class doesn't need to be quoted.kspillner-1/+12
ok okan@ on an older version of this diff
2015-05-17Make window name and window class separate parameters to conf_autogroup.kspillner-2/+2
No functional change, but will be used shortly. ok okan@
2015-02-14simplify error messages; discussed with doug@okan-7/+6
2015-01-19Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAXokan-2/+2
and HOST_NAME_MAX+1, respectively. ok doug@
2015-01-17Catch up with src parse.y changes by jsg@:okan-1/+4
Don't allow embedded nul characters in strings. Fixes a pfctl crash with an anchor name containing an embedded nul found with the afl fuzzer. pfctl parse.y patch from and ok deraadt@
2015-01-16Add gcc format attributes for yyerror(); fix a few yyerror() calls.okan-7/+9
Adapted from src parse.y changes by doug@. OK doug@
2014-01-30re-add lost free from previousokan-1/+2
2014-01-30Switch ignoreq to winname struct since it's basically the same thing;okan-7/+2
removes limit on name matching.
2014-01-29Check command name/path for truncation and provide user feedback duringokan-2/+7
config parse (and use conf_cmd_add to populate defaults); based on a discussion with Tiago Cunha. While this looks ugly, there are likely some other changes here to come.
2014-01-28Check ignore windowname for truncation and provide user feedback duringokan-2/+6
config parse; based on a discussion with Tiago Cunha.
2014-01-28Move conf_init/clear into main - no behaviour change; from Tiago Cunha.okan-7/+2
2014-01-27simplify parse_config using assignment; inspired by a very old diff fromokan-58/+3
Tiago Cunha.
2014-01-24more range checkingokan-5/+8
2014-01-20constify and rename some confusing variables around cmdq.okan-2/+2
2014-01-20 - remove redundant range check for buttons in conf_bind_mouse.okan-2/+7
- make conf_bind_kbd return error on non-matches to match what conf_bind_mouse does. - rename some variables while here for clarity. - constify bind and cmd. from Tiago Cunha.
2013-12-13Add support for XUrgency and matching _NET_WM_STATE_DEMANDS_ATTENTIONokan-2/+7
ewmh hint; urgencyborder is configurable. The urgency flag will stick, even while on a client in a non-viewable group, until the client receives focus (where the border is reset). Initial diff from Thomas Adam with some changes/enhancements from me.
2013-11-25Log message:benno-6/+6
use u_char for buffers in yylex, for ctype calls, as done in all other parse.y in the tree found by millert@, ok okan@
2013-07-16max -> nitemsokan-2/+2
2013-07-08clarify kbd vs mouse functionsokan-3/+3
2013-06-03Unlike other parse.y variants, cwm's allowed 'command xx /path/to/xx' withoutsthen-4/+4
quotes. Reinstate this support lost in recent sync diff and add a comment to show that it's intentional. ok okan@
2013-05-22move validation of pointer Button into conf_mousebind so we checkokan-2/+7
validity during the parse phase and not bother adding it to the queue, instead of each time a client needs to grab (when it's too late); furthermore, make this a config error, stop parsing and load the default config.
2013-05-22sync with src changesokan-31/+34
2013-05-19- switch border colors to Xftokan-13/+10
- merge border/menu color structures/functions since they now both use Xft - switch xu_xorcolor to operating on XftColor instead of just XRenderColor (basically adding pixel) - if color name allocation fails, revert back to default (this, along with font validation should occur during config parse, but we don't have screens setup yet - likely to change at some point)
2013-05-06negative values for borderwith, moveamount, snapdist and gap areokan-3/+19
configuration errors, so warn and load defaults.
2013-04-17add conf_ignore and move group_make_autogroup to conf_autogroup to match.okan-8/+3
2013-01-04really these are just border colors, so adjust the defineokan-2/+2
2013-01-04get rid of struct colorokan-10/+10
2012-12-19gc unused cmd 'flags' variableokan-2/+2
2012-12-17knfokan-2/+2
2012-12-17non-trivial menu drawing rewrite, moving to Xft and solving variousokan-8/+17
font/color drawing issues; from Alexander Polakov
2012-10-31no longer a reason to carry conf_path in struct conf, so dice.okan-3/+1
2011-09-08allow configurable menu font color; from Alexander Polakov with a tweakokan-2/+7
from me. ok oga@
2011-09-08allow menufg/menubg to be configurable; from Alexander Polakov.okan-1/+12
ok oga@
2011-09-03"defaultfont" is unclear (and confusing while reading code) when it alsookan-4/+4
applies to the user supplied font, so rename. ok oga@
2011-08-22revert r1.11 of parse.y and create logic in conf_setup instead to dealokan-3/+1
with the various scenarios of when to attempt a parse of the config, load defaults, and when to warn and/or exit. triggered by bogus warning first noticed by sobrado@. ok oga@
2011-07-25We are inconsistent when it comes to function returns, so just go allokan-5/+5
the way with the cwm specific parts. ok oga@
2011-07-14correct spelling; from Alexander Polakov.okan-3/+3