aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorokan2017-12-07 16:25:33 +0000
committerokan2017-12-07 16:25:33 +0000
commit2cc69c661a1ffb9a7de17e1a58657701edda41a6 (patch)
tree1c9ba804879910dc00c47fe859fef891478b8c5a /conf.c
parentc41a4e4f8740a3150cb0ed54c5972e075f503b74 (diff)
downloadcwm-2cc69c661a1ffb9a7de17e1a58657701edda41a6.tar.gz
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.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 1405f20..d0b4503 100644
--- a/conf.c
+++ b/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: conf.c,v 1.234 2017/12/07 15:47:14 okan Exp $
+ * $OpenBSD: conf.c,v 1.235 2017/12/07 16:25:33 okan Exp $
*/
#include <sys/types.h>
@@ -92,6 +92,24 @@ static const struct {
{ "window-movetogroup-8", kbfunc_client_movetogroup, CWM_CONTEXT_CC, 8 },
{ "window-movetogroup-9", kbfunc_client_movetogroup, CWM_CONTEXT_CC, 9 },
+ { "window-snap-up", kbfunc_client_snap, CWM_CONTEXT_CC,
+ (CWM_UP) },
+ { "window-snap-down", kbfunc_client_snap, CWM_CONTEXT_CC,
+ (CWM_DOWN) },
+ { "window-snap-left", kbfunc_client_snap, CWM_CONTEXT_CC,
+ (CWM_LEFT) },
+ { "window-snap-right", kbfunc_client_snap, CWM_CONTEXT_CC,
+ (CWM_RIGHT) },
+
+ { "window-snap-up-right", kbfunc_client_snap, CWM_CONTEXT_CC,
+ (CWM_UP|CWM_RIGHT) },
+ { "window-snap-up-left", kbfunc_client_snap, CWM_CONTEXT_CC,
+ (CWM_UP|CWM_LEFT) },
+ { "window-snap-down-right", kbfunc_client_snap, CWM_CONTEXT_CC,
+ (CWM_DOWN|CWM_RIGHT) },
+ { "window-snap-down-left", kbfunc_client_snap, CWM_CONTEXT_CC,
+ (CWM_DOWN|CWM_LEFT) },
+
{ "window-move", kbfunc_client_move, CWM_CONTEXT_CC, 0 },
{ "window-move-up", kbfunc_client_move, CWM_CONTEXT_CC,
(CWM_UP) },