Commit Graph

254 Commits

Author SHA1 Message Date
okan
496bcc879d whitespace 2022-02-26 15:19:18 +00:00
op
7c22b36a23 Add group-last command that shows only the previously active group; ok okan 2022-01-27 18:45:10 +00:00
okan
055b84f4d4 Do not attempt to grab keys without a keycode; this incidentally allows
XF86 keys support.

found and fix by Luis Henriques <henrix@camandro.org>
2021-11-19 19:13:14 +00:00
okan
6407eb9bc1 Allow configuring a percentage window size of the master window during
htile/vtile actions. From Uwe Werler, with a few manpage tweaks.
2020-04-16 13:32:35 +00:00
okan
96275a835d Unrelated style fixes, consistency changes and sorting, appropriate
dosage/removal of wrappers, simplification of name queue, client cycle joins
other kb/mb bound functions.
2020-02-27 14:56:39 +00:00
okan
d3410dd10d Map ('5') and allow mod5mask (altgr) as a modifier.
From Artturi Alm (though changed from 'm' to '5')
2020-02-03 16:38:02 +00:00
okan
b26202724a shuffle deck chairs: rename group actions to match intent for clarity 2019-03-07 12:54:21 +00:00
okan
0bda8f7606 Separate out the menu window from the client resize/move geom window; in each
case, create and destroy on-demand. Isolate more menu specific code.
2019-03-04 19:28:17 +00:00
okan
0c0551b8bf simplify xftcolor config 2019-03-04 13:33:39 +00:00
okan
9d25218458 Tie group number and name together during config. 2019-03-01 14:32:01 +00:00
okan
a5ba9aa9da Add 'group-close-[n]' action to close all windows within specified group.
heavily based on a diff from Nam Nguyen.
2019-02-25 16:40:49 +00:00
okan
535cf541c8 Rename internal functions to delinate between client remove, delete and xproto
delete; 'window-close' is now the proper action, but 'window-delete' as an
alias will remain until more interesting changes require breaking configs.
2019-02-22 19:40:32 +00:00
okan
c307e37dcb fix missing includes 2019-02-13 15:43:24 +00:00
okan
194589eb6b Allow 'transientfor' clients to inherit group and bwidth either during init or
via property notify events. Previously only the flags were set but nothing was
in the path to apply said flags and/or bwidth. Required slight of re-orgnaization
of client_init.
2018-11-13 17:37:13 +00:00
okan
b1929b5ed6 Store the screen's visual type and colormap. 2018-02-13 15:43:15 +00:00
okan
1a5f80bd0b Clean up conf_file/homedir and conf_init() bits. 2018-02-09 19:54:54 +00:00
okan
9bf750b054 Simplification; use asprintf where appropriate now. 2018-02-02 13:27:25 +00:00
okan
03a2e9cf05 Generate name_to_func[] in a clean and readable fashion. 2018-01-23 16:00:21 +00:00
okan
6e7dbf5bb7 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.

No objections and seems sensible to sthen.
2017-12-29 20:03:46 +00:00
okan
bc5215f41a Add support for _NET_WM_STATE_SKIP_PAGER and _NET_WM_STATE_SKIP_TASKBAR; eerily
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.
2017-12-19 14:30:53 +00:00
okan
0fc9d47fb4 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.

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.
2017-12-07 16:25:33 +00:00
okan
b06ddae624 stash dir into conf since it'll be of use 2017-12-07 15:47:14 +00:00
okan
c039e7fb8c 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.
2017-07-14 17:23:38 +00:00
okan
aefc0bf0fb rename one function, matching others, to help upcoming change 2017-07-12 16:56:26 +00:00
okan
113ffcf47e Alter callbacks to take a struct instead of a growing number of arguments;
greatly simplifies upcoming work.
2017-05-09 13:40:18 +00:00
okan
8b4666cb92 stray newlines 2016-12-06 21:59:33 +00:00
okan
cf4c1879e5 '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.
2016-12-06 15:03:13 +00:00
okan
cfffa70364 Fold unbinding functions into one for each, key and mouse; plugs a leak when
unbinding a mouse button bound to a command.
2016-12-02 17:02:17 +00:00
okan
5b7e66a13b use the correct type 2016-12-02 16:50:19 +00:00
okan
92111e526d 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.

OK sthen@ (long long time ago on a different version)
2016-12-01 18:17:52 +00:00
okan
d968a6c1bf Normalize bind function names, based on a few categories: window, group, menu
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-12-01 17:17:27 +00:00
okan
db02592e5c revert previous; upcoming changes will hopefully deal with these more
naturally.
2016-11-15 00:22:02 +00:00
okan
62dc5ae132 Add a wrapper based upon xevent handlers around client move/resize for key and
mouse bindings.
2016-11-15 00:07:03 +00:00
okan
ed22d7a944 Define callbacks, then default bindings. 2016-11-14 21:25:59 +00:00
okan
64e133b289 Reorganize for upcoming changes. 2016-11-14 19:56:05 +00:00
okan
98c913cc3b 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).

from mpi@
2016-11-14 13:52:33 +00:00
okan
db93599a0f Make it clear these are flags. 2016-10-24 20:44:08 +00:00
okan
eb43101591 Sprinkle __func__ in appropriate error messages. 2016-10-24 17:39:38 +00:00
okan
0bb1be86c6 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.

While here, limit some globals, replace defines with appropriate variables and
fix some naming.
2016-10-18 17:03:30 +00:00
okan
15bf703e1c Rename 2 kbfunc to match closer to what they do 2016-10-06 14:53:52 +00:00
okan
987ee736b9 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.
2016-10-06 14:41:19 +00:00
okan
c131620d7b Add CM-a for 'nogroup' (CM-0 stays for now); update manpage to reflect. 2016-10-05 13:35:17 +00:00
okan
d40820d3f3 Stash wmname into conf. 2016-10-05 13:10:59 +00:00
okan
5c13775d31 Calculate client nameqlen in client_setname(), the only place it's
needed/used.
2016-10-04 15:52:32 +00:00
okan
9306c1fbd3 Turn CALMWM_NGROUPS define into variable, ngroups. 2016-10-04 15:18:20 +00:00
okan
8aa5033d12 Start simplifying menu code; and in turn, remove a cursor no longer
needed.
2016-10-03 18:43:49 +00:00
okan
03f5dc219e Defaults are split between defines and conf_init(); normalize these, as
well as give 'sticky' groups its own variable.
2016-10-03 14:42:34 +00:00
okan
2d8f621b8d Use instinsic X11 functions for key/btn/ptr grab/ungrab/regrab requests;
the one line wrappers provided no value and limited altering calls where
needed; additionally, most of them had but one caller.
2016-09-30 18:28:06 +00:00
okan
0e8c706633 Mechanical change: move screen menu bits to their own struct. 2016-09-29 00:21:55 +00:00
okan
57b2a6cf79 Continue merging kb and mouse functions: fold
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.
2016-09-22 14:36:03 +00:00