summary refs log tree commit diff
path: root/conf.c
Commit message (Collapse)AuthorAgeFilesLines
* cvsimportanton2018-02-191-14/+24
|\ | | | | | | | | | | | | | | | | * refs/heads/master: Do not print any parse errors when ~/.cwmrc is missing. Regression introduced in revision 1.109 of calmwm.c. Store the screen's visual type and colormap. Consolidate region 'view' and 'area'. limit scope of screen_apply_gap() Clean up conf_file/homedir and conf_init() bits.
| * Store the screen's visual type and colormap.okan2018-02-131-7/+6
| |
| * Clean up conf_file/homedir and conf_init() bits.okan2018-02-091-7/+18
| |
* | cvsimportokan2018-02-061-165/+146
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refs/heads/master: (28 commits) Use screen's saved view instead of re-querying the server. Slightly expand and expose verbose debugging. add debugging for x events Add a simple debug logging mechanism. Simplification; use asprintf where appropriate now. Use func attributes where appropriate. Fix wins comparison declaration since it's unsigned from XQueryTree(). Generate name_to_func[] in a clean and readable fashion. Shrink tier[] by one after removing matchname in r1.55. If the requested group number is invalid, bail but don't kill cwm. Quick fix: exit after a failed execvp in u_spawn instead; previously we did in u_exec, but the introduction of re-exec'ing the previous invocation of cwm if 'exec_wm' failed missed the 'exec' failing path. Will likely split out as a proper fix. Only exec the fallback when in CWM_EXEC_WM state. Typo, from Julien Steinhauser. Convert menu-exec-wm from an abritrary exec menu, into a config-based menu from 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. As done for buttonrelease, work specific un-cycling and un-highlighting actions into the keyrelease event, only performing what's actually needed for each; should result in much fewer events against keyreleases. No intended behaviour change. Merge group_toggle_membership_leave into the buttonrelease event and only do border work for a group/ungroup action. add helper function client_show to bring together like actions for unhide/raise Add support for re-exec'ing with SIGHUP; equivalent to the already built-in 'restart' function. Use poll and XNextEvent to replace XNextEvent blocking inside the x11 event handler. zap stray that snuck in ...
| * Simplification; use asprintf where appropriate now.okan2018-02-021-34/+26
| |
| * Generate name_to_func[] in a clean and readable fashion.okan2018-01-231-141/+105
| |
| * Convert menu-exec-wm from an abritrary exec menu, into a config-based menu fromokan2017-12-291-5/+28
| | | | | | | | | | | | | | | | 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.
| * Add support for _NET_WM_STATE_SKIP_PAGER and _NET_WM_STATE_SKIP_TASKBAR; eerilyokan2017-12-191-0/+2
| | | | | | | | | | | | | | close to cwm's 'ignore'. Roughly based on an initial diff from Walter Alejandro Iglesias, but with support for both Atoms and without cwm-based bindings.
* | cvsimportokan2017-12-071-1/+19
|\| | | | | | | | | | | | | | | | | * refs/heads/master: Original idea from Dimitris Papastamos to move windows to corners a while ago; re-proposed by Julien Steinhauser with an updated diff. Apparently this was in the original calmnwm. give command and group menus their own match callbacks stash dir into conf since it'll be of use organize this a bit better spacing
| * Original idea from Dimitris Papastamos to move windows to corners a while ago;okan2017-12-071-0/+18
| | | | | | | | | | | | | | | | | | re-proposed by Julien Steinhauser with an updated diff. Apparently this was in the original calmnwm. However, expand the original idea and let clients 'snap' to edges instead, neatly allowing key bindings that snap to adjacent edges (i.e. corners) as well. No default bindings assigned.
| * stash dir into conf since it'll be of useokan2017-12-071-1/+1
| |
* | cvsimportLeah Neukirchen2017-07-271-3/+3
|\| | | | | | | | | | | | | | | * refs/heads/master: Use the key names from keysymdef.h in the default key bindings list for clarification. remove extra parentheses Pull over the remaining re-implemented window move/resize functions and create a wrapper so that the key and mouse based move/resize callbacks can be unified. This has already been done with other window operations and menus. rename one function, matching others, to help upcoming change
| * Pull over the remaining re-implemented window move/resize functions and createokan2017-07-141-2/+2
| | | | | | | | | | a wrapper so that the key and mouse based move/resize callbacks can be unified. This has already been done with other window operations and menus.
| * rename one function, matching others, to help upcoming changeokan2017-07-121-1/+1
| |
* | cvsimportokan2017-05-091-104/+110
|\| | | | | | | | | | | | | | | | | * refs/heads/master: drop obsolete comment Alter callbacks to take a struct instead of a growing number of arguments; greatly simplifies upcoming work. Ensure clients stay within the viewable bounds on placement, even with empty borders; based on a patch from Vadim Vygonets. Clean up, unify and accurately calculate edge distance with client move/resize actions, so as to not lose windows off the edge. Switch bwidth type; unfortunately X11 is inconsistent.
| * Alter callbacks to take a struct instead of a growing number of arguments;okan2017-05-091-104/+110
| | | | | | | | greatly simplifies upcoming work.
* | cvsimportChristian Neukirchen2016-12-161-404/+382
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refs/heads/master: stray newlines Add search_print_text(), a default callback for mi->print in menu_filter(). While here, normalize the remaining search_print_* argument paramters. Consistent use of menuq_add for ssh menu. Now that dim.{x,y} are available early, use them before requiring a MotionNotify event. Set dim.{x,y} during client_init and update on resize, instead of (re)calculating only when applying hints. 'window-search' is spelled 'menu-window'; the former snuck in during the conversion('menu-window' already existed and was properlly documented); found the hard way by sthen@ while trying to convert. Fold unbinding functions into one for each, key and mouse; plugs a leak when unbinding a mouse button bound to a command. use the correct type Tame the number of 'exec' and 'path' search_match wrappers. No functional change now, though more can likely go later, losing the (paritally complete or incomplete/broken) argument completion bits. Switch ssh menu to search_match_text; like group/window/cmd menus, use only a substring match. The previous matching is only intended for the exec menus. Change 'menu-window' to display all windows; then add 'menu-window-hidden' for the previous behaviour of 'menu-window'. 'menu-window' becomes the default binding; use 'bind-mouse "1" menu-window-hidden' to restore old behaviour for those who prefer. Normalize bind function names, based on a few categories: window, group, menu and pointer. Use an additional check with lstat(2) when d_type is unknown. revert previous; upcoming changes will hopefully deal with these more naturally. Add a wrapper based upon xevent handlers around client move/resize for key and mouse bindings. Define callbacks, then default bindings. Reorganize for upcoming changes. Remove the (8) default bindings for pointer move since they conflict with default bindings for emacs, which wins; the feature remains and can be bound to whatever users wish with cwmrc(5).
| * stray newlinesokan2016-12-061-0/+1
| |
| * 'window-search' is spelled 'menu-window'; the former snuck in during theokan2016-12-061-1/+0
| | | | | | | | | | conversion('menu-window' already existed and was properlly documented); found the hard way by sthen@ while trying to convert.
| * Fold unbinding functions into one for each, key and mouse; plugs a leak whenokan2016-12-021-36/+10
| | | | | | | | unbinding a mouse button bound to a command.
| * use the correct typeokan2016-12-021-1/+1
| |
| * Change 'menu-window' to display all windows; then add 'menu-window-hidden' forokan2016-12-011-1/+4
| | | | | | | | | | | | | | | | the previous behaviour of 'menu-window'. 'menu-window' becomes the default binding; use 'bind-mouse "1" menu-window-hidden' to restore old behaviour for those who prefer. OK sthen@ (long long time ago on a different version)
| * Normalize bind function names, based on a few categories: window, group, menuokan2016-12-011-162/+200
| | | | | | | | | | | | | | | | 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.
| * revert previous; upcoming changes will hopefully deal with these moreokan2016-11-151-2/+2
| | | | | | | | naturally.
| * Add a wrapper based upon xevent handlers around client move/resize for key andokan2016-11-151-2/+2
| | | | | | | | mouse bindings.
| * Define callbacks, then default bindings.okan2016-11-141-78/+80
| |
| * Reorganize for upcoming changes.okan2016-11-141-286/+255
| |
| * Remove the (8) default bindings for pointer move since they conflict withokan2016-11-141-8/+0
| | | | | | | | | | | | | | default bindings for emacs, which wins; the feature remains and can be bound to whatever users wish with cwmrc(5). from mpi@
* | cvsimportokan2016-10-241-178/+187
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refs/heads/master: (34 commits) Make it clear these are flags. Remove duplicate check that strsubmatch() already does; while here, fix a comment. Sprinkle __func__ in appropriate error messages. Get rid of 'matchname'; it's too surprising to have the menu change during client search as different potential str matches are cycled through. If there's interest, the only string that doesn't exist in the listing is the window's class - that can be added of course, but it makes the line too long imho. clean up search_match_client(); no behaviour change Refactor callbacks to take a void * so as to not try and generalize into client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's based on context. remove another unused proto Rename 2 kbfunc to match closer to what they do Add an argument to the callbacks to pass the xevent context, button or key press. This allows to remove a few hacks to duplicate functions only for behaviour changes; now differing behaviours are pushed down to the callback. Also will allow for previously unavailable actions to be bind-able down the road. Check the ptr bounds in the new client during cycling, since not all actions do ptrsave, such as restoring client geometry; adapted from a diff by Vadim Vygonets. More accurate to say 'toggle', rather than 'select', for group[n]/nogroup. Add CM-a for 'nogroup' (CM-0 stays for now); update manpage to reflect. Stash wmname into conf. When removing xrandr regions, ensure clients are within the bounds of the screen; adapted from an ancient diff from Sviatoslav Chagaev. Things in this area will likely change, but put this in so it works now and serves as a reminder. Calculate client nameqlen in client_setname(), the only place it's needed/used. Turn CALMWM_NGROUPS define into variable, ngroups. Start simplifying menu code; and in turn, remove a cursor no longer needed. Defaults are split between defines and conf_init(); normalize these, as well as give 'sticky' groups its own variable. For both kb and mouse move, it is possible to grab a client and move it completely off the screen/region; instead, if the pointer is outside of the client bounds, warp the pointer to the closest edge before moving. client_ptrwarp should not deal with unhiding or raising clients (non ptr requests); most callers do this already - deal with the few that do not. client_ptrwarp becomes a simple wrapper (setpos) but it will be expanded. ...
| * Make it clear these are flags.okan2016-10-241-4/+4
| |
| * Sprinkle __func__ in appropriate error messages.okan2016-10-241-2/+2
| |
| * Refactor callbacks to take a void * so as to not try and generalize intookan2016-10-181-160/+146
| | | | | | | | | | | | | | | | client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's based on context. While here, limit some globals, replace defines with appropriate variables and fix some naming.
| * Rename 2 kbfunc to match closer to what they dookan2016-10-061-3/+3
| |
| * Add an argument to the callbacks to pass the xevent context, button orokan2016-10-061-11/+6
| | | | | | | | | | | | | | key press. This allows to remove a few hacks to duplicate functions only for behaviour changes; now differing behaviours are pushed down to the callback. Also will allow for previously unavailable actions to be bind-able down the road.
| * Add CM-a for 'nogroup' (CM-0 stays for now); update manpage to reflect.okan2016-10-051-0/+1
| |
| * Stash wmname into conf.okan2016-10-051-0/+2
| |
| * Calculate client nameqlen in client_setname(), the only place it'sokan2016-10-041-0/+1
| | | | | | | | needed/used.
| * Turn CALMWM_NGROUPS define into variable, ngroups.okan2016-10-041-0/+1
| |
| * Start simplifying menu code; and in turn, remove a cursor no longerokan2016-10-031-3/+2
| | | | | | | | needed.
| * Defaults are split between defines and conf_init(); normalize these, asokan2016-10-031-4/+5
| | | | | | | | well as give 'sticky' groups its own variable.
| * Use instinsic X11 functions for key/btn/ptr grab/ungrab/regrab requests;okan2016-09-301-6/+26
| | | | | | | | | | the one line wrappers provided no value and limited altering calls where needed; additionally, most of them had but one caller.
| * Mechanical change: move screen menu bits to their own struct.okan2016-09-291-3/+3
| |
| * Continue merging kb and mouse functions: foldokan2016-09-221-3/+6
| | | | | | | | | | | | mousefunc_menu_{client,cmd,group} into the respective kbfunc_menu_{client,cmd,group} functions; simply pass a flag down from config denoting mouse action behaviour.
* | cvsimportokan2016-09-141-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * refs/heads/master: Some clients fail to setup hints at all, so initalize for them; fallout from r1.218 switching to malloc - clearly missed this case. Fix-up a few simple uses of client_current(): check CLIENT_ACTIVE flag instead of relying on curcc. init label Limit mouse resize to hints within the client; matches kbd resize behaviour. Switch to just malloc since we need initialize most everything anyway. change 'sticky' to 'stick' to toggle client stickiness (seems the default binding worked for everyone for a long time!); conflict with group sticky found by Ali Farzanrad - thanks! Simplify group_holds_only_hidden(); from Vadim Vygonets. Simplify toggling flags; from Vadim Vygonets. Do not draw borders on ignored clients when returning from fullscreen; from Vadim Vygonets. Remove redundant minimum client size adjustment (minw and minh are always positive since r1.214); from Vadim Vygonets.
| * change 'sticky' to 'stick' to toggle client stickiness (seems theokan2016-09-121-2/+2
| | | | | | | | | | default binding worked for everyone for a long time!); conflict with group sticky found by Ali Farzanrad - thanks!
* | cvsimportmatthieu2016-08-131-1/+1
|\| | | | | | | | | | | * refs/heads/master: add a column to previous commit for consitency. conf_screen: report the fontname that can't be opened in case of failure. ok dcoppa@
| * add a column to previous commit for consitency.matthieu2016-08-131-1/+1
| |
| * conf_screen: report the fontname that can't be opened in case of failure.matthieu2016-08-131-1/+1
| | | | | | | | ok dcoppa@
* | cvsimportokan2015-11-171-1/+1
|\| | | | | | | | | | | | | * refs/heads/master: Fix a typo from r1.201; fixes window_grouptoggle binding. If a client does not set increment values, use 'moveamount' as a way to scale keyboard based resizes; extend kbfunc_amount(). Inline the only use of mousefunc_sweep_calc.
| * Fix a typo from r1.201; fixes window_grouptoggle binding.okan2015-11-171-1/+1
| |