speedwm-personal/mouse.h
2022-10-08 14:36:30 +02:00

51 lines
2.7 KiB
C

/* 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'.
*
* 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} },
{ ClkWinTitle, 0, Button3, spawn, RCMD("speedwm-utils") },
{ ClkRootWin, 0, Button3, spawn, RCMD(RUN_DESKTOP) },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button4, view, {0} },
{ ClkTagBar, 0, Button5, view, {0} },
};
/* Commands that will run when a part of the status bar is pressed. You can add:
* '\x<num>
* before you print anything. Keep in mind <num> MUST be two digits.
*
* It must also be wrapped in a printf. Example:
*
* Invalid: xsetroot -name "\x01This is a test"
* Valid: xsetroot -name "$(printf '\x01This is a test')"
*/
static const StatusCmd statuscmds[] = {
{ "module_ram  ", 1 },
{ "module_time  ", 2 },
{ "module_date  ", 3 },
{ "module_vol  ", 4 },
{ "module_weather  ", 5 },
{ "module_net  ", 6 },
{ "module_dfmpeg ", 7 },
{ "module_temp 糖", 8 },
};