mirror of
https://github.com/eRgo35/dwm.git
synced 2026-02-04 19:46:11 +01:00
Compare commits
3 Commits
688c3654cd
...
26303b95e9
| Author | SHA1 | Date | |
|---|---|---|---|
| 26303b95e9 | |||
| cc72b2eff6 | |||
| dfc7fb0e2e |
46
config.def.h
46
config.def.h
@@ -3,8 +3,14 @@
|
|||||||
#include <X11/XF86keysym.h>
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
/* Helper macros for spawning commands */
|
/* Helper macros for spawning commands */
|
||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
#define SHCMD(cmd) \
|
||||||
#define CMD(...) { .v = (const char*[]){ __VA_ARGS__, NULL } }
|
{ \
|
||||||
|
.v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } \
|
||||||
|
}
|
||||||
|
#define CMD(...) \
|
||||||
|
{ \
|
||||||
|
.v = (const char *[]) { __VA_ARGS__, NULL } \
|
||||||
|
}
|
||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
#if ROUNDED_CORNERS_PATCH
|
#if ROUNDED_CORNERS_PATCH
|
||||||
@@ -57,7 +63,13 @@ static const int topbar = 1; /* 0 means bottom bar */
|
|||||||
/* Display modes of the tab bar: never shown, always shown, shown only in */
|
/* Display modes of the tab bar: never shown, always shown, shown only in */
|
||||||
/* monocle mode in the presence of several windows. */
|
/* monocle mode in the presence of several windows. */
|
||||||
/* Modes after showtab_nmodes are disabled. */
|
/* Modes after showtab_nmodes are disabled. */
|
||||||
enum showtab_modes { showtab_never, showtab_auto, showtab_nmodes, showtab_always};
|
enum showtab_modes
|
||||||
|
{
|
||||||
|
showtab_never,
|
||||||
|
showtab_auto,
|
||||||
|
showtab_nmodes,
|
||||||
|
showtab_always
|
||||||
|
};
|
||||||
static const int showtab = showtab_auto; /* Default tab bar show mode */
|
static const int showtab = showtab_auto; /* Default tab bar show mode */
|
||||||
static const int toptab = False; /* False means bottom tab bar */
|
static const int toptab = False; /* False means bottom tab bar */
|
||||||
#endif // TAB_PATCH
|
#endif // TAB_PATCH
|
||||||
@@ -900,8 +912,7 @@ static const char *dmenucmd[] = {
|
|||||||
#if BAR_DMENUMATCHTOP_PATCH
|
#if BAR_DMENUMATCHTOP_PATCH
|
||||||
topbar ? NULL : "-b",
|
topbar ? NULL : "-b",
|
||||||
#endif // BAR_DMENUMATCHTOP_PATCH
|
#endif // BAR_DMENUMATCHTOP_PATCH
|
||||||
NULL
|
NULL};
|
||||||
};
|
|
||||||
static const char *termcmd[] = {"kitty", NULL};
|
static const char *termcmd[] = {"kitty", NULL};
|
||||||
static const char *prtscrcmd[] = {"flameshot", "gui", NULL};
|
static const char *prtscrcmd[] = {"flameshot", "gui", NULL};
|
||||||
static const char *mutevol[] = {"pactl", "set-sink-mute", "0", "toggle", NULL};
|
static const char *mutevol[] = {"pactl", "set-sink-mute", "0", "toggle", NULL};
|
||||||
@@ -970,6 +981,7 @@ static const Key keys[] = {
|
|||||||
// { 0, XF86XK_Search, spawn, {.v = search}},
|
// { 0, XF86XK_Search, spawn, {.v = search}},
|
||||||
/*{ 0, XF86XK_LaunchA, alttabstart, {0}},*/
|
/*{ 0, XF86XK_LaunchA, alttabstart, {0}},*/
|
||||||
{0, XF86XK_Explorer, spawn, {.v = explorer}},
|
{0, XF86XK_Explorer, spawn, {.v = explorer}},
|
||||||
|
|
||||||
{MODKEY | Mod1Mask, XK_F1, spawn, {.v = upvol}},
|
{MODKEY | Mod1Mask, XK_F1, spawn, {.v = upvol}},
|
||||||
{MODKEY | Mod1Mask, XK_F3, spawn, {.v = downvol}},
|
{MODKEY | Mod1Mask, XK_F3, spawn, {.v = downvol}},
|
||||||
{MODKEY, XK_n, spawn, {.v = nemo}},
|
{MODKEY, XK_n, spawn, {.v = nemo}},
|
||||||
@@ -1392,8 +1404,7 @@ static const Key keys[] = {
|
|||||||
TAGKEYS(XK_6, 5)
|
TAGKEYS(XK_6, 5)
|
||||||
TAGKEYS(XK_7, 6)
|
TAGKEYS(XK_7, 6)
|
||||||
TAGKEYS(XK_8, 7)
|
TAGKEYS(XK_8, 7)
|
||||||
TAGKEYS( XK_9, 8)
|
TAGKEYS(XK_9, 8)};
|
||||||
};
|
|
||||||
|
|
||||||
#if KEYMODES_PATCH
|
#if KEYMODES_PATCH
|
||||||
static const Key cmdkeys[] = {
|
static const Key cmdkeys[] = {
|
||||||
@@ -1421,6 +1432,23 @@ static const Command commands[] = {
|
|||||||
};
|
};
|
||||||
#endif // KEYMODES_PATCH
|
#endif // KEYMODES_PATCH
|
||||||
|
|
||||||
|
// Mouse: Logitech G502 Hero
|
||||||
|
// Buttons 1-5 defined in library already
|
||||||
|
// Button1 // left click
|
||||||
|
// Button2 // middle click
|
||||||
|
// Button3 // right click
|
||||||
|
// Button4 // scroll wheel up
|
||||||
|
// Button5 // scroll wheel down
|
||||||
|
#define Button6 6 // scroll wheel left
|
||||||
|
#define Button7 7 // scroll wheel right
|
||||||
|
#define Button8 8 // back button
|
||||||
|
#define Button9 9 // forward button
|
||||||
|
#define Button10 10 // undefined
|
||||||
|
#define Button11 11 // extra thumb button
|
||||||
|
#define Button12 12 // top middle button
|
||||||
|
#define Button13 13 // left bottom extra button
|
||||||
|
#define Button14 14 // left top extra button
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
#if STATUSBUTTON_PATCH
|
#if STATUSBUTTON_PATCH
|
||||||
/* click can be ClkButton, ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
/* click can be ClkButton, ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||||
@@ -1429,6 +1457,10 @@ static const Command commands[] = {
|
|||||||
#endif //
|
#endif //
|
||||||
static const Button buttons[] = {
|
static const Button buttons[] = {
|
||||||
/* click event mask button function argument */
|
/* click event mask button function argument */
|
||||||
|
{ClkClientWin, 0, Button11, spawn, {.v = mutemic}},
|
||||||
|
{ClkClientWin, 0, Button12, spawn, {.v = termcmd}},
|
||||||
|
{ClkClientWin, 0, Button13, spawn, {.v = downvol}},
|
||||||
|
{ClkClientWin, 0, Button14, spawn, {.v = upvol}},
|
||||||
#if BAR_STATUSBUTTON_PATCH
|
#if BAR_STATUSBUTTON_PATCH
|
||||||
{ClkButton, 0, Button1, spawn, {.v = dmenucmd}},
|
{ClkButton, 0, Button1, spawn, {.v = dmenucmd}},
|
||||||
#endif // BAR_STATUSBUTTON_PATCH
|
#endif // BAR_STATUSBUTTON_PATCH
|
||||||
|
|||||||
Reference in New Issue
Block a user