speedwm-personal/mouse.h

52 lines
3 KiB
C
Raw Normal View History

/* Mouse bindings
*
* This header contains mouse binds.
* Change them, or remove them if you prefer. You can also add more if you want.
* Once you're done with your edits, run 'make clean install'.
2022-09-03 16:46:19 +02:00
*
* To disable all mouse binds, edit toggle.h.
*/
/* Actions when the mouse clicks a part of the screen */
static const Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button3, layoutmenu, {0} },
{ ClkLtSymbol, 0, Button1, cyclelayout, {.i = +1 } },
{ ClkLtSymbol, 0, Button2, cyclelayout, {.i = -1 } },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkClientWin, MODIFIER1|ControlMask, Button3, dragcfact, {0} },
{ ClkClientWin, MODIFIER1, Button1, moveorplace, {.i = 1} },
{ ClkClientWin, MODIFIER1, Button2, togglefloating, {0} },
{ ClkClientWin, MODIFIER1, Button3, resizemouse, {0} },
{ ClkStatusText, 0, Button1, spawn, {.v = statuscmd } },
{ ClkStatusText, 0, Button2, spawn, {.v = statuscmd } },
{ ClkStatusText, 0, Button3, spawn, {.v = statuscmd } },
{ ClkWinTitle, 0, Button1, togglewin, {0} },
2022-09-11 14:20:26 +02:00
{ ClkWinTitle, 0, Button3, spawn, RCMD("speedwm-utils") },
2022-10-02 22:59:51 +02:00
{ ClkRootWin, 0, Button3, spawn, RCMD(RUN_DESKTOP) },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button4, view, {0} },
{ ClkTagBar, 0, Button5, view, {0} },
2022-10-05 21:32:49 +02:00
#if USETOUCH
{ ClkClientWin, MODIFIER1, Button4, touchpad, {.v = &scrollargs[0]} },
{ ClkClientWin, MODIFIER1, Button5, touchpad, {.v = &scrollargs[1]} },
{ ClkClientWin, MODIFIER1, Button6, touchpad, {.v = &scrollargs[2]} },
{ ClkClientWin, MODIFIER1, Button7, touchpad, {.v = &scrollargs[3]} },
#endif
};
/* Commands that will run when a part of the status bar is pressed
* Built in status bar does not have support for this yet but you can add it by adding:
2022-08-28 02:38:33 +02:00
* '\<num>
* before you print anything. Keep in mind <num> MUST be two digits.
*
* Invalid: xsetroot -name "\x01This is a test"
* Valid: xsetroot -name "$(printf '\x01This is a test')"
*/
static const StatusCmd statuscmds[] = {
{ "notify-send 'Status item (1) was pressed.'", 1 },
{ "notify-send 'Status item (2) was pressed.'", 2 },
{ "notify-send 'Status item (3) was pressed.'", 3 },
};