From bec37f54b72ae4615d8f74ca2344f6cdab75baae Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Mon, 20 Nov 2023 01:15:52 +0200 Subject: [PATCH] refactor: delete mouse.c --- src/config/mouse.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/config/mouse.h b/src/config/mouse.h index 75c4c58..02f2d9f 100644 --- a/src/config/mouse.h +++ b/src/config/mouse.h @@ -22,8 +22,20 @@ enum { ClkClientWin, ClkRootWin, ClkLast }; /* clicks */ -#ifndef MOUSE_C -#include "mouse.c" -#endif +/* button definitions */ +/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ +static Button buttons[] = { + /* click event mask button function argument */ + {ClkTagBar, MODKEY, Button1, tag, {0}}, + {ClkTagBar, MODKEY, Button3, toggletag, {0}}, + {ClkWinTitle, 0, Button2, zoom, {0}}, + {ClkClientWin, MODKEY, Button1, movemouse, {0}}, + {ClkClientWin, MODKEY, Button2, togglefloating, {0}}, + {ClkClientWin, MODKEY, Button3, resizemouse, {0}}, + {ClkTagBar, 0, Button1, view, {0}}, + {ClkTagBar, 0, Button3, toggleview, {0}}, + {ClkTagBar, MODKEY, Button1, tag, {0}}, + {ClkTagBar, MODKEY, Button3, toggletag, {0}}, +}; #endif //MOUSE_H