dwm

Kris's build of dwm
git clone git clone https://git.krisyotam.com/krisyotam/dwm.git
Log | Files | Refs | README | LICENSE

config.def.h (109769B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 #include <X11/XF86keysym.h>
      4 
      5 /* Constants */
      6 #define MYTERM "st"
      7 #define MYBROWSER "librewolf"
      8 
      9 /* Helper macros for spawning commands */
     10 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
     11 #define CMD(...)   { .v = (const char*[]){ __VA_ARGS__, NULL } }
     12 
     13 /* appearance */
     14 #if ROUNDED_CORNERS_PATCH
     15 static const unsigned int borderpx       = 0;   /* border pixel of windows */
     16 static const int corner_radius           = 10;
     17 #else
     18 static const unsigned int borderpx       = 3;   /* border pixel of windows */
     19 #endif // ROUNDED_CORNERS_PATCH
     20 #if BAR_BORDER_PATCH
     21 /* This allows the bar border size to be explicitly set separately from borderpx.
     22  * If left as 0 then it will default to the borderpx value of the monitor and will
     23  * automatically update with setborderpx. */
     24 static const unsigned int barborderpx    = 0;  /* border pixel of bar */
     25 #endif // BAR_BORDER_PATCH
     26 static const unsigned int snap           = 32;  /* snap pixel */
     27 #if SWALLOW_PATCH
     28 static const int swallowfloating         = 0;   /* 1 means swallow floating windows by default */
     29 #endif // SWALLOW_PATCH
     30 #if BAR_TAGPREVIEW_PATCH
     31 static const int scalepreview            = 4;        /* Tag preview scaling */
     32 #endif // BAR_TAGPREVIEW_PATCH
     33 #if NO_MOD_BUTTONS_PATCH
     34 static int nomodbuttons                  = 1;   /* allow client mouse button bindings that have no modifier */
     35 #endif // NO_MOD_BUTTONS_PATCH
     36 #if VANITYGAPS_PATCH
     37 static const unsigned int gappih         = 20;  /* horiz inner gap between windows */
     38 static const unsigned int gappiv         = 10;  /* vert inner gap between windows */
     39 static const unsigned int gappoh         = 10;  /* horiz outer gap between windows and screen edge */
     40 static const unsigned int gappov         = 30;  /* vert outer gap between windows and screen edge */
     41 static const int smartgaps_fact          = 1;   /* gap factor when there is only one client; 0 = no gaps, 3 = 3x outer gaps */
     42 #endif // VANITYGAPS_PATCH
     43 #if AUTOSTART_PATCH
     44 static const char autostartblocksh[]     = "autostart_blocking.sh";
     45 static const char autostartsh[]          = "autostart.sh";
     46 static const char dwmdir[]               = "dwm";
     47 static const char localshare[]           = ".local/share";
     48 #endif // AUTOSTART_PATCH
     49 #if BAR_ANYBAR_PATCH
     50 static const int usealtbar               = 1;        /* 1 means use non-dwm status bar */
     51 static const char *altbarclass           = "Polybar"; /* Alternate bar class name */
     52 static const char *altbarcmd             = "$HOME/bar.sh"; /* Alternate bar launch command */
     53 #endif // BAR_ANYBAR_PATCH
     54 #if BAR_HOLDBAR_PATCH
     55 static const int showbar                 = 0;   /* 0 means no bar */
     56 #else
     57 static const int showbar                 = 1;   /* 0 means no bar */
     58 #endif // BAR_HOLDBAR_PATCH
     59 static const int topbar                  = 1;   /* 0 means bottom bar */
     60 #if TAB_PATCH
     61 /*  Display modes of the tab bar: never shown, always shown, shown only in  */
     62 /*  monocle mode in the presence of several windows.                        */
     63 /*  Modes after showtab_nmodes are disabled.                                */
     64 enum showtab_modes { showtab_never, showtab_auto, showtab_nmodes, showtab_always};
     65 static const int showtab                 = showtab_auto;        /* Default tab bar show mode */
     66 static const int toptab                  = False;               /* False means bottom tab bar */
     67 #endif // TAB_PATCH
     68 #if BAR_HEIGHT_PATCH
     69 static const int bar_height              = 0;   /* 0 means derive from font, >= 1 explicit height */
     70 #endif // BAR_HEIGHT_PATCH
     71 #if BAR_PADDING_PATCH
     72 static const int vertpad                 = 10;  /* vertical padding of bar */
     73 static const int sidepad                 = 10;  /* horizontal padding of bar */
     74 #endif // BAR_PADDING_PATCH
     75 #if BAR_WINICON_PATCH
     76 #define ICONSIZE 20    /* icon size */
     77 #define ICONSPACING 5  /* space between icon and title */
     78 #endif // BAR_WINICON_PATCH
     79 #if FOCUSONCLICK_PATCH
     80 static const int focusonwheel            = 0;
     81 #endif // FOCUSONCLICK_PATCH
     82 #if FLOATPOS_PATCH
     83 static int floatposgrid_x                = 5;  /* float grid columns */
     84 static int floatposgrid_y                = 5;  /* float grid rows */
     85 #endif // FLOATPOS_PATCH
     86 #if RIODRAW_PATCH
     87 static const char slopspawnstyle[]       = "-t 0 -c 0.92,0.85,0.69,0.3 -o"; /* do NOT define -f (format) here */
     88 static const char slopresizestyle[]      = "-t 0 -c 0.92,0.85,0.69,0.3"; /* do NOT define -f (format) here */
     89 static const int riodraw_borders         = 0;  /* 0 or 1, indicates whether the area drawn using slop includes the window borders */
     90 #if SWALLOW_PATCH
     91 static const int riodraw_matchpid        = 1;  /* 0 or 1, indicates whether to match the PID of the client that was spawned with riospawn */
     92 #endif // SWALLOW_PATCH
     93 #endif // RIODRAW_PATCH
     94 /* Status is to be shown on: -1 (all monitors), 0 (a specific monitor by index), 'A' (active monitor) */
     95 #if BAR_STATUSALLMONS_PATCH
     96 static const int statusmon               = -1;
     97 #elif BAR_STATICSTATUS_PATCH
     98 static const int statusmon               = 0;
     99 #else
    100 static const int statusmon               = 'A';
    101 #endif // BAR_STATUSALLMONS_PATCH | BAR_STATICSTATUS_PATCH
    102 #if BAR_STATUSPADDING_PATCH
    103 static const int horizpadbar             = 2;   /* horizontal padding for statusbar */
    104 static const int vertpadbar              = 0;   /* vertical padding for statusbar */
    105 #endif // BAR_STATUSPADDING_PATCH
    106 #if BAR_STATUSBUTTON_PATCH
    107 static const char buttonbar[]            = "<O>";
    108 #endif // BAR_STATUSBUTTON_PATCH
    109 #if BAR_SYSTRAY_PATCH
    110 static const unsigned int systrayspacing = 2;   /* systray spacing */
    111 static const int showsystray             = 1;   /* 0 means no systray */
    112 #endif // BAR_SYSTRAY_PATCH
    113 #if BAR_TAGLABELS_PATCH
    114 static const char ptagf[] = "[%s %s]";          /* format of a tag label */
    115 static const char etagf[] = "[%s]";             /* format of an empty tag */
    116 static const int lcaselbl = 0;                  /* 1 means make tag label lowercase */
    117 #endif // BAR_TAGLABELS_PATCH
    118 #if BAR_UNDERLINETAGS_PATCH
    119 static const unsigned int ulinepad = 5;         /* horizontal padding between the underline and tag */
    120 static const unsigned int ulinestroke  = 2;     /* thickness / height of the underline */
    121 static const unsigned int ulinevoffset = 0;     /* how far above the bottom of the bar the line should appear */
    122 static const int ulineall = 0;                  /* 1 to show underline on all tags, 0 for just the active ones */
    123 #endif // BAR_UNDERLINETAGS_PATCH
    124 
    125 #if NAMETAG_PATCH
    126 #if NAMETAG_PREPEND_PATCH
    127 /* The format in which the tag is written when named. E.g. %d: %.12s will write the tag number
    128  * followed the first 12 characters of the given string. You can also just use "%d: %s" here. */
    129 #define NAMETAG_FORMAT "%d: %.12s"
    130 #else
    131 #define NAMETAG_FORMAT "%s"
    132 #endif // NAMETAG_PREPEND_PATCH
    133 /* The maximum amount of bytes reserved for each tag text. */
    134 #define MAX_TAGLEN 16
    135 /* The command to run (via popen). This can be tailored by adding a prompt, passing other command
    136  * line arguments or providing name options. Optionally you can use other dmenu like alternatives
    137  * like rofi -dmenu. */
    138 #define NAMETAG_COMMAND "dmenu < /dev/null"
    139 #endif // NAMETAG_PATCH
    140 
    141 #if ALT_TAB_PATCH
    142 /* alt-tab configuration */
    143 static const unsigned int tabmodkey        = 0x40; /* (Alt) when this key is held down the alt-tab functionality stays active. Must be the same modifier as used to run alttabstart */
    144 static const unsigned int tabcyclekey      = 0x17; /* (Tab) when this key is hit the menu moves one position forward in client stack. Must be the same key as used to run alttabstart */
    145 static const unsigned int tabposy          = 1;    /* tab position on Y axis, 0 = top, 1 = center, 2 = bottom */
    146 static const unsigned int tabposx          = 1;    /* tab position on X axis, 0 = left, 1 = center, 2 = right */
    147 static const unsigned int maxwtab          = 600;  /* tab menu width */
    148 static const unsigned int maxhtab          = 200;  /* tab menu height */
    149 #endif // ALT_TAB_PATCH
    150 
    151 /* Indicators: see patch/bar_indicators.h for options */
    152 static int tagindicatortype              = INDICATOR_TOP_LEFT_SQUARE;
    153 static int tiledindicatortype            = INDICATOR_NONE;
    154 static int floatindicatortype            = INDICATOR_TOP_LEFT_SQUARE;
    155 #if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
    156 static int fakefsindicatortype           = INDICATOR_PLUS;
    157 static int floatfakefsindicatortype      = INDICATOR_PLUS_AND_LARGER_SQUARE;
    158 #endif // FAKEFULLSCREEN_CLIENT_PATCH
    159 #if ALWAYSONTOP_PATCH
    160 static int aotindicatortype              = INDICATOR_TOP_LEFT_LARGER_SQUARE;
    161 #endif // ALWAYSONTOP_PATCH
    162 #if ONLYQUITONEMPTY_PATCH
    163 static const int quit_empty_window_count = 0;   /* only allow dwm to quit if no (<= count) windows are open */
    164 #endif // ONLYQUITONEMPTY_PATCH
    165 #if BAR_EXTRASTATUS_PATCH
    166 static const char statussep              = ';'; /* separator between status bars */
    167 #endif // BAR_EXTRASTATUS_PATCH
    168 #if BAR_TABGROUPS_PATCH
    169 #if MONOCLE_LAYOUT
    170 static void (*bartabmonfns[])(Monitor *) = { monocle /* , customlayoutfn */ };
    171 #else
    172 static void (*bartabmonfns[])(Monitor *) = { NULL /* , customlayoutfn */ };
    173 #endif // MONOCLE_LAYOUT
    174 #endif // BAR_TABGROUPS_PATCH
    175 #if BAR_PANGO_PATCH
    176 static const char font[]                 = "monospace 10";
    177 #else
    178 static const char *fonts[]               = { "JetBrainsMono Nerd Font:size=11", "Symbols Nerd Font:pixelsize=16:antialias=true:autohint=true" };
    179 #endif // BAR_PANGO_PATCH
    180 static const char dmenufont[]            = "JetBrainsMono Nerd Font:size=10";
    181 
    182 static char c000000[]                    = "#000000"; // placeholder value
    183 
    184 static char normfgcolor[]                = "#bbbbbb";
    185 static char normbgcolor[]                = "#222222";
    186 static char normbordercolor[]            = "#444444";
    187 /* Custom: selbordercolor = #770000 for red selection border */
    188 static char normfloatcolor[]             = "#db8fd9";
    189 
    190 static char selfgcolor[]                 = "#eeeeee";
    191 static char selbgcolor[]                 = "#005577";
    192 static char selbordercolor[]             = "#770000";
    193 static char selfloatcolor[]              = "#005577";
    194 
    195 static char titlenormfgcolor[]           = "#bbbbbb";
    196 static char titlenormbgcolor[]           = "#222222";
    197 static char titlenormbordercolor[]       = "#444444";
    198 static char titlenormfloatcolor[]        = "#db8fd9";
    199 
    200 static char titleselfgcolor[]            = "#eeeeee";
    201 static char titleselbgcolor[]            = "#005577";
    202 static char titleselbordercolor[]        = "#005577";
    203 static char titleselfloatcolor[]         = "#005577";
    204 
    205 static char tagsnormfgcolor[]            = "#bbbbbb";
    206 static char tagsnormbgcolor[]            = "#222222";
    207 static char tagsnormbordercolor[]        = "#444444";
    208 static char tagsnormfloatcolor[]         = "#db8fd9";
    209 
    210 static char tagsselfgcolor[]             = "#eeeeee";
    211 static char tagsselbgcolor[]             = "#005577";
    212 static char tagsselbordercolor[]         = "#005577";
    213 static char tagsselfloatcolor[]          = "#005577";
    214 
    215 static char hidnormfgcolor[]             = "#005577";
    216 static char hidselfgcolor[]              = "#227799";
    217 static char hidnormbgcolor[]             = "#222222";
    218 static char hidselbgcolor[]              = "#222222";
    219 
    220 static char urgfgcolor[]                 = "#bbbbbb";
    221 static char urgbgcolor[]                 = "#222222";
    222 static char urgbordercolor[]             = "#ff0000";
    223 static char urgfloatcolor[]              = "#db8fd9";
    224 
    225 #if BAR_LTSYMBOL_SCHEME_PATCH
    226 static char ltsymbolfgcolor[]            = "#222222";
    227 static char ltsymbolbgcolor[]            = "#fe9877";
    228 #endif // BAR_LTSYMBOL_SCHEME_PATCH
    229 
    230 #if RENAMED_SCRATCHPADS_PATCH
    231 static char scratchselfgcolor[]          = "#FFF7D4";
    232 static char scratchselbgcolor[]          = "#77547E";
    233 static char scratchselbordercolor[]      = "#894B9F";
    234 static char scratchselfloatcolor[]       = "#894B9F";
    235 
    236 static char scratchnormfgcolor[]         = "#FFF7D4";
    237 static char scratchnormbgcolor[]         = "#664C67";
    238 static char scratchnormbordercolor[]     = "#77547E";
    239 static char scratchnormfloatcolor[]      = "#77547E";
    240 #endif // RENAMED_SCRATCHPADS_PATCH
    241 
    242 #if BAR_FLEXWINTITLE_PATCH
    243 static char normTTBbgcolor[]             = "#330000";
    244 static char normLTRbgcolor[]             = "#330033";
    245 static char normMONObgcolor[]            = "#000033";
    246 static char normGRIDbgcolor[]            = "#003300";
    247 static char normGRD1bgcolor[]            = "#003300";
    248 static char normGRD2bgcolor[]            = "#003300";
    249 static char normGRDMbgcolor[]            = "#506600";
    250 static char normHGRDbgcolor[]            = "#b96600";
    251 static char normDWDLbgcolor[]            = "#003333";
    252 static char normSPRLbgcolor[]            = "#333300";
    253 static char normfloatbgcolor[]           = "#115577";
    254 static char actTTBbgcolor[]              = "#440000";
    255 static char actLTRbgcolor[]              = "#440044";
    256 static char actMONObgcolor[]             = "#000044";
    257 static char actGRIDbgcolor[]             = "#004400";
    258 static char actGRD1bgcolor[]             = "#004400";
    259 static char actGRD2bgcolor[]             = "#004400";
    260 static char actGRDMbgcolor[]             = "#507711";
    261 static char actHGRDbgcolor[]             = "#b97711";
    262 static char actDWDLbgcolor[]             = "#004444";
    263 static char actSPRLbgcolor[]             = "#444400";
    264 static char actfloatbgcolor[]            = "#116688";
    265 static char selTTBbgcolor[]              = "#550000";
    266 static char selLTRbgcolor[]              = "#550055";
    267 static char selMONObgcolor[]             = "#212171";
    268 static char selGRIDbgcolor[]             = "#005500";
    269 static char selGRD1bgcolor[]             = "#005500";
    270 static char selGRD2bgcolor[]             = "#005500";
    271 static char selGRDMbgcolor[]             = "#508822";
    272 static char selHGRDbgcolor[]             = "#b98822";
    273 static char selDWDLbgcolor[]             = "#005555";
    274 static char selSPRLbgcolor[]             = "#555500";
    275 static char selfloatbgcolor[]            = "#117799";
    276 #endif // BAR_FLEXWINTITLE_PATCH
    277 
    278 #if BAR_ALPHA_PATCH
    279 static const unsigned int baralpha = 0xd0;
    280 static const unsigned int borderalpha = OPAQUE;
    281 static const unsigned int alphas[][3] = {
    282 	/*                       fg      bg        border     */
    283 	[SchemeNorm]         = { OPAQUE, baralpha, borderalpha },
    284 	[SchemeSel]          = { OPAQUE, baralpha, borderalpha },
    285 	[SchemeTitleNorm]    = { OPAQUE, baralpha, borderalpha },
    286 	[SchemeTitleSel]     = { OPAQUE, baralpha, borderalpha },
    287 	[SchemeTagsNorm]     = { OPAQUE, baralpha, borderalpha },
    288 	[SchemeTagsSel]      = { OPAQUE, baralpha, borderalpha },
    289 	[SchemeHidNorm]      = { OPAQUE, baralpha, borderalpha },
    290 	[SchemeHidSel]       = { OPAQUE, baralpha, borderalpha },
    291 	[SchemeUrg]          = { OPAQUE, baralpha, borderalpha },
    292 	#if BAR_LTSYMBOL_SCHEME_PATCH
    293 	[SchemeLtSymbol]     = { OPAQUE, baralpha, borderalpha },
    294 	#endif // BAR_LTSYMBOL_SCHEME_PATCH
    295 	#if RENAMED_SCRATCHPADS_PATCH
    296 	[SchemeScratchSel]  = { OPAQUE, baralpha, borderalpha },
    297 	[SchemeScratchNorm] = { OPAQUE, baralpha, borderalpha },
    298 	#endif // RENAMED_SCRATCHPADS_PATCH
    299 	#if BAR_FLEXWINTITLE_PATCH
    300 	[SchemeFlexActTTB]   = { OPAQUE, baralpha, borderalpha },
    301 	[SchemeFlexActLTR]   = { OPAQUE, baralpha, borderalpha },
    302 	[SchemeFlexActMONO]  = { OPAQUE, baralpha, borderalpha },
    303 	[SchemeFlexActGRID]  = { OPAQUE, baralpha, borderalpha },
    304 	[SchemeFlexActGRD1]  = { OPAQUE, baralpha, borderalpha },
    305 	[SchemeFlexActGRD2]  = { OPAQUE, baralpha, borderalpha },
    306 	[SchemeFlexActGRDM]  = { OPAQUE, baralpha, borderalpha },
    307 	[SchemeFlexActHGRD]  = { OPAQUE, baralpha, borderalpha },
    308 	[SchemeFlexActDWDL]  = { OPAQUE, baralpha, borderalpha },
    309 	[SchemeFlexActSPRL]  = { OPAQUE, baralpha, borderalpha },
    310 	[SchemeFlexActFloat] = { OPAQUE, baralpha, borderalpha },
    311 	[SchemeFlexInaTTB]   = { OPAQUE, baralpha, borderalpha },
    312 	[SchemeFlexInaLTR]   = { OPAQUE, baralpha, borderalpha },
    313 	[SchemeFlexInaMONO]  = { OPAQUE, baralpha, borderalpha },
    314 	[SchemeFlexInaGRID]  = { OPAQUE, baralpha, borderalpha },
    315 	[SchemeFlexInaGRD1]  = { OPAQUE, baralpha, borderalpha },
    316 	[SchemeFlexInaGRD2]  = { OPAQUE, baralpha, borderalpha },
    317 	[SchemeFlexInaGRDM]  = { OPAQUE, baralpha, borderalpha },
    318 	[SchemeFlexInaHGRD]  = { OPAQUE, baralpha, borderalpha },
    319 	[SchemeFlexInaDWDL]  = { OPAQUE, baralpha, borderalpha },
    320 	[SchemeFlexInaSPRL]  = { OPAQUE, baralpha, borderalpha },
    321 	[SchemeFlexInaFloat] = { OPAQUE, baralpha, borderalpha },
    322 	[SchemeFlexSelTTB]   = { OPAQUE, baralpha, borderalpha },
    323 	[SchemeFlexSelLTR]   = { OPAQUE, baralpha, borderalpha },
    324 	[SchemeFlexSelMONO]  = { OPAQUE, baralpha, borderalpha },
    325 	[SchemeFlexSelGRID]  = { OPAQUE, baralpha, borderalpha },
    326 	[SchemeFlexSelGRD1]  = { OPAQUE, baralpha, borderalpha },
    327 	[SchemeFlexSelGRD2]  = { OPAQUE, baralpha, borderalpha },
    328 	[SchemeFlexSelGRDM]  = { OPAQUE, baralpha, borderalpha },
    329 	[SchemeFlexSelHGRD]  = { OPAQUE, baralpha, borderalpha },
    330 	[SchemeFlexSelDWDL]  = { OPAQUE, baralpha, borderalpha },
    331 	[SchemeFlexSelSPRL]  = { OPAQUE, baralpha, borderalpha },
    332 	[SchemeFlexSelFloat] = { OPAQUE, baralpha, borderalpha },
    333 	#endif // BAR_FLEXWINTITLE_PATCH
    334 };
    335 #endif // BAR_ALPHA_PATCH
    336 #if BAR_VTCOLORS_PATCH
    337 static const char title_bg_dark[]   = "#303030";
    338 static const char title_bg_light[]  = "#fdfdfd";
    339 static const int color_ptrs[][ColCount] = {
    340 	/*                       fg      bg      border  float */
    341 	[SchemeNorm]         = { -1,     -1,     5,      12 },
    342 	[SchemeSel]          = { -1,     -1,     11,     13 },
    343 	[SchemeTitleNorm]    = { 6,      -1,     -1,     -1 },
    344 	[SchemeTitleSel]     = { 6,      -1,     -1,     -1 },
    345 	[SchemeTagsNorm]     = { 2,      0,      0,      -1 },
    346 	[SchemeTagsSel]      = { 6,      5,      5,      -1 },
    347 	[SchemeHidNorm]      = { 5,      0,      0,      -1 },
    348 	[SchemeHidSel]       = { 6,      -1,     -1,     -1 },
    349 	[SchemeUrg]          = { 7,      9,      9,      15 },
    350 	#if BAR_LTSYMBOL_SCHEME_PATCH
    351 	[SchemeLtSymbol]     = { -1,     3,      0,       0 },
    352 	#endif // BAR_LTSYMBOL_SCHEME_PATCH
    353 };
    354 #endif // BAR_VTCOLORS_PATCH
    355 
    356 static char *colors[][ColCount] = {
    357 	/*                       fg                bg                border                float */
    358 	[SchemeNorm]         = { normfgcolor,      normbgcolor,      normbordercolor,      normfloatcolor },
    359 	[SchemeSel]          = { selfgcolor,       selbgcolor,       selbordercolor,       selfloatcolor },
    360 	[SchemeTitleNorm]    = { titlenormfgcolor, titlenormbgcolor, titlenormbordercolor, titlenormfloatcolor },
    361 	[SchemeTitleSel]     = { titleselfgcolor,  titleselbgcolor,  titleselbordercolor,  titleselfloatcolor },
    362 	[SchemeTagsNorm]     = { tagsnormfgcolor,  tagsnormbgcolor,  tagsnormbordercolor,  tagsnormfloatcolor },
    363 	[SchemeTagsSel]      = { tagsselfgcolor,   tagsselbgcolor,   tagsselbordercolor,   tagsselfloatcolor },
    364 	[SchemeHidNorm]      = { hidnormfgcolor,   hidnormbgcolor,   c000000,              c000000 },
    365 	[SchemeHidSel]       = { hidselfgcolor,    hidselbgcolor,    c000000,              c000000 },
    366 	[SchemeUrg]          = { urgfgcolor,       urgbgcolor,       urgbordercolor,       urgfloatcolor },
    367 	#if BAR_LTSYMBOL_SCHEME_PATCH
    368 	[SchemeLtSymbol]     = { ltsymbolfgcolor,  ltsymbolbgcolor,  c000000,              c000000 },
    369 	#endif // BAR_LTSYMBOL_SCHEME_PATCH
    370 	#if RENAMED_SCRATCHPADS_PATCH
    371 	[SchemeScratchSel]  = { scratchselfgcolor, scratchselbgcolor, scratchselbordercolor, scratchselfloatcolor },
    372 	[SchemeScratchNorm] = { scratchnormfgcolor, scratchnormbgcolor, scratchnormbordercolor, scratchnormfloatcolor },
    373 	#endif // RENAMED_SCRATCHPADS_PATCH
    374 	#if BAR_FLEXWINTITLE_PATCH
    375 	[SchemeFlexActTTB]   = { titleselfgcolor,  actTTBbgcolor,    actTTBbgcolor,        c000000 },
    376 	[SchemeFlexActLTR]   = { titleselfgcolor,  actLTRbgcolor,    actLTRbgcolor,        c000000 },
    377 	[SchemeFlexActMONO]  = { titleselfgcolor,  actMONObgcolor,   actMONObgcolor,       c000000 },
    378 	[SchemeFlexActGRID]  = { titleselfgcolor,  actGRIDbgcolor,   actGRIDbgcolor,       c000000 },
    379 	[SchemeFlexActGRD1]  = { titleselfgcolor,  actGRD1bgcolor,   actGRD1bgcolor,       c000000 },
    380 	[SchemeFlexActGRD2]  = { titleselfgcolor,  actGRD2bgcolor,   actGRD2bgcolor,       c000000 },
    381 	[SchemeFlexActGRDM]  = { titleselfgcolor,  actGRDMbgcolor,   actGRDMbgcolor,       c000000 },
    382 	[SchemeFlexActHGRD]  = { titleselfgcolor,  actHGRDbgcolor,   actHGRDbgcolor,       c000000 },
    383 	[SchemeFlexActDWDL]  = { titleselfgcolor,  actDWDLbgcolor,   actDWDLbgcolor,       c000000 },
    384 	[SchemeFlexActSPRL]  = { titleselfgcolor,  actSPRLbgcolor,   actSPRLbgcolor,       c000000 },
    385 	[SchemeFlexActFloat] = { titleselfgcolor,  actfloatbgcolor,  actfloatbgcolor,      c000000 },
    386 	[SchemeFlexInaTTB]   = { titlenormfgcolor, normTTBbgcolor,   normTTBbgcolor,       c000000 },
    387 	[SchemeFlexInaLTR]   = { titlenormfgcolor, normLTRbgcolor,   normLTRbgcolor,       c000000 },
    388 	[SchemeFlexInaMONO]  = { titlenormfgcolor, normMONObgcolor,  normMONObgcolor,      c000000 },
    389 	[SchemeFlexInaGRID]  = { titlenormfgcolor, normGRIDbgcolor,  normGRIDbgcolor,      c000000 },
    390 	[SchemeFlexInaGRD1]  = { titlenormfgcolor, normGRD1bgcolor,  normGRD1bgcolor,      c000000 },
    391 	[SchemeFlexInaGRD2]  = { titlenormfgcolor, normGRD2bgcolor,  normGRD2bgcolor,      c000000 },
    392 	[SchemeFlexInaGRDM]  = { titlenormfgcolor, normGRDMbgcolor,  normGRDMbgcolor,      c000000 },
    393 	[SchemeFlexInaHGRD]  = { titlenormfgcolor, normHGRDbgcolor,  normHGRDbgcolor,      c000000 },
    394 	[SchemeFlexInaDWDL]  = { titlenormfgcolor, normDWDLbgcolor,  normDWDLbgcolor,      c000000 },
    395 	[SchemeFlexInaSPRL]  = { titlenormfgcolor, normSPRLbgcolor,  normSPRLbgcolor,      c000000 },
    396 	[SchemeFlexInaFloat] = { titlenormfgcolor, normfloatbgcolor, normfloatbgcolor,     c000000 },
    397 	[SchemeFlexSelTTB]   = { titleselfgcolor,  selTTBbgcolor,    selTTBbgcolor,        c000000 },
    398 	[SchemeFlexSelLTR]   = { titleselfgcolor,  selLTRbgcolor,    selLTRbgcolor,        c000000 },
    399 	[SchemeFlexSelMONO]  = { titleselfgcolor,  selMONObgcolor,   selMONObgcolor,       c000000 },
    400 	[SchemeFlexSelGRID]  = { titleselfgcolor,  selGRIDbgcolor,   selGRIDbgcolor,       c000000 },
    401 	[SchemeFlexSelGRD1]  = { titleselfgcolor,  selGRD1bgcolor,   selGRD1bgcolor,       c000000 },
    402 	[SchemeFlexSelGRD2]  = { titleselfgcolor,  selGRD2bgcolor,   selGRD2bgcolor,       c000000 },
    403 	[SchemeFlexSelGRDM]  = { titleselfgcolor,  selGRDMbgcolor,   selGRDMbgcolor,       c000000 },
    404 	[SchemeFlexSelHGRD]  = { titleselfgcolor,  selHGRDbgcolor,   selHGRDbgcolor,       c000000 },
    405 	[SchemeFlexSelDWDL]  = { titleselfgcolor,  selDWDLbgcolor,   selDWDLbgcolor,       c000000 },
    406 	[SchemeFlexSelSPRL]  = { titleselfgcolor,  selSPRLbgcolor,   selSPRLbgcolor,       c000000 },
    407 	[SchemeFlexSelFloat] = { titleselfgcolor,  selfloatbgcolor,  selfloatbgcolor,      c000000 },
    408 	#endif // BAR_FLEXWINTITLE_PATCH
    409 };
    410 
    411 #if BAR_POWERLINE_STATUS_PATCH
    412 static char *statuscolors[][ColCount] = {
    413 	/*                       fg                bg                border                float */
    414 	[SchemeNorm]         = { normfgcolor,      normbgcolor,      normbordercolor,      normfloatcolor },
    415 	[SchemeSel]          = { selfgcolor,       selbgcolor,       selbordercolor,       selfloatcolor },
    416 	[SchemeTitleNorm]    = { titlenormfgcolor, titlenormbgcolor, titlenormbordercolor, titlenormfloatcolor },
    417 	[SchemeTitleSel]     = { titleselfgcolor,  titleselbgcolor,  titleselbordercolor,  titleselfloatcolor },
    418 	[SchemeTagsNorm]     = { tagsnormfgcolor,  tagsnormbgcolor,  tagsnormbordercolor,  tagsnormfloatcolor },
    419 	[SchemeTagsSel]      = { tagsselfgcolor,   tagsselbgcolor,   tagsselbordercolor,   tagsselfloatcolor },
    420 	[SchemeHidNorm]      = { hidnormfgcolor,   hidnormbgcolor,   c000000,              c000000 },
    421 	[SchemeHidSel]       = { hidselfgcolor,    hidselbgcolor,    c000000,              c000000 },
    422 	[SchemeUrg]          = { urgfgcolor,       urgbgcolor,       urgbordercolor,       urgfloatcolor },
    423 };
    424 #endif // BAR_POWERLINE_STATUS_PATCH
    425 
    426 #if BAR_LAYOUTMENU_PATCH
    427 static const char *layoutmenu_cmd = "layoutmenu.sh";
    428 #endif
    429 
    430 #if BAR_LAUNCHER_PATCH
    431 static const Launcher launchers[] = {
    432 	/* icon to display      command        */
    433 	{ "surf",               CMD("surf", "duckduckgo.com") },
    434 };
    435 #endif // BAR_LAUNCHER_PATCH
    436 
    437 #if COOL_AUTOSTART_PATCH
    438 static const char *const autostart[] = {
    439 	"dwmblocks", NULL,
    440 	NULL /* terminate */
    441 };
    442 #endif // COOL_AUTOSTART_PATCH
    443 
    444 #if RENAMED_SCRATCHPADS_PATCH
    445 static const char *scratchpadcmd[] = {"s", "st", "-n", "spterm", NULL};
    446 #elif SCRATCHPADS_PATCH
    447 const char *spcmd1[] = {"st", "-n", "spterm", "-g", "120x34", NULL };
    448 const char *spcmd2[] = {"st", "-n", "spcalc", "-f", "monospace:size=11", "-g", "50x20", "-e", "bc", "-lq", NULL };
    449 static Sp scratchpads[] = {
    450    /* name          cmd  */
    451    {"spterm",      spcmd1},
    452    {"spcalc",      spcmd2},
    453 };
    454 #endif // SCRATCHPADS_PATCH
    455 
    456 /* Tags
    457  * In a traditional dwm the number of tags in use can be changed simply by changing the number
    458  * of strings in the tags array. This build does things a bit different which has some added
    459  * benefits. If you need to change the number of tags here then change the NUMTAGS macro in dwm.c.
    460  *
    461  * Examples:
    462  *
    463  *  1) static char *tagicons[][NUMTAGS*2] = {
    464  *         [DEFAULT_TAGS] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I" },
    465  *     }
    466  *
    467  *  2) static char *tagicons[][1] = {
    468  *         [DEFAULT_TAGS] = { "•" },
    469  *     }
    470  *
    471  * The first example would result in the tags on the first monitor to be 1 through 9, while the
    472  * tags for the second monitor would be named A through I. A third monitor would start again at
    473  * 1 through 9 while the tags on a fourth monitor would also be named A through I. Note the tags
    474  * count of NUMTAGS*2 in the array initialiser which defines how many tag text / icon exists in
    475  * the array. This can be changed to *3 to add separate icons for a third monitor.
    476  *
    477  * For the second example each tag would be represented as a bullet point. Both cases work the
    478  * same from a technical standpoint - the icon index is derived from the tag index and the monitor
    479  * index. If the icon index is is greater than the number of tag icons then it will wrap around
    480  * until it an icon matches. Similarly if there are two tag icons then it would alternate between
    481  * them. This works seamlessly with alternative tags and alttagsdecoration patches.
    482  */
    483 #if NAMETAG_PATCH
    484 static char tagicons[][NUMTAGS][MAX_TAGLEN] =
    485 #else
    486 static char *tagicons[][NUMTAGS] =
    487 #endif // NAMETAG_PATCH
    488 {
    489 	[DEFAULT_TAGS]        = { "1", "2", "3", "4", "5", "6", "7", "8", "9" },
    490 	[ALTERNATIVE_TAGS]    = { "A", "B", "C", "D", "E", "F", "G", "H", "I" },
    491 	[ALT_TAGS_DECORATION] = { "<1>", "<2>", "<3>", "<4>", "<5>", "<6>", "<7>", "<8>", "<9>" },
    492 };
    493 
    494 #if BAR_TAGGRID_PATCH
    495 /* grid of tags */
    496 #define SWITCHTAG_UP                1 << 0
    497 #define SWITCHTAG_DOWN              1 << 1
    498 #define SWITCHTAG_LEFT              1 << 2
    499 #define SWITCHTAG_RIGHT             1 << 3
    500 #define SWITCHTAG_TOGGLETAG         1 << 4
    501 #define SWITCHTAG_TAG               1 << 5
    502 #define SWITCHTAG_VIEW              1 << 6
    503 #define SWITCHTAG_TOGGLEVIEW        1 << 7
    504 
    505 static const int tagrows = 2;
    506 #endif // BAR_TAGGRID_PATCH
    507 
    508 /* There are two options when it comes to per-client rules:
    509  *  - a typical struct table or
    510  *  - using the RULE macro
    511  *
    512  * A traditional struct table looks like this:
    513  *    // class      instance  title  wintype  tags mask  isfloating  monitor
    514  *    { "Gimp",     NULL,     NULL,  NULL,    1 << 4,    0,          -1 },
    515  *    { "Firefox",  NULL,     NULL,  NULL,    1 << 7,    0,          -1 },
    516  *
    517  * The RULE macro has the default values set for each field allowing you to only
    518  * specify the values that are relevant for your rule, e.g.
    519  *
    520  *    RULE(.class = "Gimp", .tags = 1 << 4)
    521  *    RULE(.class = "Firefox", .tags = 1 << 7)
    522  *
    523  * Refer to the Rule struct definition for the list of available fields depending on
    524  * the patches you enable.
    525  */
    526 static const Rule rules[] = {
    527 	/* xprop(1):
    528 	 *	WM_CLASS(STRING) = instance, class
    529 	 *	WM_NAME(STRING) = title
    530 	 *	WM_WINDOW_ROLE(STRING) = role
    531 	 *	_NET_WM_WINDOW_TYPE(ATOM) = wintype
    532 	 */
    533 	RULE(.wintype = WTYPE "DIALOG", .isfloating = 1)
    534 	RULE(.wintype = WTYPE "UTILITY", .isfloating = 1)
    535 	RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
    536 	RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
    537 	RULE(.class = "Gimp", .tags = 1 << 8)
    538 	#if SWALLOW_PATCH
    539 	RULE(.class = "St", .isterminal = 1)
    540 	RULE(.title = "Event Tester", .noswallow = 1)
    541 	RULE(.instance = "floatterm", .class = "St", .isfloating = 1, .isterminal = 1)
    542 	RULE(.instance = "bg", .class = "St", .tags = 1 << 7, .isterminal = 1)
    543 	#endif // SWALLOW_PATCH
    544 	#if RENAMED_SCRATCHPADS_PATCH
    545 	RULE(.instance = "spterm", .scratchkey = 's', .isfloating = 1)
    546 	#elif SCRATCHPADS_PATCH
    547 	RULE(.instance = "spterm", .tags = SPTAG(0), .isfloating = 1, .isterminal = 1)
    548 	RULE(.instance = "spcalc", .tags = SPTAG(1), .isfloating = 1, .isterminal = 1)
    549 	#endif // SCRATCHPADS_PATCH
    550 };
    551 
    552 #if MONITOR_RULES_PATCH
    553 #if PERTAG_PATCH
    554 static const MonitorRule monrules[] = {
    555 	/* monitor  tag   layout  mfact  nmaster  showbar  topbar */
    556 	{  1,       -1,   2,      -1,    -1,      -1,      -1     }, // use a different layout for the second monitor
    557 	{  -1,      -1,   0,      -1,    -1,      -1,      -1     }, // default
    558 };
    559 #else
    560 static const MonitorRule monrules[] = {
    561 	/* monitor  layout  mfact  nmaster  showbar  topbar */
    562 	{  1,       2,      -1,    -1,      -1,      -1     }, // use a different layout for the second monitor
    563 	{  -1,      0,      -1,    -1,      -1,      -1     }, // default
    564 };
    565 #endif // PERTAG_PATCH
    566 #endif // MONITOR_RULES_PATCH
    567 
    568 #if INSETS_PATCH
    569 static const Inset default_inset = {
    570 	.x = 0,
    571 	.y = 30,
    572 	.w = 0,
    573 	.h = 0,
    574 };
    575 #endif // INSETS_PATCH
    576 
    577 /* Bar rules allow you to configure what is shown where on the bar, as well as
    578  * introducing your own bar modules.
    579  *
    580  *    monitor:
    581  *      -1  show on all monitors
    582  *       0  show on monitor 0
    583  *      'A' show on active monitor (i.e. focused / selected) (or just -1 for active?)
    584  *    bar - bar index, 0 is default, 1 is extrabar
    585  *    alignment - how the module is aligned compared to other modules
    586  *    widthfunc, drawfunc, clickfunc - providing bar module width, draw and click functions
    587  *    name - does nothing, intended for visual clue and for logging / debugging
    588  */
    589 static const BarRule barrules[] = {
    590 	/* monitor   bar    alignment         widthfunc                 drawfunc                clickfunc                hoverfunc                name */
    591 	#if BAR_STATUSBUTTON_PATCH
    592 	{ -1,        0,     BAR_ALIGN_LEFT,   width_stbutton,           draw_stbutton,          click_stbutton,          NULL,                    "statusbutton" },
    593 	#endif // BAR_STATUSBUTTON_PATCH
    594 	#if BAR_LAUNCHER_PATCH
    595 	{ -1,        0,     BAR_ALIGN_LEFT,   width_launcher,           draw_launcher,          click_launcher,          NULL,                    "launcher" },
    596 	#endif // BAR_LAUNCHER_PATCH
    597 	#if BAR_POWERLINE_TAGS_PATCH
    598 	{  0,        0,     BAR_ALIGN_LEFT,   width_pwrl_tags,          draw_pwrl_tags,         click_pwrl_tags,         hover_pwrl_tags,         "powerline_tags" },
    599 	#endif // BAR_POWERLINE_TAGS_PATCH
    600 	#if BAR_TAGS_PATCH
    601 	{ -1,        0,     BAR_ALIGN_LEFT,   width_tags,               draw_tags,              click_tags,              hover_tags,              "tags" },
    602 	#endif // BAR_TAGS_PATCH
    603 	#if BAR_TAGLABELS_PATCH
    604 	{ -1,        0,     BAR_ALIGN_LEFT,   width_taglabels,          draw_taglabels,         click_taglabels,         hover_taglabels,         "taglabels" },
    605 	#endif // BAR_TAGLABELS_PATCH
    606 	#if BAR_TAGGRID_PATCH
    607 	{ -1,        0,     BAR_ALIGN_LEFT,   width_taggrid,            draw_taggrid,           click_taggrid,           NULL,                    "taggrid" },
    608 	#endif // BAR_TAGGRID_PATCH
    609 	#if BAR_SYSTRAY_PATCH
    610 	{  0,        0,     BAR_ALIGN_RIGHT,  width_systray,            draw_systray,           click_systray,           NULL,                    "systray" },
    611 	#endif // BAR_SYSTRAY_PATCH
    612 	#if BAR_LTSYMBOL_PATCH
    613 	{ -1,        0,     BAR_ALIGN_LEFT,   width_ltsymbol,           draw_ltsymbol,          click_ltsymbol,          NULL,                    "layout" },
    614 	#endif // BAR_LTSYMBOL_PATCH
    615 	#if BAR_STATUSCOLORS_PATCH && BAR_STATUSCMD_PATCH
    616 	{ statusmon, 0,     BAR_ALIGN_RIGHT,  width_statuscolors,       draw_statuscolors,      click_statuscmd,         NULL,                    "statuscolors" },
    617 	#elif BAR_STATUSCOLORS_PATCH
    618 	{ statusmon, 0,     BAR_ALIGN_RIGHT,  width_statuscolors,       draw_statuscolors,      click_statuscolors,      NULL,                    "statuscolors" },
    619 	#elif BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
    620 	{ statusmon, 0,     BAR_ALIGN_RIGHT,  width_status2d,           draw_status2d,          click_statuscmd,         NULL,                    "status2d" },
    621 	#elif BAR_STATUS2D_PATCH
    622 	{ statusmon, 0,     BAR_ALIGN_RIGHT,  width_status2d,           draw_status2d,          click_status2d,          NULL,                    "status2d" },
    623 	#elif BAR_POWERLINE_STATUS_PATCH
    624 	{ statusmon, 0,     BAR_ALIGN_RIGHT,  width_pwrl_status,        draw_pwrl_status,       click_pwrl_status,       NULL,                    "powerline_status" },
    625 	#elif BAR_STATUS_PATCH && BAR_STATUSCMD_PATCH
    626 	{ statusmon, 0,     BAR_ALIGN_RIGHT,  width_status,             draw_status,            click_statuscmd,         NULL,                    "status" },
    627 	#elif BAR_STATUS_PATCH
    628 	{ statusmon, 0,     BAR_ALIGN_RIGHT,  width_status,             draw_status,            click_status,            NULL,                    "status" },
    629 	#endif // BAR_STATUS2D_PATCH | BAR_STATUSCMD_PATCH
    630 	#if XKB_PATCH
    631 	{  0,        0,     BAR_ALIGN_RIGHT,  width_xkb,                draw_xkb,               click_xkb,               NULL,                    "xkb" },
    632 	#endif // XKB_PATCH
    633 	#if BAR_FLEXWINTITLE_PATCH
    634 	{ -1,        0,     BAR_ALIGN_NONE,   width_flexwintitle,       draw_flexwintitle,      click_flexwintitle,      NULL,                    "flexwintitle" },
    635 	#elif BAR_TABGROUPS_PATCH
    636 	{ -1,        0,     BAR_ALIGN_NONE,   width_bartabgroups,       draw_bartabgroups,      click_bartabgroups,      NULL,                    "bartabgroups" },
    637 	#elif BAR_AWESOMEBAR_PATCH
    638 	{ -1,        0,     BAR_ALIGN_NONE,   width_awesomebar,         draw_awesomebar,        click_awesomebar,        NULL,                    "awesomebar" },
    639 	#elif BAR_FANCYBAR_PATCH
    640 	{ -1,        0,     BAR_ALIGN_NONE,   width_fancybar,           draw_fancybar,          click_fancybar,          NULL,                    "fancybar" },
    641 	#elif BAR_WINTITLE_PATCH
    642 	{ -1,        0,     BAR_ALIGN_NONE,   width_wintitle,           draw_wintitle,          click_wintitle,          NULL,                    "wintitle" },
    643 	#endif // BAR_TABGROUPS_PATCH | BAR_AWESOMEBAR_PATCH | BAR_FANCYBAR_PATCH | BAR_WINTITLE_PATCH
    644 	#if BAR_EXTRASTATUS_PATCH
    645 	#if BAR_STATUSCOLORS_PATCH && BAR_STATUSCMD_PATCH
    646 	{ statusmon, 1,     BAR_ALIGN_CENTER, width_statuscolors_es,    draw_statuscolors_es,   click_statuscmd_es,      NULL,                    "statuscolors_es" },
    647 	#elif BAR_STATUSCOLORS_PATCH
    648 	{ statusmon, 1,     BAR_ALIGN_CENTER, width_statuscolors_es,    draw_statuscolors_es,   click_statuscolors,      NULL,                    "statuscolors_es" },
    649 	#elif BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
    650 	{ statusmon, 1,     BAR_ALIGN_CENTER, width_status2d_es,        draw_status2d_es,       click_statuscmd_es,      NULL,                    "status2d_es" },
    651 	#elif BAR_STATUS2D_PATCH
    652 	{ statusmon, 1,     BAR_ALIGN_CENTER, width_status2d_es,        draw_status2d_es,       click_status2d,          NULL,                    "status2d_es" },
    653 	#elif BAR_POWERLINE_STATUS_PATCH
    654 	{ statusmon, 1,     BAR_ALIGN_RIGHT,  width_pwrl_status_es,     draw_pwrl_status_es,    click_pwrl_status,       NULL,                    "powerline_status" },
    655 	#elif BAR_STATUSCMD_PATCH && BAR_STATUS_PATCH
    656 	{ statusmon, 1,     BAR_ALIGN_CENTER, width_status_es,          draw_status_es,         click_statuscmd_es,      NULL,                    "status_es" },
    657 	#elif BAR_STATUS_PATCH
    658 	{ statusmon, 1,     BAR_ALIGN_CENTER, width_status_es,          draw_status_es,         click_status,            NULL,                    "status_es" },
    659 	#endif // BAR_STATUS2D_PATCH | BAR_STATUSCMD_PATCH
    660 	#endif // BAR_EXTRASTATUS_PATCH
    661 	#if BAR_FLEXWINTITLE_PATCH
    662 	#if BAR_WINTITLE_HIDDEN_PATCH
    663 	{ -1,        1,  BAR_ALIGN_RIGHT_RIGHT, width_wintitle_hidden,  draw_wintitle_hidden,   click_wintitle_hidden,   NULL,                    "wintitle_hidden" },
    664 	#endif
    665 	#if BAR_WINTITLE_FLOATING_PATCH
    666 	{ -1,        1,     BAR_ALIGN_LEFT,   width_wintitle_floating,  draw_wintitle_floating, click_wintitle_floating, NULL,                    "wintitle_floating" },
    667 	#endif // BAR_WINTITLE_FLOATING_PATCH
    668 	#endif // BAR_FLEXWINTITLE_PATCH
    669 };
    670 
    671 /* layout(s) */
    672 static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
    673 static const int nmaster     = 1;    /* number of clients in master area */
    674 #if FLEXTILE_DELUXE_LAYOUT
    675 static const int nstack      = 0;    /* number of clients in primary stack area */
    676 #endif // FLEXTILE_DELUXE_LAYOUT
    677 static const int resizehints = 0;    /* 1 means respect size hints in tiled resizals */
    678 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
    679 static const int refreshrate = 120;  /* refresh rate (per second) for client move/resize */
    680 #if PLACEMOUSE_PATCH
    681 static const int refreshrate_placemouse = 60; /* refresh rate (per second) for placemouse */
    682 #endif // PLACEMOUSE_PATCH
    683 #if DRAGMFACT_PATCH
    684 static const int refreshrate_dragmfact = 40; /* refresh rate (per second) for dragmfact */
    685 #endif // DRAGMFACT_PATCH
    686 #if DRAGCFACT_PATCH
    687 static const int refreshrate_dragcfact = 60; /* refresh rate (per second) for dragcfact */
    688 #endif // DRAGCFACT_PATCH
    689 #if DECORATION_HINTS_PATCH
    690 static const int decorhints  = 1;    /* 1 means respect decoration hints */
    691 #endif // DECORATION_HINTS_PATCH
    692 
    693 #if NROWGRID_LAYOUT
    694 #define FORCE_VSPLIT 1
    695 #endif
    696 
    697 #if TAPRESIZE_PATCH
    698 /* mouse scroll resize */
    699 static const int scrollsensetivity = 30; /* 1 means resize window by 1 pixel for each scroll event */
    700 /* resizemousescroll direction argument list */
    701 static const int scrollargs[][2] = {
    702 	/* width change         height change */
    703 	{ +scrollsensetivity,	0 },
    704 	{ -scrollsensetivity,	0 },
    705 	{ 0, 				  	+scrollsensetivity },
    706 	{ 0, 					-scrollsensetivity },
    707 };
    708 #endif // TAPRESIZE_PATCH
    709 
    710 #if FLEXTILE_DELUXE_LAYOUT
    711 static const Layout layouts[] = {
    712 	/* symbol     arrange function, { nmaster, nstack, layout, master axis, stack axis, secondary stack axis, symbol func } */
    713 	{ "[]=",      flextile,         { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL } }, // default tile layout
    714  	{ "><>",      NULL,             {0} },    /* no layout function means floating behavior */
    715 	{ "[M]",      flextile,         { -1, -1, NO_SPLIT, MONOCLE, MONOCLE, 0, NULL } }, // monocle
    716 	{ "|||",      flextile,         { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // columns (col) layout
    717 	{ ">M>",      flextile,         { -1, -1, FLOATING_MASTER, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // floating master
    718 	{ "[D]",      flextile,         { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, MONOCLE, 0, NULL } }, // deck
    719 	{ "TTT",      flextile,         { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // bstack
    720 	{ "===",      flextile,         { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // bstackhoriz
    721 	{ "|M|",      flextile,         { -1, -1, SPLIT_CENTERED_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, TOP_TO_BOTTOM, NULL } }, // centeredmaster
    722 	{ "-M-",      flextile,         { -1, -1, SPLIT_CENTERED_HORIZONTAL, TOP_TO_BOTTOM, LEFT_TO_RIGHT, LEFT_TO_RIGHT, NULL } }, // centeredmaster horiz
    723 	{ ":::",      flextile,         { -1, -1, NO_SPLIT, GAPPLESSGRID, GAPPLESSGRID, 0, NULL } }, // gappless grid
    724 	{ "[\\]",     flextile,         { -1, -1, NO_SPLIT, DWINDLE, DWINDLE, 0, NULL } }, // fibonacci dwindle
    725 	{ "(@)",      flextile,         { -1, -1, NO_SPLIT, SPIRAL, SPIRAL, 0, NULL } }, // fibonacci spiral
    726 	{ "[T]",      flextile,         { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TATAMI, 0, NULL } }, // tatami mats
    727 	{ "RRR",      flextile,         { 3, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // reading mode
    728 	#if TILE_LAYOUT
    729 	{ "[]=",      tile,             {0} },
    730 	#endif
    731 	#if MONOCLE_LAYOUT
    732 	{ "[M]",      monocle,          {0} },
    733 	#endif
    734 	#if BSTACK_LAYOUT
    735 	{ "TTT",      bstack,           {0} },
    736 	#endif
    737 	#if BSTACKHORIZ_LAYOUT
    738 	{ "===",      bstackhoriz,      {0} },
    739 	#endif
    740 	#if CENTEREDMASTER_LAYOUT
    741 	{ "|M|",      centeredmaster,   {0} },
    742 	#endif
    743 	#if CENTEREDFLOATINGMASTER_LAYOUT
    744 	{ ">M>",      centeredfloatingmaster, {0} },
    745 	#endif
    746 	#if COLUMNS_LAYOUT
    747 	{ "|||",      col,              {0} },
    748 	#endif
    749 	#if DECK_LAYOUT
    750 	{ "[D]",      deck,             {0} },
    751 	#endif
    752 	#if FIBONACCI_SPIRAL_LAYOUT
    753 	{ "(@)",      spiral,           {0} },
    754 	#endif
    755 	#if FIBONACCI_DWINDLE_LAYOUT
    756 	{ "[\\]",     dwindle,          {0} },
    757 	#endif
    758 	#if GRIDMODE_LAYOUT
    759 	{ "HHH",      grid,             {0} },
    760 	#endif
    761 	#if HORIZGRID_LAYOUT
    762 	{ "---",      horizgrid,        {0} },
    763 	#endif
    764 	#if GAPPLESSGRID_LAYOUT
    765 	{ ":::",      gaplessgrid,      {0} },
    766 	#endif
    767 	#if NROWGRID_LAYOUT
    768 	{ "###",      nrowgrid,         {0} },
    769 	#endif
    770 };
    771 #else
    772 static const Layout layouts[] = {
    773 	/* symbol     arrange function */
    774 	#if TILE_LAYOUT
    775 	{ "[]=",      tile },    /* first entry is default */
    776 	#endif
    777 	{ "><>",      NULL },    /* no layout function means floating behavior */
    778 	#if MONOCLE_LAYOUT
    779 	{ "[M]",      monocle },
    780 	#endif
    781 	#if BSTACK_LAYOUT
    782 	{ "TTT",      bstack },
    783 	#endif
    784 	#if BSTACKHORIZ_LAYOUT
    785 	{ "===",      bstackhoriz },
    786 	#endif
    787 	#if CENTEREDMASTER_LAYOUT
    788 	{ "|M|",      centeredmaster },
    789 	#endif
    790 	#if CENTEREDFLOATINGMASTER_LAYOUT
    791 	{ ">M>",      centeredfloatingmaster },
    792 	#endif
    793 	#if COLUMNS_LAYOUT
    794 	{ "|||",      col },
    795 	#endif
    796 	#if DECK_LAYOUT
    797 	{ "[D]",      deck },
    798 	#endif
    799 	#if FIBONACCI_SPIRAL_LAYOUT
    800 	{ "(@)",      spiral },
    801 	#endif
    802 	#if FIBONACCI_DWINDLE_LAYOUT
    803 	{ "[\\]",     dwindle },
    804 	#endif
    805 	#if GRIDMODE_LAYOUT
    806 	{ "HHH",      grid },
    807 	#endif
    808 	#if HORIZGRID_LAYOUT
    809 	{ "---",      horizgrid },
    810 	#endif
    811 	#if GAPPLESSGRID_LAYOUT
    812 	{ ":::",      gaplessgrid },
    813 	#endif
    814 	#if NROWGRID_LAYOUT
    815 	{ "###",      nrowgrid },
    816 	#endif
    817 };
    818 #endif // FLEXTILE_DELUXE_LAYOUT
    819 
    820 #if XKB_PATCH
    821 /* xkb frontend */
    822 static const char *xkb_layouts[]  = {
    823 	"en",
    824 	"ru",
    825 };
    826 #endif // XKB_PATCH
    827 
    828 /* key definitions */
    829 #define MODKEY Mod4Mask
    830 #if COMBO_PATCH && SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
    831 #define TAGKEYS(KEY,TAG) \
    832 	{ MODKEY,                       KEY,      comboview,      {.ui = 1 << TAG} }, \
    833 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    834 	{ MODKEY|ShiftMask,             KEY,      combotag,       {.ui = 1 << TAG} }, \
    835 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} }, \
    836 	{ MODKEY|Mod4Mask|ShiftMask,    KEY,      swaptags,       {.ui = 1 << TAG} }, \
    837 	{ MODKEY|Mod4Mask,              KEY,      tagnextmon,     {.ui = 1 << TAG} }, \
    838 	{ MODKEY|Mod4Mask|ControlMask,  KEY,      tagprevmon,     {.ui = 1 << TAG} },
    839 #elif COMBO_PATCH && SWAPTAGS_PATCH
    840 #define TAGKEYS(KEY,TAG) \
    841 	{ MODKEY,                       KEY,      comboview,      {.ui = 1 << TAG} }, \
    842 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    843 	{ MODKEY|ShiftMask,             KEY,      combotag,       {.ui = 1 << TAG} }, \
    844 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} }, \
    845 	{ MODKEY|Mod4Mask|ShiftMask,    KEY,      swaptags,       {.ui = 1 << TAG} },
    846 #elif COMBO_PATCH && TAGOTHERMONITOR_PATCH
    847 #define TAGKEYS(KEY,TAG) \
    848 	{ MODKEY,                       KEY,      comboview,      {.ui = 1 << TAG} }, \
    849 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    850 	{ MODKEY|ShiftMask,             KEY,      combotag,       {.ui = 1 << TAG} }, \
    851 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} }, \
    852 	{ MODKEY|Mod4Mask,              KEY,      tagnextmon,     {.ui = 1 << TAG} }, \
    853 	{ MODKEY|Mod4Mask|ControlMask,  KEY,      tagprevmon,     {.ui = 1 << TAG} },
    854 #elif COMBO_PATCH
    855 #define TAGKEYS(KEY,TAG) \
    856 	{ MODKEY,                       KEY,      comboview,      {.ui = 1 << TAG} }, \
    857 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    858 	{ MODKEY|ShiftMask,             KEY,      combotag,       {.ui = 1 << TAG} }, \
    859 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
    860 #elif SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
    861 #define TAGKEYS(KEY,TAG) \
    862 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    863 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    864 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    865 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} }, \
    866 	{ MODKEY|Mod4Mask|ShiftMask,    KEY,      swaptags,       {.ui = 1 << TAG} }, \
    867 	{ MODKEY|Mod4Mask,              KEY,      tagnextmon,     {.ui = 1 << TAG} }, \
    868 	{ MODKEY|Mod4Mask|ControlMask,  KEY,      tagprevmon,     {.ui = 1 << TAG} },
    869 #elif SWAPTAGS_PATCH
    870 #define TAGKEYS(KEY,TAG) \
    871 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    872 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    873 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    874 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} }, \
    875 	{ MODKEY|Mod4Mask|ShiftMask,    KEY,      swaptags,       {.ui = 1 << TAG} },
    876 #elif TAGOTHERMONITOR_PATCH
    877 #define TAGKEYS(KEY,TAG) \
    878 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    879 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    880 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    881 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} }, \
    882 	{ MODKEY|Mod4Mask,              KEY,      tagnextmon,     {.ui = 1 << TAG} }, \
    883 	{ MODKEY|Mod4Mask|ControlMask,  KEY,      tagprevmon,     {.ui = 1 << TAG} },
    884 #else
    885 #define TAGKEYS(KEY,TAG) \
    886 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    887 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    888 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    889 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
    890 #endif // COMBO_PATCH / SWAPTAGS_PATCH / TAGOTHERMONITOR_PATCH
    891 
    892 #if STACKER_PATCH
    893 #define STACKKEYS(MOD,ACTION) \
    894 	{ MOD, XK_j,     ACTION##stack, {.i = INC(+1) } }, \
    895 	{ MOD, XK_k,     ACTION##stack, {.i = INC(-1) } }, \
    896 	{ MOD, XK_s,     ACTION##stack, {.i = PREVSEL } }, \
    897 	{ MOD, XK_w,     ACTION##stack, {.i = 0 } }, \
    898 	{ MOD, XK_e,     ACTION##stack, {.i = 1 } }, \
    899 	{ MOD, XK_a,     ACTION##stack, {.i = 2 } }, \
    900 	{ MOD, XK_z,     ACTION##stack, {.i = -1 } },
    901 #endif // STACKER_PATCH
    902 
    903 #if BAR_HOLDBAR_PATCH
    904 #define HOLDKEY 0 // replace 0 with the keysym to activate holdbar
    905 #endif // BAR_HOLDBAR_PATCH
    906 
    907 /* commands */
    908 #if !NODMENU_PATCH
    909 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
    910 #endif // NODMENU_PATCH
    911 static const char *dmenucmd[] = {
    912 	"dmenu_run",
    913 	#if !NODMENU_PATCH
    914 	"-m", dmenumon,
    915 	#endif // NODMENU_PATCH
    916 	"-fn", dmenufont,
    917 	"-nb", normbgcolor,
    918 	"-nf", normfgcolor,
    919 	"-sb", selbgcolor,
    920 	"-sf", selfgcolor,
    921 	#if BAR_DMENUMATCHTOP_PATCH
    922 	topbar ? NULL : "-b",
    923 	#endif // BAR_DMENUMATCHTOP_PATCH
    924 	NULL
    925 };
    926 static const char *termcmd[]  = { "st", NULL };
    927 
    928 #if BAR_STATUSCMD_PATCH
    929 #if BAR_DWMBLOCKS_PATCH
    930 /* This defines the name of the executable that handles the bar (used for signalling purposes) */
    931 #define STATUSBAR "dwmblocks"
    932 #else
    933 /* commands spawned when clicking statusbar, the mouse button pressed is exported as BUTTON */
    934 static const StatusCmd statuscmds[] = {
    935 	{ "notify-send Volume$BUTTON", 1 },
    936 	{ "notify-send CPU$BUTTON", 2 },
    937 	{ "notify-send Battery$BUTTON", 3 },
    938 };
    939 /* test the above with: xsetroot -name "$(printf '\x01Volume |\x02 CPU |\x03 Battery')" */
    940 static const char *statuscmd[] = { "/bin/sh", "-c", NULL, NULL };
    941 #endif // BAR_DWMBLOCKS_PATCH
    942 #endif // BAR_STATUSCMD_PATCH
    943 
    944 #if ON_EMPTY_KEYS_PATCH
    945 static const char* firefoxcmd[] = {"firefox", NULL};
    946 static const Key on_empty_keys[] = {
    947 	/* modifier key            function                argument */
    948 	{ 0,        XK_f,          spawn,                  {.v = firefoxcmd } },
    949 };
    950 #endif // ON_EMPTY_KEYS_PATCH
    951 
    952 #if XRESOURCES_PATCH
    953 /*
    954 * Xresources preferences to load at startup.
    955 *
    956 *     Name                      Type       Address
    957 *    ------------------------------------------------
    958 *     "nmaster"                 INTEGER    &nmaster
    959 *     "mfact"                   FLOAT      &mfact
    960 *     "color1"                  STRING     &color1
    961 *
    962 * In the Xresources file setting resources shoud be prefixed with "dwm.", e.g.
    963 *
    964 *    dwm.nmaster: 1
    965 *    dwm.mfact: 0.50
    966 *    dwm.color1: #FA6EFA
    967 *
    968 * Note that the const qualifier must be removed from the variables if you plan on
    969 * overriding them with values from Xresources. While resources can be reloaded
    970 * using the xrdb function some changes may only take effect following a restart.
    971 */
    972 ResourcePref resources[] = {
    973 	/* Resource name            Type       Address                */
    974 	{ "normfgcolor",            STRING,    &normfgcolor },
    975 	{ "normbgcolor",            STRING,    &normbgcolor },
    976 	{ "normbordercolor",        STRING,    &normbordercolor },
    977 	{ "normfloatcolor",         STRING,    &normfloatcolor },
    978 	{ "selfgcolor",             STRING,    &selfgcolor },
    979 	{ "selbgcolor",             STRING,    &selbgcolor },
    980 	{ "selbordercolor",         STRING,    &selbordercolor },
    981 	{ "selfloatcolor",          STRING,    &selfloatcolor },
    982 	{ "titlenormfgcolor",       STRING,    &titlenormfgcolor },
    983 	{ "titlenormbgcolor",       STRING,    &titlenormbgcolor },
    984 	{ "titlenormbordercolor",   STRING,    &titlenormbordercolor },
    985 	{ "titlenormfloatcolor",    STRING,    &titlenormfloatcolor },
    986 	{ "titleselfgcolor",        STRING,    &titleselfgcolor },
    987 	{ "titleselbgcolor",        STRING,    &titleselbgcolor },
    988 	{ "titleselbordercolor",    STRING,    &titleselbordercolor },
    989 	{ "titleselfloatcolor",     STRING,    &titleselfloatcolor },
    990 	{ "tagsnormfgcolor",        STRING,    &tagsnormfgcolor },
    991 	{ "tagsnormbgcolor",        STRING,    &tagsnormbgcolor },
    992 	{ "tagsnormbordercolor",    STRING,    &tagsnormbordercolor },
    993 	{ "tagsnormfloatcolor",     STRING,    &tagsnormfloatcolor },
    994 	{ "tagsselfgcolor",         STRING,    &tagsselfgcolor },
    995 	{ "tagsselbgcolor",         STRING,    &tagsselbgcolor },
    996 	{ "tagsselbordercolor",     STRING,    &tagsselbordercolor },
    997 	{ "tagsselfloatcolor",      STRING,    &tagsselfloatcolor },
    998 	{ "hidnormfgcolor",         STRING,    &hidnormfgcolor },
    999 	{ "hidnormbgcolor",         STRING,    &hidnormbgcolor },
   1000 	{ "hidselfgcolor",          STRING,    &hidselfgcolor },
   1001 	{ "hidselbgcolor",          STRING,    &hidselbgcolor },
   1002 	{ "urgfgcolor",             STRING,    &urgfgcolor },
   1003 	{ "urgbgcolor",             STRING,    &urgbgcolor },
   1004 	{ "urgbordercolor",         STRING,    &urgbordercolor },
   1005 	{ "urgfloatcolor",          STRING,    &urgfloatcolor },
   1006 	#if RENAMED_SCRATCHPADS_PATCH
   1007 	{ "scratchselfgcolor",      STRING,    &scratchselfgcolor },
   1008 	{ "scratchselbgcolor",      STRING,    &scratchselbgcolor },
   1009 	{ "scratchselbordercolor",  STRING,    &scratchselbordercolor },
   1010 	{ "scratchselfloatcolor",   STRING,    &scratchselfloatcolor },
   1011 	{ "scratchnormfgcolor",     STRING,    &scratchnormfgcolor },
   1012 	{ "scratchnormbgcolor",     STRING,    &scratchnormbgcolor },
   1013 	{ "scratchnormbordercolor", STRING,    &scratchnormbordercolor },
   1014 	{ "scratchnormfloatcolor",  STRING,    &scratchnormfloatcolor },
   1015 	#endif // RENAMED_SCRATCHPADS_PATCH
   1016 	#if BAR_FLEXWINTITLE_PATCH
   1017 	{ "normTTBbgcolor",         STRING,    &normTTBbgcolor },
   1018 	{ "normLTRbgcolor",         STRING,    &normLTRbgcolor },
   1019 	{ "normMONObgcolor",        STRING,    &normMONObgcolor },
   1020 	{ "normGRIDbgcolor",        STRING,    &normGRIDbgcolor },
   1021 	{ "normGRD1bgcolor",        STRING,    &normGRD1bgcolor },
   1022 	{ "normGRD2bgcolor",        STRING,    &normGRD2bgcolor },
   1023 	{ "normGRDMbgcolor",        STRING,    &normGRDMbgcolor },
   1024 	{ "normHGRDbgcolor",        STRING,    &normHGRDbgcolor },
   1025 	{ "normDWDLbgcolor",        STRING,    &normDWDLbgcolor },
   1026 	{ "normSPRLbgcolor",        STRING,    &normSPRLbgcolor },
   1027 	{ "normfloatbgcolor",       STRING,    &normfloatbgcolor },
   1028 	{ "actTTBbgcolor",          STRING,    &actTTBbgcolor },
   1029 	{ "actLTRbgcolor",          STRING,    &actLTRbgcolor },
   1030 	{ "actMONObgcolor",         STRING,    &actMONObgcolor },
   1031 	{ "actGRIDbgcolor",         STRING,    &actGRIDbgcolor },
   1032 	{ "actGRD1bgcolor",         STRING,    &actGRD1bgcolor },
   1033 	{ "actGRD2bgcolor",         STRING,    &actGRD2bgcolor },
   1034 	{ "actGRDMbgcolor",         STRING,    &actGRDMbgcolor },
   1035 	{ "actHGRDbgcolor",         STRING,    &actHGRDbgcolor },
   1036 	{ "actDWDLbgcolor",         STRING,    &actDWDLbgcolor },
   1037 	{ "actSPRLbgcolor",         STRING,    &actSPRLbgcolor },
   1038 	{ "actfloatbgcolor",        STRING,    &actfloatbgcolor },
   1039 	{ "selTTBbgcolor",          STRING,    &selTTBbgcolor },
   1040 	{ "selLTRbgcolor",          STRING,    &selLTRbgcolor },
   1041 	{ "selMONObgcolor",         STRING,    &selMONObgcolor },
   1042 	{ "selGRIDbgcolor",         STRING,    &selGRIDbgcolor },
   1043 	{ "selGRD1bgcolor",         STRING,    &selGRD1bgcolor },
   1044 	{ "selGRD2bgcolor",         STRING,    &selGRD2bgcolor },
   1045 	{ "selGRDMbgcolor",         STRING,    &selGRDMbgcolor },
   1046 	{ "selHGRDbgcolor",         STRING,    &selHGRDbgcolor },
   1047 	{ "selDWDLbgcolor",         STRING,    &selDWDLbgcolor },
   1048 	{ "selSPRLbgcolor",         STRING,    &selSPRLbgcolor },
   1049 	{ "selfloatbgcolor",        STRING,    &selfloatbgcolor },
   1050 	#endif // BAR_FLEXWINTITLE_PATCH
   1051 	#if BAR_LTSYMBOL_SCHEME_PATCH
   1052 	{ "ltsymbolfgcolor",        STRING,    &ltsymbolfgcolor },
   1053 	{ "ltsymbolbgcolor",        STRING,    &ltsymbolbgcolor },
   1054 	#endif // BAR_LTSYMBOL_SCHEME_PATCH
   1055 };
   1056 #endif // XRESOURCES_PATCH
   1057 
   1058 /* Send focused window to the monitor in the given direction (0=left, 1=right, 2=up, 3=down).
   1059  * Does nothing if no monitor exists in that direction. */
   1060 static void
   1061 tagmondir(const Arg *arg)
   1062 {
   1063 	Client *c = selmon->sel;
   1064 	Monitor *m, *best = NULL;
   1065 	int dist, bestdist = 99999;
   1066 
   1067 	if (!c || !mons->next)
   1068 		return;
   1069 
   1070 	for (m = mons; m; m = m->next) {
   1071 		if (m == selmon)
   1072 			continue;
   1073 		switch (arg->i) {
   1074 		case 0: /* left */
   1075 			if (m->mx + m->mw <= selmon->mx) {
   1076 				dist = selmon->mx - m->mx;
   1077 				if (dist < bestdist) { bestdist = dist; best = m; }
   1078 			}
   1079 			break;
   1080 		case 1: /* right */
   1081 			if (m->mx >= selmon->mx + selmon->mw) {
   1082 				dist = m->mx - selmon->mx;
   1083 				if (dist < bestdist) { bestdist = dist; best = m; }
   1084 			}
   1085 			break;
   1086 		case 2: /* up */
   1087 			if (m->my + m->mh <= selmon->my) {
   1088 				dist = selmon->my - m->my;
   1089 				if (dist < bestdist) { bestdist = dist; best = m; }
   1090 			}
   1091 			break;
   1092 		case 3: /* down */
   1093 			if (m->my >= selmon->my + selmon->mh) {
   1094 				dist = m->my - selmon->my;
   1095 				if (dist < bestdist) { bestdist = dist; best = m; }
   1096 			}
   1097 			break;
   1098 		}
   1099 	}
   1100 
   1101 	if (best)
   1102 		sendmon(c, best);
   1103 }
   1104 
   1105 static const Key keys[] = {
   1106 	/* modifier                     key            function                argument */
   1107 
   1108 	/* Custom keybindings */
   1109 	/* Audio and brightness */
   1110 	{ 0,                            XF86XK_AudioLowerVolume, spawn,        SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; kill -44 $(pidof dwmblocks)") },
   1111 	{ 0,                            XF86XK_AudioRaiseVolume, spawn,        SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; kill -44 $(pidof dwmblocks)") },
   1112 	{ 0,                            XF86XK_AudioMute,        spawn,        SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
   1113 	{ 0,                            XF86XK_MonBrightnessUp,  spawn,        {.v = (const char*[]){ "light", "-A", "5", NULL } } },
   1114 	{ 0,                            XF86XK_MonBrightnessDown,spawn,        {.v = (const char*[]){ "light", "-U", "5", NULL } } },
   1115 
   1116 	/* Screenshots */
   1117 	{ 0,                            XK_Print,      spawn,                  {.v = (const char*[]){ "screenshot", NULL } } },
   1118 	{ ShiftMask,                    XK_Print,      spawn,                  {.v = (const char*[]){ "screenshot", "select", NULL } } },
   1119 	{ MODKEY,                       XK_Print,      spawn,                  {.v = (const char*[]){ "record", NULL } } },
   1120 	{ MODKEY|ShiftMask,             XK_Print,      spawn,                  {.v = (const char*[]){ "record", "-stop", NULL } } },
   1121 
   1122 	/* Applications */
   1123 	{ MODKEY,                       XK_d,          spawn,                  {.v = (const char*[]){ "dlaunch", NULL } } },
   1124 	{ MODKEY,                       XK_Return,     spawn,                  {.v = termcmd } },
   1125 	{ MODKEY,                       XK_b,          spawn,                  {.v = (const char*[]){ "dbrowse", NULL } } },
   1126 	{ MODKEY,                       XK_w,          spawn,                  {.v = (const char*[]){ "dwrite", NULL } } },
   1127 	{ MODKEY,                       XK_r,          spawn,                  {.v = (const char*[]){ "dread", NULL } } },
   1128 	{ MODKEY,                       XK_n,          spawn,                  {.v = (const char*[]){ "dnotes", NULL } } },
   1129 	{ MODKEY,                       XK_e,          spawn,                  {.v = (const char*[]){ "dedit", NULL } } },
   1130 	{ MODKEY,                       XK_c,          spawn,                  {.v = (const char*[]){ "dcreate", NULL } } },
   1131 	{ MODKEY,                       XK_p,          spawn,                  {.v = (const char*[]){ "passmenu", NULL } } },
   1132 	{ MODKEY,                       XK_y,          spawn,                  {.v = (const char*[]){ "dtime", NULL } } },
   1133 	{ MODKEY,                       XK_m,          spawn,                  {.v = (const char*[]){ "dmode", NULL } } },
   1134 	{ MODKEY,                       XK_a,          spawn,                  {.v = (const char*[]){ "questions", NULL } } },
   1135 	{ MODKEY|ShiftMask,             XK_c,          spawn,                  {.v = (const char*[]){ "dclip", NULL } } },
   1136 	{ MODKEY|ShiftMask,             XK_n,          spawn,                  SHCMD("st -e newsboat; pkill -RTMIN+6 dwmblocks") },
   1137 	{ MODKEY|ShiftMask,             XK_m,          spawn,                  SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
   1138 	/* { MODKEY|ShiftMask,             XK_e,          spawn,                  {.v = (const char*[]){ "dmode", NULL } } }, // removed: moved to Mod+m */
   1139 
   1140 	/* System */
   1141 	{ MODKEY,                       XK_BackSpace,  spawn,                  {.v = (const char*[]){ "sysact", NULL } } },
   1142 	{ MODKEY|ShiftMask,             XK_q,          spawn,                  {.v = (const char*[]){ "sysact", NULL } } },
   1143 	{ MODKEY,                       XK_q,          killclient,             {0} },
   1144 
   1145 	#if KEYMODES_PATCH
   1146 	{ MODKEY,                       XK_Escape,     setkeymode,             {.ui = COMMANDMODE} },
   1147 	#endif // KEYMODES_PATCH
   1148 	/* { MODKEY,                       XK_p,          spawn,                  {.v = dmenucmd } }, // removed: moved to Super+d via dlaunch */
   1149 	{ MODKEY|ShiftMask,             XK_Return,     spawn,                  {.v = termcmd } },
   1150 	#if RIODRAW_PATCH
   1151 	{ MODKEY|ControlMask,           XK_p,          riospawnsync,           {.v = dmenucmd } },
   1152 	{ MODKEY|ControlMask,           XK_Return,     riospawn,               {.v = termcmd } },
   1153 	{ MODKEY,                       XK_s,          rioresize,              {0} },
   1154 	#endif // RIODRAW_PATCH
   1155 	/* { MODKEY,                       XK_b,          togglebar,              {0} }, // removed: Super+b now dbrowse */
   1156 	#if TOGGLETOPBAR_PATCH
   1157 	{ MODKEY|ShiftMask,             XK_b,          toggletopbar,           {0} },
   1158 	#endif // TOGGLETOPBAR_PATCH
   1159 	#if TAB_PATCH
   1160 	{ MODKEY|ControlMask,           XK_b,          tabmode,                {-1} },
   1161 	#endif // TAB_PATCH
   1162 	#if FOCUSMASTER_PATCH || FOCUSMASTER_RETURN_PATCH
   1163 	{ MODKEY|ControlMask,           XK_space,      focusmaster,            {0} },
   1164 	#endif // FOCUSMASTER_PATCH / FOCUSMASTER_RETURN_PATCH
   1165 	#if STACKER_PATCH
   1166 	STACKKEYS(MODKEY,                              focus)
   1167 	STACKKEYS(MODKEY|ShiftMask,                    push)
   1168 	#else
   1169 	{ MODKEY,                       XK_j,          focusstack,             {.i = +1 } },
   1170 	{ MODKEY,                       XK_k,          focusstack,             {.i = -1 } },
   1171 	#endif // STACKER_PATCH
   1172 	#if FOCUSDIR_PATCH
   1173 	{ MODKEY,                       XK_Left,       focusdir,               {.i = 0 } }, // left
   1174 	{ MODKEY,                       XK_Right,      focusdir,               {.i = 1 } }, // right
   1175 	{ MODKEY,                       XK_Up,         focusdir,               {.i = 2 } }, // up
   1176 	{ MODKEY,                       XK_Down,       focusdir,               {.i = 3 } }, // down
   1177 	#endif // FOCUSDIR_PATCH
   1178 	#if PLACEDIR_PATCH
   1179 	{ MODKEY|ControlMask,           XK_Left,       placedir,               {.i = 0 } }, // left
   1180 	{ MODKEY|ControlMask,           XK_Right,      placedir,               {.i = 1 } }, // right
   1181 	{ MODKEY|ControlMask,           XK_Up,         placedir,               {.i = 2 } }, // up
   1182 	{ MODKEY|ControlMask,           XK_Down,       placedir,               {.i = 3 } }, // down
   1183 	#endif // PLACEDIR_PATCH
   1184 	#if SWAPFOCUS_PATCH && PERTAG_PATCH
   1185 	{ MODKEY,                       XK_s,          swapfocus,              {.i = -1 } },
   1186 	#endif // SWAPFOCUS_PATCH
   1187 	#if SWITCHCOL_PATCH
   1188 	{ MODKEY,                       XK_v,          switchcol,              {0} },
   1189 	#endif // SWITCHCOL_PATCH
   1190 	#if ROTATESTACK_PATCH
   1191 	{ MODKEY|Mod4Mask,              XK_j,          rotatestack,            {.i = +1 } },
   1192 	{ MODKEY|Mod4Mask,              XK_k,          rotatestack,            {.i = -1 } },
   1193 	#endif // ROTATESTACK_PATCH
   1194 	#if INPLACEROTATE_PATCH
   1195 	{ MODKEY|Mod4Mask,              XK_j,          inplacerotate,          {.i = +2 } }, // same as rotatestack
   1196 	{ MODKEY|Mod4Mask,              XK_k,          inplacerotate,          {.i = -2 } }, // same as reotatestack
   1197 	{ MODKEY|Mod4Mask|ShiftMask,    XK_j,          inplacerotate,          {.i = +1} },
   1198 	{ MODKEY|Mod4Mask|ShiftMask,    XK_k,          inplacerotate,          {.i = -1} },
   1199 	#endif // INPLACEROTATE_PATCH
   1200 	#if PUSH_PATCH || PUSH_NO_MASTER_PATCH
   1201 	{ MODKEY|ControlMask,           XK_j,          pushdown,               {0} },
   1202 	{ MODKEY|ControlMask,           XK_k,          pushup,                 {0} },
   1203 	#endif // PUSH_PATCH / PUSH_NO_MASTER_PATCH
   1204 	{ MODKEY,                       XK_i,          incnmaster,             {.i = +1 } },
   1205 	/* { MODKEY,                       XK_d,          incnmaster,             {.i = -1 } }, // removed: Super+d now dlaunch */
   1206 	#if FLEXTILE_DELUXE_LAYOUT
   1207 	{ MODKEY|ControlMask,           XK_i,          incnstack,              {.i = +1 } },
   1208 	{ MODKEY|ControlMask,           XK_u,          incnstack,              {.i = -1 } },
   1209 	#endif // FLEXTILE_DELUXE_LAYOUT
   1210 	{ MODKEY,                       XK_h,          setmfact,               {.f = -0.05} },
   1211 	{ MODKEY,                       XK_l,          setmfact,               {.f = +0.05} },
   1212 	#if CFACTS_PATCH
   1213 	{ MODKEY|ShiftMask,             XK_h,          setcfact,               {.f = +0.25} },
   1214 	{ MODKEY|ShiftMask,             XK_l,          setcfact,               {.f = -0.25} },
   1215 	{ MODKEY|ShiftMask,             XK_o,          setcfact,               {0} },
   1216 	#endif // CFACTS_PATCH
   1217 	#if ASPECTRESIZE_PATCH
   1218 	{ MODKEY|ControlMask|ShiftMask, XK_e,          aspectresize,           {.i = +24} },
   1219 	{ MODKEY|ControlMask|ShiftMask, XK_r,          aspectresize,           {.i = -24} },
   1220 	#endif // ASPECTRESIZE_PATCH
   1221 	#if MOVERESIZE_PATCH
   1222 	{ MODKEY|Mod4Mask,              XK_Down,       moveresize,             {.v = "0x 25y 0w 0h" } },
   1223 	{ MODKEY|Mod4Mask,              XK_Up,         moveresize,             {.v = "0x -25y 0w 0h" } },
   1224 	{ MODKEY|Mod4Mask,              XK_Right,      moveresize,             {.v = "25x 0y 0w 0h" } },
   1225 	{ MODKEY|Mod4Mask,              XK_Left,       moveresize,             {.v = "-25x 0y 0w 0h" } },
   1226 	{ MODKEY|Mod4Mask|ShiftMask,    XK_Down,       moveresize,             {.v = "0x 0y 0w 25h" } },
   1227 	{ MODKEY|Mod4Mask|ShiftMask,    XK_Up,         moveresize,             {.v = "0x 0y 0w -25h" } },
   1228 	{ MODKEY|Mod4Mask|ShiftMask,    XK_Right,      moveresize,             {.v = "0x 0y 25w 0h" } },
   1229 	{ MODKEY|Mod4Mask|ShiftMask,    XK_Left,       moveresize,             {.v = "0x 0y -25w 0h" } },
   1230 	#endif // MOVERESIZE_PATCH
   1231 	#if MOVESTACK_PATCH
   1232 	{ MODKEY|ShiftMask,             XK_j,          movestack,              {.i = +1 } },
   1233 	{ MODKEY|ShiftMask,             XK_k,          movestack,              {.i = -1 } },
   1234 	#endif // MOVESTACK_PATCH
   1235 	#if TRANSFER_PATCH
   1236 	{ MODKEY,                       XK_x,          transfer,               {0} },
   1237 	#endif // TRANSFER_PATCH
   1238 	#if TRANSFER_ALL_PATCH
   1239 	{ MODKEY|ControlMask,           XK_x,          transferall,            {0} },
   1240 	#endif // TRANSFER_ALL_PATCH
   1241 	#if REORGANIZETAGS_PATCH
   1242 	{ MODKEY|ControlMask,           XK_r,          reorganizetags,         {0} },
   1243 	#endif // REORGANIZETAGS_PATCH
   1244 	#if DISTRIBUTETAGS_PATCH
   1245 	{ MODKEY|ControlMask,           XK_d,          distributetags,         {0} },
   1246 	#endif // DISTRIBUTETAGS_PATCH
   1247 	#if INSETS_PATCH
   1248 	{ MODKEY|ShiftMask|ControlMask, XK_a,          updateinset,            {.v = &default_inset } },
   1249 	#endif // INSETS_PATCH
   1250 	{ MODKEY,                       XK_Return,     zoom,                   {0} },
   1251 	#if VANITYGAPS_PATCH
   1252 	{ MODKEY|Mod4Mask,              XK_u,          incrgaps,               {.i = +1 } },
   1253 	{ MODKEY|Mod4Mask|ShiftMask,    XK_u,          incrgaps,               {.i = -1 } },
   1254 	{ MODKEY|Mod4Mask,              XK_i,          incrigaps,              {.i = +1 } },
   1255 	{ MODKEY|Mod4Mask|ShiftMask,    XK_i,          incrigaps,              {.i = -1 } },
   1256 	{ MODKEY|Mod4Mask,              XK_o,          incrogaps,              {.i = +1 } },
   1257 	{ MODKEY|Mod4Mask|ShiftMask,    XK_o,          incrogaps,              {.i = -1 } },
   1258 	{ MODKEY|Mod4Mask,              XK_6,          incrihgaps,             {.i = +1 } },
   1259 	{ MODKEY|Mod4Mask|ShiftMask,    XK_6,          incrihgaps,             {.i = -1 } },
   1260 	{ MODKEY|Mod4Mask,              XK_7,          incrivgaps,             {.i = +1 } },
   1261 	{ MODKEY|Mod4Mask|ShiftMask,    XK_7,          incrivgaps,             {.i = -1 } },
   1262 	{ MODKEY|Mod4Mask,              XK_8,          incrohgaps,             {.i = +1 } },
   1263 	{ MODKEY|Mod4Mask|ShiftMask,    XK_8,          incrohgaps,             {.i = -1 } },
   1264 	{ MODKEY|Mod4Mask,              XK_9,          incrovgaps,             {.i = +1 } },
   1265 	{ MODKEY|Mod4Mask|ShiftMask,    XK_9,          incrovgaps,             {.i = -1 } },
   1266 	{ MODKEY|Mod4Mask,              XK_0,          togglegaps,             {0} },
   1267 	{ MODKEY|Mod4Mask|ShiftMask,    XK_0,          defaultgaps,            {0} },
   1268 	#endif // VANITYGAPS_PATCH
   1269 	#if ALT_TAB_PATCH
   1270 	{ Mod1Mask,                     XK_Tab,        alttabstart,            {0} },
   1271 	#else
   1272 	{ MODKEY,                       XK_Tab,        view,                   {0} },
   1273 	#endif // ALT_TAB_PATCH
   1274 	#if SHIFTTAG_PATCH
   1275 	{ MODKEY|ShiftMask,             XK_Left,       shifttag,               { .i = -1 } }, // note keybinding conflict with focusadjacenttag tagtoleft
   1276 	{ MODKEY|ShiftMask,             XK_Right,      shifttag,               { .i = +1 } }, // note keybinding conflict with focusadjacenttag tagtoright
   1277 	#endif // SHIFTTAG_PATCH
   1278 	#if SHIFTTAGCLIENTS_PATCH
   1279 	{ MODKEY|ShiftMask|ControlMask, XK_Left,       shifttagclients,        { .i = -1 } },
   1280 	{ MODKEY|ShiftMask|ControlMask, XK_Right,      shifttagclients,        { .i = +1 } },
   1281 	#endif // SHIFTTAGCLIENTS_PATCH
   1282 	#if SHIFTVIEW_PATCH
   1283 	{ MODKEY|ShiftMask,             XK_Tab,        shiftview,              { .i = -1 } },
   1284 	{ MODKEY|ShiftMask,             XK_backslash,  shiftview,              { .i = +1 } },
   1285 	#endif // SHIFTVIEW_PATCH
   1286 	#if SHIFTVIEW_CLIENTS_PATCH
   1287 	{ MODKEY|Mod4Mask,              XK_Tab,        shiftviewclients,       { .i = -1 } },
   1288 	{ MODKEY|Mod4Mask,              XK_backslash,  shiftviewclients,       { .i = +1 } },
   1289 	#endif // SHIFTVIEW_CLIENTS_PATCH
   1290 	#if SHIFTBOTH_PATCH
   1291 	{ MODKEY|ControlMask,           XK_Left,       shiftboth,              { .i = -1 } }, // note keybinding conflict with focusadjacenttag tagandviewtoleft placedir
   1292 	{ MODKEY|ControlMask,           XK_Right,      shiftboth,              { .i = +1 } }, // note keybinding conflict with focusadjacenttag tagandviewtoright placedir
   1293 	#endif // SHIFTBOTH_PATCH
   1294 	#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
   1295 	{ MODKEY|Mod4Mask|ShiftMask,    XK_Left,       shiftswaptags,          { .i = -1 } },
   1296 	{ MODKEY|Mod4Mask|ShiftMask,    XK_Right,      shiftswaptags,          { .i = +1 } },
   1297 	#endif // SHIFTSWAPTAGS_PATCH
   1298 	#if BAR_WINTITLEACTIONS_PATCH
   1299 	{ MODKEY|ControlMask,           XK_z,          showhideclient,         {0} },
   1300 	{ MODKEY|ControlMask,           XK_s,          unhideall,              {0} },
   1301 	#endif // BAR_WINTITLEACTIONS_PATCH
   1302 	/* { MODKEY|ShiftMask,             XK_c,          killclient,             {0} }, // removed: Super+Shift+c now dclip, kill via Super+q */
   1303 	#if KILLUNSEL_PATCH
   1304 	{ MODKEY|ShiftMask,             XK_x,          killunsel,              {0} },
   1305 	#endif // KILLUNSEL_PATCH
   1306 	#if SELFRESTART_PATCH
   1307 	/* { MODKEY|ShiftMask,             XK_r,          self_restart,           {0} }, // removed: Super+Shift+r now reading mode, restart via sysact */
   1308 	#endif // SELFRESTART_PATCH
   1309 	/* { MODKEY|ShiftMask,             XK_q,          quit,                   {0} }, // removed: conflicts with sysact, quit via sysact menu */
   1310 	#if RESTARTSIG_PATCH
   1311 	{ MODKEY|ControlMask|ShiftMask, XK_q,          quit,                   {1} },
   1312 	#endif // RESTARTSIG_PATCH
   1313 	#if FOCUSURGENT_PATCH
   1314 	{ MODKEY,                       XK_u,          focusurgent,            {0} },
   1315 	#endif // FOCUSURGENT_PATCH
   1316 	#if BAR_HOLDBAR_PATCH
   1317 	{ 0,                            HOLDKEY,       holdbar,                {0} },
   1318 	#endif // BAR_HOLDBAR_PATCH
   1319 	#if WINVIEW_PATCH
   1320 	{ MODKEY,                       XK_o,          winview,                {0} },
   1321 	#endif // WINVIEW_PATCH
   1322 	#if XRDB_PATCH || XRESOURCES_PATCH
   1323 	{ MODKEY|ShiftMask,             XK_F5,         xrdb,                   {.v = NULL } },
   1324 	#endif // XRDB_PATCH | XRESOURCES_PATCH
   1325 	{ MODKEY,                       XK_t,          setlayout,              {.v = &layouts[0]} },
   1326 	{ MODKEY,                       XK_f,          setlayout,              {.v = &layouts[1]} },
   1327 	{ MODKEY|ShiftMask,             XK_r,          setlayout,              {.v = &layouts[14]} }, // reading mode (RRR)
   1328 	#if COLUMNS_LAYOUT
   1329 	/* { MODKEY,                       XK_c,          setlayout,              {.v = &layouts[3]} }, // removed: Super+c now dcreate */
   1330 	#endif // COLUMNS_LAYOUT
   1331 	#if FLEXTILE_DELUXE_LAYOUT
   1332 	{ MODKEY|ControlMask,           XK_t,          rotatelayoutaxis,       {.i = +1 } },   /* flextile, 1 = layout axis */
   1333 	{ MODKEY|ControlMask,           XK_Tab,        rotatelayoutaxis,       {.i = +2 } },   /* flextile, 2 = master axis */
   1334 	{ MODKEY|ControlMask|ShiftMask, XK_Tab,        rotatelayoutaxis,       {.i = +3 } },   /* flextile, 3 = stack axis */
   1335 	{ MODKEY|ControlMask|Mod1Mask,  XK_Tab,        rotatelayoutaxis,       {.i = +4 } },   /* flextile, 4 = secondary stack axis */
   1336 	{ MODKEY|Mod5Mask,              XK_t,          rotatelayoutaxis,       {.i = -1 } },   /* flextile, 1 = layout axis */
   1337 	{ MODKEY|Mod5Mask,              XK_Tab,        rotatelayoutaxis,       {.i = -2 } },   /* flextile, 2 = master axis */
   1338 	{ MODKEY|Mod5Mask|ShiftMask,    XK_Tab,        rotatelayoutaxis,       {.i = -3 } },   /* flextile, 3 = stack axis */
   1339 	{ MODKEY|Mod5Mask|Mod1Mask,     XK_Tab,        rotatelayoutaxis,       {.i = -4 } },   /* flextile, 4 = secondary stack axis */
   1340 	{ MODKEY|ControlMask,           XK_Return,     mirrorlayout,           {0} },          /* flextile, flip master and stack areas */
   1341 	#endif // FLEXTILE_DELUXE_LAYOUT
   1342 	{ MODKEY,                       XK_space,      setlayout,              {0} },
   1343 	{ MODKEY|ShiftMask,             XK_space,      togglefloating,         {0} },
   1344 	#if ALWAYSONTOP_PATCH
   1345 	{ MODKEY|ShiftMask,             XK_space,      togglealwaysontop,      {0} },
   1346 	#endif // ALWAYSONTOP_PATCH
   1347 	#if MAXIMIZE_PATCH
   1348 	{ MODKEY|ControlMask|ShiftMask, XK_h,          togglehorizontalmax,    {0} },
   1349 	{ MODKEY|ControlMask|ShiftMask, XK_l,          togglehorizontalmax,    {0} },
   1350 	{ MODKEY|ControlMask|ShiftMask, XK_j,          toggleverticalmax,      {0} },
   1351 	{ MODKEY|ControlMask|ShiftMask, XK_k,          toggleverticalmax,      {0} },
   1352 	{ MODKEY|ControlMask,           XK_m,          togglemax,              {0} },
   1353 	#endif // MAXIMIZE_PATCH
   1354 	#if NO_MOD_BUTTONS_PATCH
   1355 	{ MODKEY|ShiftMask,             XK_Escape,     togglenomodbuttons,     {0} },
   1356 	#endif // NO_MOD_BUTTONS_PATCH
   1357 	#if RENAMED_SCRATCHPADS_PATCH
   1358 	{ MODKEY,                       XK_grave,      togglescratch,          {.v = scratchpadcmd } },
   1359 	{ MODKEY|ControlMask,           XK_grave,      setscratch,             {.v = scratchpadcmd } },
   1360 	{ MODKEY|ShiftMask,             XK_grave,      removescratch,          {.v = scratchpadcmd } },
   1361 	#elif SCRATCHPADS_PATCH
   1362 	{ MODKEY,                       XK_grave,      togglescratch,          {.ui = 0 } },
   1363 	{ MODKEY|ControlMask,           XK_grave,      setscratch,             {.ui = 0 } },
   1364 	{ MODKEY|ShiftMask,             XK_grave,      removescratch,          {.ui = 0 } },
   1365 	#endif // SCRATCHPADS_PATCH | RENAMED_SCRATCHPADS_PATCH
   1366 	#if UNFLOATVISIBLE_PATCH
   1367 	{ MODKEY|Mod4Mask,              XK_space,      unfloatvisible,         {0} },
   1368 	{ MODKEY|ShiftMask,             XK_t,          unfloatvisible,         {.v = &layouts[0]} },
   1369 	#endif // UNFLOATVISIBLE_PATCH
   1370 	#if TOGGLEFULLSCREEN_PATCH
   1371 	/* { MODKEY,                       XK_y,          togglefullscreen,       {0} }, // removed: Super+y now dtime */
   1372 	#endif // TOGGLEFULLSCREEN_PATCH
   1373 	#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
   1374 	/* { MODKEY|ShiftMask,             XK_y,          togglefakefullscreen,   {0} }, // removed: freed */
   1375 	#endif // FAKEFULLSCREEN_CLIENT_PATCH
   1376 	#if FULLSCREEN_PATCH
   1377 	{ MODKEY|ShiftMask,             XK_f,          fullscreen,             {0} },
   1378 	#endif // FULLSCREEN_PATCH
   1379 	#if STICKY_PATCH
   1380 	{ MODKEY|ShiftMask,             XK_s,          togglesticky,           {0} },
   1381 	#endif // STICKY_PATCH
   1382 	#if SCRATCHPAD_ALT_1_PATCH
   1383 	{ MODKEY,                       XK_minus,      scratchpad_show,        {0} },
   1384 	{ MODKEY|ShiftMask,             XK_minus,      scratchpad_hide,        {0} },
   1385 	{ MODKEY,                       XK_equal,      scratchpad_remove,      {0} },
   1386 	#elif SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH
   1387 	{ MODKEY,                       XK_0,          view,                   {.ui = ~SPTAGMASK } },
   1388 	{ MODKEY|ShiftMask,             XK_0,          tag,                    {.ui = ~SPTAGMASK } },
   1389 	#else
   1390 	{ MODKEY,                       XK_0,          view,                   {.ui = ~0 } },
   1391 	{ MODKEY|ShiftMask,             XK_0,          tag,                    {.ui = ~0 } },
   1392 	#endif // SCRATCHPAD_ALT_1_PATCH
   1393 	{ MODKEY,                       XK_comma,      focusmon,               {.i = -1 } },
   1394 	{ MODKEY,                       XK_period,     focusmon,               {.i = +1 } },
   1395 	/* { MODKEY|ShiftMask,             XK_comma,      tagmon,                 {.i = -1 } }, // removed: send window via Super+Arrow instead */
   1396 	/* { MODKEY|ShiftMask,             XK_period,     tagmon,                 {.i = +1 } }, // removed: send window via Super+Arrow instead */
   1397 	{ MODKEY,                       XK_Left,       tagmondir,              {.i = 0 } }, // send window to left monitor
   1398 	{ MODKEY,                       XK_Right,      tagmondir,              {.i = 1 } }, // send window to right monitor
   1399 	{ MODKEY,                       XK_Up,         tagmondir,              {.i = 2 } }, // send window to upper monitor
   1400 	{ MODKEY,                       XK_Down,       tagmondir,              {.i = 3 } }, // send window to lower monitor
   1401 	#if FOCUSADJACENTTAG_PATCH
   1402 	{ MODKEY,                       XK_Left,       viewtoleft,             {0} }, // note keybinding conflict with focusdir
   1403 	{ MODKEY,                       XK_Right,      viewtoright,            {0} }, // note keybinding conflict with focusdir
   1404 	{ MODKEY|ShiftMask,             XK_Left,       tagtoleft,              {0} }, // note keybinding conflict with shifttag
   1405 	{ MODKEY|ShiftMask,             XK_Right,      tagtoright,             {0} }, // note keybinding conflict with shifttag
   1406 	{ MODKEY|ControlMask,           XK_Left,       tagandviewtoleft,       {0} }, // note keybinding conflict with placedir
   1407 	{ MODKEY|ControlMask,           XK_Right,      tagandviewtoright,      {0} }, // note keybinding conflict with placedir
   1408 	#endif // FOCUSADJACENTTAG_PATCH
   1409 	#if TAGALL_PATCH
   1410 	{ MODKEY|ShiftMask,             XK_F1,         tagall,                 {.v = "F1"} },
   1411 	{ MODKEY|ShiftMask,             XK_F2,         tagall,                 {.v = "F2"} },
   1412 	{ MODKEY|ShiftMask,             XK_F3,         tagall,                 {.v = "F3"} },
   1413 	{ MODKEY|ShiftMask,             XK_F4,         tagall,                 {.v = "F4"} },
   1414 	{ MODKEY|ShiftMask,             XK_F5,         tagall,                 {.v = "F5"} },
   1415 	{ MODKEY|ShiftMask,             XK_F6,         tagall,                 {.v = "F6"} },
   1416 	{ MODKEY|ShiftMask,             XK_F7,         tagall,                 {.v = "F7"} },
   1417 	{ MODKEY|ShiftMask,             XK_F8,         tagall,                 {.v = "F8"} },
   1418 	{ MODKEY|ShiftMask,             XK_F9,         tagall,                 {.v = "F9"} },
   1419 	{ MODKEY|ControlMask,           XK_F1,         tagall,                 {.v = "1"} },
   1420 	{ MODKEY|ControlMask,           XK_F2,         tagall,                 {.v = "2"} },
   1421 	{ MODKEY|ControlMask,           XK_F3,         tagall,                 {.v = "3"} },
   1422 	{ MODKEY|ControlMask,           XK_F4,         tagall,                 {.v = "4"} },
   1423 	{ MODKEY|ControlMask,           XK_F5,         tagall,                 {.v = "5"} },
   1424 	{ MODKEY|ControlMask,           XK_F6,         tagall,                 {.v = "6"} },
   1425 	{ MODKEY|ControlMask,           XK_F7,         tagall,                 {.v = "7"} },
   1426 	{ MODKEY|ControlMask,           XK_F8,         tagall,                 {.v = "8"} },
   1427 	{ MODKEY|ControlMask,           XK_F9,         tagall,                 {.v = "9"} },
   1428 	#endif // TAGALL_PATCH
   1429 	#if TAGALLMON_PATCH
   1430 	{ MODKEY|Mod4Mask|ShiftMask,    XK_comma,      tagallmon,              {.i = +1 } },
   1431 	{ MODKEY|Mod4Mask|ShiftMask,    XK_period,     tagallmon,              {.i = -1 } },
   1432 	#endif // TAGALLMON_PATCH
   1433 	#if TAGSWAPMON_PATCH
   1434 	{ MODKEY|Mod4Mask|ControlMask,  XK_comma,      tagswapmon,             {.i = +1 } },
   1435 	{ MODKEY|Mod4Mask|ControlMask,  XK_period,     tagswapmon,             {.i = -1 } },
   1436 	#endif // TAGSWAPMON_PATCH
   1437 	#if BAR_ALTERNATIVE_TAGS_PATCH
   1438 	{ MODKEY,                       XK_n,          togglealttag,           {0} },
   1439 	#endif // BAR_ALTERNATIVE_TAGS_PATCH
   1440 	#if NAMETAG_PATCH
   1441 	{ MODKEY|ShiftMask,             XK_n,          nametag,                {0} },
   1442 	#endif // NAMETAG_PATCH
   1443 	#if BAR_TAGGRID_PATCH
   1444 	{ MODKEY|ControlMask,           XK_Up,         switchtag,              { .ui = SWITCHTAG_UP    | SWITCHTAG_VIEW } },
   1445 	{ MODKEY|ControlMask,           XK_Down,       switchtag,              { .ui = SWITCHTAG_DOWN  | SWITCHTAG_VIEW } },
   1446 	{ MODKEY|ControlMask,           XK_Right,      switchtag,              { .ui = SWITCHTAG_RIGHT | SWITCHTAG_VIEW } }, // note keybinding conflict with placedir
   1447 	{ MODKEY|ControlMask,           XK_Left,       switchtag,              { .ui = SWITCHTAG_LEFT  | SWITCHTAG_VIEW } }, // note keybinding conflict with placedir
   1448 	{ MODKEY|Mod4Mask,              XK_Up,         switchtag,              { .ui = SWITCHTAG_UP    | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
   1449 	{ MODKEY|Mod4Mask,              XK_Down,       switchtag,              { .ui = SWITCHTAG_DOWN  | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
   1450 	{ MODKEY|Mod4Mask,              XK_Right,      switchtag,              { .ui = SWITCHTAG_RIGHT | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
   1451 	{ MODKEY|Mod4Mask,              XK_Left,       switchtag,              { .ui = SWITCHTAG_LEFT  | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
   1452 	#endif // BAR_TAGGRID_PATCH
   1453 	#if MOVECENTER_PATCH
   1454 	{ MODKEY,                       XK_x,          movecenter,             {0} }, // note keybinding conflict with killunsel
   1455 	#endif // MOVECENTER_PATCH
   1456 	#if MOVEPLACE_PATCH
   1457 	{ MODKEY,                       XK_KP_7,       moveplace,              {.ui = WIN_NW }},   /* XK_KP_Home,  */
   1458 	{ MODKEY,                       XK_KP_8,       moveplace,              {.ui = WIN_N  }},   /* XK_KP_Up,    */
   1459 	{ MODKEY,                       XK_KP_9,       moveplace,              {.ui = WIN_NE }},   /* XK_KP_Prior, */
   1460 	{ MODKEY,                       XK_KP_4,       moveplace,              {.ui = WIN_W  }},   /* XK_KP_Left,  */
   1461 	{ MODKEY,                       XK_KP_5,       moveplace,              {.ui = WIN_C  }},   /* XK_KP_Begin, */
   1462 	{ MODKEY,                       XK_KP_6,       moveplace,              {.ui = WIN_E  }},   /* XK_KP_Right, */
   1463 	{ MODKEY,                       XK_KP_1,       moveplace,              {.ui = WIN_SW }},   /* XK_KP_End,   */
   1464 	{ MODKEY,                       XK_KP_2,       moveplace,              {.ui = WIN_S  }},   /* XK_KP_Down,  */
   1465 	{ MODKEY,                       XK_KP_3,       moveplace,              {.ui = WIN_SE }},   /* XK_KP_Next,  */
   1466 	#endif // MOVEPLACE_PATCH
   1467 	#if EXRESIZE_PATCH
   1468 	{ MODKEY,                       XK_KP_7,       explace,                {.ui = EX_NW }},   /* XK_KP_Home,  */
   1469 	{ MODKEY,                       XK_KP_8,       explace,                {.ui = EX_N  }},   /* XK_KP_Up,    */
   1470 	{ MODKEY,                       XK_KP_9,       explace,                {.ui = EX_NE }},   /* XK_KP_Prior, */
   1471 	{ MODKEY,                       XK_KP_4,       explace,                {.ui = EX_W  }},   /* XK_KP_Left,  */
   1472 	{ MODKEY,                       XK_KP_5,       explace,                {.ui = EX_C  }},   /* XK_KP_Begin, */
   1473 	{ MODKEY,                       XK_KP_6,       explace,                {.ui = EX_E  }},   /* XK_KP_Right, */
   1474 	{ MODKEY,                       XK_KP_1,       explace,                {.ui = EX_SW }},   /* XK_KP_End,   */
   1475 	{ MODKEY,                       XK_KP_2,       explace,                {.ui = EX_S  }},   /* XK_KP_Down,  */
   1476 	{ MODKEY,                       XK_KP_3,       explace,                {.ui = EX_SE }},   /* XK_KP_Next,  */
   1477 
   1478 	{ MODKEY|ShiftMask,             XK_KP_8,       exresize,               {.v = (int []){   0,  25 }}},  /* XK_KP_Up,    */
   1479 	{ MODKEY|ShiftMask,             XK_KP_2,       exresize,               {.v = (int []){   0, -25 }}},  /* XK_KP_Down,  */
   1480 	{ MODKEY|ShiftMask,             XK_KP_6,       exresize,               {.v = (int []){  25,   0 }}},  /* XK_KP_Right, */
   1481 	{ MODKEY|ShiftMask,             XK_KP_4,       exresize,               {.v = (int []){ -25,   0 }}},  /* XK_KP_Left,  */
   1482 	{ MODKEY|ShiftMask,             XK_KP_5,       exresize,               {.v = (int []){  25,  25 }}},  /* XK_KP_Begin, */
   1483 	{ MODKEY|ShiftMask|ControlMask, XK_KP_5,       exresize,               {.v = (int []){ -25, -25 }}},  /* XK_KP_Begin, */
   1484 
   1485 	{ MODKEY|ControlMask,           XK_KP_6,       togglehorizontalexpand, {.i = +1} },  /* XK_KP_Right, */
   1486 	{ MODKEY|ControlMask,           XK_KP_3,       togglehorizontalexpand, {.i =  0} },  /* XK_KP_Next,  */
   1487 	{ MODKEY|ControlMask,           XK_KP_4,       togglehorizontalexpand, {.i = -1} },  /* XK_KP_Left,  */
   1488 	{ MODKEY|ControlMask,           XK_KP_8,       toggleverticalexpand,   {.i = +1} },  /* XK_KP_Up,    */
   1489 	{ MODKEY|ControlMask,           XK_KP_1,       toggleverticalexpand,   {.i =  0} },  /* XK_KP_End,   */
   1490 	{ MODKEY|ControlMask,           XK_KP_2,       toggleverticalexpand,   {.i = -1} },  /* XK_KP_Down,  */
   1491 	{ MODKEY|ControlMask,           XK_KP_9,       togglemaximize,         {.i = -1} },  /* XK_KP_Prior, */
   1492 	{ MODKEY|ControlMask,           XK_KP_7,       togglemaximize,         {.i = +1} },  /* XK_KP_Home,  */
   1493 	{ MODKEY|ControlMask,           XK_KP_5,       togglemaximize,         {.i =  0} },  /* XK_KP_Begin, */
   1494 	#endif // EXRESIZE_PATCH
   1495 	#if FLOATPOS_PATCH
   1496 	/* Note that due to key limitations the below example kybindings are defined with a Mod3Mask,
   1497 	 * which is not always readily available. Refer to the patch wiki for more details. */
   1498 	/* Client position is limited to monitor window area */
   1499 	{ Mod3Mask,                     XK_u,            floatpos,               {.v = "-26x -26y" } }, // ↖
   1500 	{ Mod3Mask,                     XK_i,            floatpos,               {.v = "  0x -26y" } }, // ↑
   1501 	{ Mod3Mask,                     XK_o,            floatpos,               {.v = " 26x -26y" } }, // ↗
   1502 	{ Mod3Mask,                     XK_j,            floatpos,               {.v = "-26x   0y" } }, // ←
   1503 	{ Mod3Mask,                     XK_l,            floatpos,               {.v = " 26x   0y" } }, // →
   1504 	{ Mod3Mask,                     XK_m,            floatpos,               {.v = "-26x  26y" } }, // ↙
   1505 	{ Mod3Mask,                     XK_comma,        floatpos,               {.v = "  0x  26y" } }, // ↓
   1506 	{ Mod3Mask,                     XK_period,       floatpos,               {.v = " 26x  26y" } }, // ↘
   1507 	/* Absolute positioning (allows moving windows between monitors) */
   1508 	{ Mod3Mask|ControlMask,         XK_u,            floatpos,               {.v = "-26a -26a" } }, // ↖
   1509 	{ Mod3Mask|ControlMask,         XK_i,            floatpos,               {.v = "  0a -26a" } }, // ↑
   1510 	{ Mod3Mask|ControlMask,         XK_o,            floatpos,               {.v = " 26a -26a" } }, // ↗
   1511 	{ Mod3Mask|ControlMask,         XK_j,            floatpos,               {.v = "-26a   0a" } }, // ←
   1512 	{ Mod3Mask|ControlMask,         XK_l,            floatpos,               {.v = " 26a   0a" } }, // →
   1513 	{ Mod3Mask|ControlMask,         XK_m,            floatpos,               {.v = "-26a  26a" } }, // ↙
   1514 	{ Mod3Mask|ControlMask,         XK_comma,        floatpos,               {.v = "  0a  26a" } }, // ↓
   1515 	{ Mod3Mask|ControlMask,         XK_period,       floatpos,               {.v = " 26a  26a" } }, // ↘
   1516 	/* Resize client, client center position is fixed which means that client expands in all directions */
   1517 	{ Mod3Mask|ShiftMask,           XK_u,            floatpos,               {.v = "-26w -26h" } }, // ↖
   1518 	{ Mod3Mask|ShiftMask,           XK_i,            floatpos,               {.v = "  0w -26h" } }, // ↑
   1519 	{ Mod3Mask|ShiftMask,           XK_o,            floatpos,               {.v = " 26w -26h" } }, // ↗
   1520 	{ Mod3Mask|ShiftMask,           XK_j,            floatpos,               {.v = "-26w   0h" } }, // ←
   1521 	{ Mod3Mask|ShiftMask,           XK_k,            floatpos,               {.v = "800W 800H" } }, // ·
   1522 	{ Mod3Mask|ShiftMask,           XK_l,            floatpos,               {.v = " 26w   0h" } }, // →
   1523 	{ Mod3Mask|ShiftMask,           XK_m,            floatpos,               {.v = "-26w  26h" } }, // ↙
   1524 	{ Mod3Mask|ShiftMask,           XK_comma,        floatpos,               {.v = "  0w  26h" } }, // ↓
   1525 	{ Mod3Mask|ShiftMask,           XK_period,       floatpos,               {.v = " 26w  26h" } }, // ↘
   1526 	/* Client is positioned in a floating grid, movement is relative to client's current position */
   1527 	{ Mod3Mask|Mod1Mask,            XK_u,            floatpos,               {.v = "-1p -1p" } }, // ↖
   1528 	{ Mod3Mask|Mod1Mask,            XK_i,            floatpos,               {.v = " 0p -1p" } }, // ↑
   1529 	{ Mod3Mask|Mod1Mask,            XK_o,            floatpos,               {.v = " 1p -1p" } }, // ↗
   1530 	{ Mod3Mask|Mod1Mask,            XK_j,            floatpos,               {.v = "-1p  0p" } }, // ←
   1531 	{ Mod3Mask|Mod1Mask,            XK_k,            floatpos,               {.v = " 0p  0p" } }, // ·
   1532 	{ Mod3Mask|Mod1Mask,            XK_l,            floatpos,               {.v = " 1p  0p" } }, // →
   1533 	{ Mod3Mask|Mod1Mask,            XK_m,            floatpos,               {.v = "-1p  1p" } }, // ↙
   1534 	{ Mod3Mask|Mod1Mask,            XK_comma,        floatpos,               {.v = " 0p  1p" } }, // ↓
   1535 	{ Mod3Mask|Mod1Mask,            XK_period,       floatpos,               {.v = " 1p  1p" } }, // ↘
   1536 	#endif // FLOATPOS_PATCH
   1537 	#if SETBORDERPX_PATCH
   1538 	{ MODKEY|ControlMask,           XK_minus,      setborderpx,            {.i = -1 } },
   1539 	{ MODKEY|ControlMask,           XK_plus,       setborderpx,            {.i = +1 } },
   1540 	{ MODKEY|ControlMask,           XK_numbersign, setborderpx,            {.i = 0 } },
   1541 	#endif // SETBORDERPX_PATCH
   1542 	#if CYCLELAYOUTS_PATCH
   1543 	{ MODKEY|ControlMask,           XK_comma,      cyclelayout,            {.i = -1 } },
   1544 	{ MODKEY|ControlMask,           XK_period,     cyclelayout,            {.i = +1 } },
   1545 	#endif // CYCLELAYOUTS_PATCH
   1546 	#if MPDCONTROL_PATCH
   1547 	{ MODKEY,                       XK_F1,         mpdchange,              {.i = -1} },
   1548 	{ MODKEY,                       XK_F2,         mpdchange,              {.i = +1} },
   1549 	{ MODKEY,                       XK_Escape,     mpdcontrol,             {0} },
   1550 	#endif // MPDCONTROL_PATCH
   1551 	TAGKEYS(                        XK_1,                                  0)
   1552 	TAGKEYS(                        XK_2,                                  1)
   1553 	TAGKEYS(                        XK_3,                                  2)
   1554 	TAGKEYS(                        XK_4,                                  3)
   1555 	TAGKEYS(                        XK_5,                                  4)
   1556 	TAGKEYS(                        XK_6,                                  5)
   1557 	TAGKEYS(                        XK_7,                                  6)
   1558 	TAGKEYS(                        XK_8,                                  7)
   1559 	TAGKEYS(                        XK_9,                                  8)
   1560 };
   1561 
   1562 #if KEYMODES_PATCH
   1563 static const Key cmdkeys[] = {
   1564 	/* modifier                    keys                     function         argument */
   1565 	{ 0,                           XK_Escape,               clearcmd,        {0} },
   1566 	{ ControlMask,                 XK_c,                    clearcmd,        {0} },
   1567 	{ 0,                           XK_i,                    setkeymode,      {.ui = INSERTMODE} },
   1568 };
   1569 
   1570 static const Command commands[] = {
   1571 	/* modifier (4 keys)                          keysyms (4 keys)                                function         argument */
   1572 	{ {ControlMask, ShiftMask,  0,         0},    {XK_w,      XK_h,     0,         0},            setlayout,       {.v = &layouts[0]} },
   1573 	{ {ControlMask, 0,          0,         0},    {XK_w,      XK_o,     0,         0},            setlayout,       {.v = &layouts[2]} },
   1574 	{ {ControlMask, ShiftMask,  0,         0},    {XK_w,      XK_o,     0,         0},            onlyclient,      {0} },
   1575 	{ {ControlMask, 0,          0,         0},    {XK_w,      XK_v,     0,         0},            setlayout,       {.v = &layouts[0]} },
   1576 	{ {ControlMask, 0,          0,         0},    {XK_w,      XK_less,  0,         0},            setmfact,        {.f = -0.05} },
   1577 	{ {ControlMask, ShiftMask,  0,         0},    {XK_w,      XK_less,  0,         0},            setmfact,        {.f = +0.05} },
   1578 	{ {ControlMask, ShiftMask,  0,         0},    {XK_w,      XK_0,     0,         0},            setmfact,        {.f = +1.50} },
   1579 	{ {ShiftMask,   0,          0,         0},    {XK_period, XK_e,     0,         0},            spawn,           {.v = dmenucmd} },
   1580 	{ {ShiftMask,   0,          0,         0},    {XK_period, XK_o,     0,         0},            spawn,           {.v = dmenucmd} },
   1581 	{ {ShiftMask,   0,          0,         0},    {XK_period, XK_q,     XK_Return, 0},            quit,            {0} },
   1582 	{ {ShiftMask,   0,          0,         0},    {XK_period, XK_b,     XK_d,      XK_Return},    killclient,      {0} },
   1583 	{ {ShiftMask,   0,          0,         0},    {XK_period, XK_b,     XK_n,      XK_Return},    focusstack,      {.i = +1} },
   1584 	{ {ShiftMask,   0,          ShiftMask, 0},    {XK_period, XK_b,     XK_n,      XK_Return},    focusstack,      {.i = -1} },
   1585 };
   1586 #endif // KEYMODES_PATCH
   1587 
   1588 /* button definitions */
   1589 #if STATUSBUTTON_PATCH
   1590 /* click can be ClkButton, ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
   1591 #else
   1592 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
   1593 #endif //
   1594 static const Button buttons[] = {
   1595 	/* click                event mask           button          function        argument */
   1596 	#if BAR_STATUSBUTTON_PATCH
   1597 	{ ClkButton,            0,                   Button1,        spawn,          {.v = dmenucmd } },
   1598 	#endif // BAR_STATUSBUTTON_PATCH
   1599 	{ ClkLtSymbol,          0,                   Button1,        setlayout,      {0} },
   1600 	#if BAR_LAYOUTMENU_PATCH
   1601 	{ ClkLtSymbol,          0,                   Button3,        layoutmenu,     {0} },
   1602 	#else
   1603 	{ ClkLtSymbol,          0,                   Button3,        setlayout,      {.v = &layouts[2]} },
   1604 	#endif // BAR_LAYOUTMENU_PATCH
   1605 	#if BAR_WINTITLEACTIONS_PATCH
   1606 	{ ClkWinTitle,          0,                   Button1,        togglewin,      {0} },
   1607 	{ ClkWinTitle,          0,                   Button3,        showhideclient, {0} },
   1608 	#endif // BAR_WINTITLEACTIONS_PATCH
   1609 	{ ClkWinTitle,          0,                   Button2,        zoom,           {0} },
   1610 	#if BAR_STATUSCMD_PATCH && BAR_DWMBLOCKS_PATCH
   1611 	{ ClkStatusText,        0,                   Button1,        sigstatusbar,   {.i = 1 } },
   1612 	{ ClkStatusText,        0,                   Button2,        sigstatusbar,   {.i = 2 } },
   1613 	{ ClkStatusText,        0,                   Button3,        sigstatusbar,   {.i = 3 } },
   1614 	#elif BAR_STATUSCMD_PATCH
   1615 	{ ClkStatusText,        0,                   Button1,        spawn,          {.v = statuscmd } },
   1616 	{ ClkStatusText,        0,                   Button2,        spawn,          {.v = statuscmd } },
   1617 	{ ClkStatusText,        0,                   Button3,        spawn,          {.v = statuscmd } },
   1618 	#else
   1619 	{ ClkStatusText,        0,                   Button2,        spawn,          {.v = termcmd } },
   1620 	#endif // BAR_STATUSCMD_PATCH
   1621 	#if PLACEMOUSE_PATCH
   1622 	/* placemouse options, choose which feels more natural:
   1623 	 *    0 - tiled position is relative to mouse cursor
   1624 	 *    1 - tiled postiion is relative to window center
   1625 	 *    2 - mouse pointer warps to window center
   1626 	 *
   1627 	 * The moveorplace uses movemouse or placemouse depending on the floating state
   1628 	 * of the selected client. Set up individual keybindings for the two if you want
   1629 	 * to control these separately (i.e. to retain the feature to move a tiled window
   1630 	 * into a floating position).
   1631 	 */
   1632 	{ ClkClientWin,         MODKEY,              Button1,        moveorplace,    {.i = 1} },
   1633 	#else
   1634 	{ ClkClientWin,         MODKEY,              Button1,        movemouse,      {0} },
   1635 	#endif // PLACEMOUSE_PATCH
   1636 	{ ClkClientWin,         MODKEY,              Button2,        togglefloating, {0} },
   1637 	{ ClkClientWin,         MODKEY,              Button3,        resizemouse,    {0} },
   1638 	#if TAPRESIZE_PATCH
   1639 	{ ClkClientWin,         MODKEY,              Button4,        resizemousescroll, {.v = &scrollargs[0]} },
   1640 	{ ClkClientWin,         MODKEY,              Button5,        resizemousescroll, {.v = &scrollargs[1]} },
   1641 	{ ClkClientWin,         MODKEY,              Button6,        resizemousescroll, {.v = &scrollargs[2]} },
   1642 	{ ClkClientWin,         MODKEY,              Button7,        resizemousescroll, {.v = &scrollargs[3]} },
   1643 	#endif // TAPRESIZE_PATCH
   1644 	#if DRAGCFACT_PATCH && CFACTS_PATCH
   1645 	{ ClkClientWin,         MODKEY|ShiftMask,    Button3,        dragcfact,      {0} },
   1646 	#endif // DRAGCFACT_PATCH
   1647 	#if DRAGMFACT_PATCH
   1648 	{ ClkClientWin,         MODKEY|ShiftMask,    Button1,        dragmfact,      {0} },
   1649 	#endif // DRAGMFACT_PATCH
   1650 	{ ClkTagBar,            0,                   Button1,        view,           {0} },
   1651 	{ ClkTagBar,            0,                   Button3,        toggleview,     {0} },
   1652 	{ ClkTagBar,            MODKEY,              Button1,        tag,            {0} },
   1653 	{ ClkTagBar,            MODKEY,              Button3,        toggletag,      {0} },
   1654 	#if TAB_PATCH
   1655 	{ ClkTabBar,            0,                   Button1,        focuswin,       {0} },
   1656 	#endif // TAB_PATCH
   1657 };
   1658 
   1659 #if DWMC_PATCH
   1660 /* signal definitions */
   1661 /* signum must be greater than 0 */
   1662 /* trigger signals using `xsetroot -name "fsignal:<signame> [<type> <value>]"` */
   1663 static const Signal signals[] = {
   1664 	/* signum                    function */
   1665 	{ "focusstack",              focusstack },
   1666 	{ "setmfact",                setmfact },
   1667 	{ "togglebar",               togglebar },
   1668 	#if TOGGLETOPBAR_PATCH
   1669 	{ "toggletopbar",            toggletopbar },
   1670 	#endif // TOGGLETOPBAR_PATCH
   1671 	{ "incnmaster",              incnmaster },
   1672 	{ "togglefloating",          togglefloating },
   1673 	{ "focusmon",                focusmon },
   1674 	#if STACKER_PATCH
   1675 	{ "pushstack",               pushstack },
   1676 	#endif // STACKER_PATCH
   1677 	#if FLOATPOS_PATCH
   1678 	{ "floatpos",                floatpos },
   1679 	#endif // FLOATPOS_PATCH
   1680 	#if FOCUSURGENT_PATCH
   1681 	{ "focusurgent",             focusurgent },
   1682 	#endif // FOCUSURGENT_PATCH
   1683 	#if FOCUSADJACENTTAG_PATCH
   1684 	{ "viewtoleft",              viewtoleft },
   1685 	{ "viewtoright",             viewtoright },
   1686 	{ "tagtoleft",               tagtoleft },
   1687 	{ "tagtoright",              tagtoright},
   1688 	{ "tagandviewtoleft",        tagandviewtoleft },
   1689 	{ "tagandviewtoright",       tagandviewtoright },
   1690 	#endif // FOCUSADJACENTTAG_PATCH
   1691 	#if SWAPFOCUS_PATCH && PERTAG_PATCH
   1692 	{ "swapfocus",               swapfocus },
   1693 	#endif // SWAPFOCUS_PATCH
   1694 	#if SWITCHCOL_PATCH
   1695 	{ "switchcol",               switchcol },
   1696 	#endif // SWITCHCOL_PATCH
   1697 	#if ROTATESTACK_PATCH
   1698 	{ "rotatestack",             rotatestack },
   1699 	#endif // ROTATESTACK_PATCH
   1700 	#if INPLACEROTATE_PATCH
   1701 	{ "inplacerotate",           inplacerotate },
   1702 	#endif // INPLACEROTATE_PATCH
   1703 	#if PUSH_PATCH || PUSH_NO_MASTER_PATCH
   1704 	{ "pushdown",                pushdown },
   1705 	{ "pushup",                  pushup },
   1706 	#endif // PUSH_PATCH / PUSH_NO_MASTER_PATCH
   1707 	#if FLEXTILE_DELUXE_LAYOUT
   1708 	{ "incnstack",               incnstack },
   1709 	{ "rotatelayoutaxis",        rotatelayoutaxis },
   1710 	{ "setlayoutaxisex",         setlayoutaxisex },
   1711 	{ "mirrorlayout",            mirrorlayout },
   1712 	#endif // FLEXTILE_DELUXE_LAYOUT
   1713 	#if CFACTS_PATCH
   1714 	{ "setcfact",                setcfact },
   1715 	#endif // CFACTS_PATCH
   1716 	#if MOVECENTER_PATCH
   1717 	{ "movecenter",              movecenter },
   1718 	#endif // MOVECENTER_PATCH
   1719 	#if MOVEPLACE_PATCH
   1720 	{ "moveplace",               moveplace },
   1721 	#endif // MOVEPLACE_PATCH
   1722 	#if NAMETAG_PATCH
   1723 	{ "nametag",                 nametag },
   1724 	#endif // NAMETAG_PATCH
   1725 	#if EXRESIZE_PATCH
   1726 	{ "explace",                 explace },
   1727 	{ "togglehorizontalexpand",  togglehorizontalexpand },
   1728 	{ "toggleverticalexpand",    toggleverticalexpand },
   1729 	{ "togglemaximize",          togglemaximize },
   1730 	#endif // EXRESIZE_PATCH
   1731 	#if KEYMODES_PATCH
   1732 	{ "setkeymode",              setkeymode },
   1733 	#endif // KEYMODES_PATCH
   1734 	#if TRANSFER_PATCH
   1735 	{ "transfer",                transfer },
   1736 	#endif // TRANSFER_PATCH
   1737 	#if TRANSFER_ALL_PATCH
   1738 	{ "transferall",             transferall },
   1739 	#endif // TRANSFER_ALL_PATCH
   1740 	{ "tagmon",                  tagmon },
   1741 	{ "zoom",                    zoom },
   1742 	#if VANITYGAPS_PATCH
   1743 	{ "incrgaps",                incrgaps },
   1744 	{ "incrigaps",               incrigaps },
   1745 	{ "incrogaps",               incrogaps },
   1746 	{ "incrihgaps",              incrihgaps },
   1747 	{ "incrivgaps",              incrivgaps },
   1748 	{ "incrohgaps",              incrohgaps },
   1749 	{ "incrovgaps",              incrovgaps },
   1750 	{ "togglegaps",              togglegaps },
   1751 	{ "defaultgaps",             defaultgaps },
   1752 	{ "setgaps",                 setgapsex },
   1753 	#endif // VANITYGAPS_PATCH
   1754 	{ "view",                    view },
   1755 	{ "viewall",                 viewallex },
   1756 	{ "viewex",                  viewex },
   1757 	{ "toggleview",              toggleview },
   1758 	#if BAR_WINTITLEACTIONS_PATCH
   1759 	{ "showhideclient",          showhideclient },
   1760 	#endif // BAR_WINTITLEACTIONS_PATCH
   1761 	#if SHIFTBOTH_PATCH
   1762 	{ "shiftboth",               shiftboth },
   1763 	#endif // SHIFTBOTH_PATCH
   1764 	#if SHIFTTAG_PATCH
   1765 	{ "shifttag",                shifttag },
   1766 	#endif // SHIFTTAG_PATCH
   1767 	#if SHIFTTAGCLIENTS_PATCH
   1768 	{ "shifttagclients",         shifttagclients },
   1769 	#endif // SHIFTTAGCLIENTS_PATCH
   1770 	#if SHIFTVIEW_PATCH
   1771 	{ "shiftview",               shiftview },
   1772 	#endif // SHIFTVIEW_PATCH
   1773 	#if SHIFTVIEW_CLIENTS_PATCH
   1774 	{ "shiftviewclients",        shiftviewclients },
   1775 	#endif // SHIFTVIEW_CLIENTS_PATCH
   1776 	#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
   1777 	{ "shiftswaptags",           shiftswaptags },
   1778 	#endif // SHIFTSWAPTAGS_PATCH
   1779 	#if SELFRESTART_PATCH
   1780 	{ "self_restart",            self_restart },
   1781 	#endif // SELFRESTART_PATCH
   1782 	#if BAR_TAGGRID_PATCH
   1783 	{ "switchtag",               switchtag },
   1784 	#endif // BAR_TAGGRID_PATCH
   1785 	#if STICKY_PATCH
   1786 	{ "togglesticky",            togglesticky },
   1787 	#endif // STICKY_PATCH
   1788 	#if SETBORDERPX_PATCH
   1789 	{ "setborderpx",             setborderpx },
   1790 	#endif // SETBORDERPX_PATCH
   1791 	#if CYCLELAYOUTS_PATCH
   1792 	{ "cyclelayout",             cyclelayout },
   1793 	#endif // CYCLELAYOUTS_PATCH
   1794 	#if MPDCONTROL_PATCH
   1795 	{ "mpdchange",               mpdchange },
   1796 	{ "mpdcontrol",              mpdcontrol },
   1797 	#endif // MPDCONTROL_PATCH
   1798 	{ "toggleviewex",            toggleviewex },
   1799 	{ "tag",                     tag },
   1800 	{ "tagall",                  tagallex },
   1801 	{ "tagex",                   tagex },
   1802 	{ "toggletag",               toggletag },
   1803 	{ "toggletagex",             toggletagex },
   1804 	#if TAGALLMON_PATCH
   1805 	{ "tagallmon",               tagallmon },
   1806 	#endif // TAGALLMON_PATCH
   1807 	#if TAGSWAPMON_PATCH
   1808 	{ "tagswapmon",              tagswapmon},
   1809 	#endif // TAGSWAPMON_PATCH
   1810 	#if BAR_ALTERNATIVE_TAGS_PATCH
   1811 	{ "togglealttag",            togglealttag },
   1812 	#endif // BAR_ALTERNATIVE_TAGS_PATCH
   1813 	#if TOGGLEFULLSCREEN_PATCH
   1814 	{ "togglefullscreen",        togglefullscreen },
   1815 	#endif // TOGGLEFULLSCREEN_PATCH
   1816 	#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
   1817 	{ "togglefakefullscreen",    togglefakefullscreen },
   1818 	#endif // FAKEFULLSCREEN_CLIENT_PATCH
   1819 	#if FULLSCREEN_PATCH
   1820 	{ "fullscreen",              fullscreen },
   1821 	#endif // FULLSCREEN_PATCH
   1822 	#if MAXIMIZE_PATCH
   1823 	{ "togglehorizontalmax",     togglehorizontalmax },
   1824 	{ "toggleverticalmax",       toggleverticalmax },
   1825 	{ "togglemax",               togglemax },
   1826 	#endif // MAXIMIZE_PATCH
   1827 	#if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH
   1828 	{ "togglescratch",           togglescratch },
   1829 	#endif // SCRATCHPADS_PATCH
   1830 	#if UNFLOATVISIBLE_PATCH
   1831 	{ "unfloatvisible",          unfloatvisible },
   1832 	#endif // UNFLOATVISIBLE_PATCH
   1833 	{ "killclient",              killclient },
   1834 	#if WINVIEW_PATCH
   1835 	{ "winview",                 winview },
   1836 	#endif // WINVIEW_PATCH
   1837 	#if XRDB_PATCH || XRESOURCES_PATCH
   1838 	{ "xrdb",                    xrdb },
   1839 	#endif // XRDB_PATCH | XRESOURCES_PATCH
   1840 	#if TAGOTHERMONITOR_PATCH
   1841 	{ "tagnextmonex",            tagnextmonex },
   1842 	{ "tagprevmonex",            tagprevmonex },
   1843 	#endif // TAGOTHERMONITOR_PATCH
   1844 	{ "quit",                    quit },
   1845 	{ "setlayout",               setlayout },
   1846 	{ "setlayoutex",             setlayoutex },
   1847 };
   1848 #elif FSIGNAL_PATCH
   1849 /* signal definitions */
   1850 /* signum must be greater than 0 */
   1851 /* trigger signals using `xsetroot -name "fsignal:<signum>"` */
   1852 static Signal signals[] = {
   1853 	/* signum       function        argument  */
   1854 	{ 1,            setlayout,      {.v = 0} },
   1855 };
   1856 #endif // DWMC_PATCH
   1857 
   1858 #if IPC_PATCH
   1859 static const char *ipcsockpath = "/tmp/dwm.sock";
   1860 static IPCCommand ipccommands[] = {
   1861 	IPCCOMMAND( focusmon, 1, {ARG_TYPE_SINT} ),
   1862 	IPCCOMMAND( focusstack, 1, {ARG_TYPE_SINT} ),
   1863 	IPCCOMMAND( incnmaster, 1, {ARG_TYPE_SINT} ),
   1864 	IPCCOMMAND( killclient, 1, {ARG_TYPE_SINT} ),
   1865 	IPCCOMMAND( quit, 1, {ARG_TYPE_NONE} ),
   1866 	IPCCOMMAND( setlayoutsafe, 1, {ARG_TYPE_PTR} ),
   1867 	IPCCOMMAND( setmfact, 1, {ARG_TYPE_FLOAT} ),
   1868 	IPCCOMMAND( setstatus, 1, {ARG_TYPE_STR} ),
   1869 	IPCCOMMAND( tag, 1, {ARG_TYPE_UINT} ),
   1870 	IPCCOMMAND( tagmon, 1, {ARG_TYPE_UINT} ),
   1871 	IPCCOMMAND( togglebar, 1, {ARG_TYPE_NONE} ),
   1872 	#if TOGGLETOPBAR_PATCH
   1873 	IPCCOMMAND( toggletopbar, 1, {ARG_TYPE_NONE} ),
   1874 	#endif // TOGGLETOPBAR_PATCH
   1875 	IPCCOMMAND( togglefloating, 1, {ARG_TYPE_NONE} ),
   1876 	IPCCOMMAND( toggletag, 1, {ARG_TYPE_UINT} ),
   1877 	IPCCOMMAND( toggleview, 1, {ARG_TYPE_UINT} ),
   1878 	IPCCOMMAND( view, 1, {ARG_TYPE_UINT} ),
   1879 	IPCCOMMAND( zoom, 1, {ARG_TYPE_NONE} ),
   1880 	#if BAR_ALTERNATIVE_TAGS_PATCH
   1881 	IPCCOMMAND( togglealttag, 1, {ARG_TYPE_NONE} ),
   1882 	#endif // BAR_ALTERNATIVE_TAGS_PATCH
   1883 	#if BAR_TAGGRID_PATCH
   1884 	IPCCOMMAND( switchtag, 1, {ARG_TYPE_UINT} ),
   1885 	#endif // BAR_TAGGRID_PATCH
   1886 	#if CFACTS_PATCH
   1887 	IPCCOMMAND( setcfact, 1, {ARG_TYPE_FLOAT} ),
   1888 	#endif // CFACTS_PATCH
   1889 	#if CYCLELAYOUTS_PATCH
   1890 	IPCCOMMAND( cyclelayout, 1, {ARG_TYPE_SINT} ),
   1891 	#endif // CYCLELAYOUTS_PATCH
   1892 	#if EXRESIZE_PATCH
   1893 	IPCCOMMAND( explace, 1, {ARG_TYPE_UINT} ),
   1894 	IPCCOMMAND( togglehorizontalexpand, 1, {ARG_TYPE_SINT} ),
   1895 	IPCCOMMAND( toggleverticalexpand, 1, {ARG_TYPE_SINT} ),
   1896 	IPCCOMMAND( togglemaximize, 1, {ARG_TYPE_SINT} ),
   1897 	#endif // EXRESIZE_PATCH
   1898 	#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
   1899 	IPCCOMMAND( togglefakefullscreen, 1, {ARG_TYPE_NONE} ),
   1900 	#endif // FAKEFULLSCREEN_CLIENT_PATCH
   1901 	#if FLOATPOS_PATCH
   1902 	IPCCOMMAND( floatpos, 1, {ARG_TYPE_STR} ),
   1903 	#endif // FLOATPOS_PATCH
   1904 	#if FULLSCREEN_PATCH
   1905 	IPCCOMMAND( fullscreen, 1, {ARG_TYPE_NONE} ),
   1906 	#endif // FULLSCREEN_PATCH
   1907 	#if FLEXTILE_DELUXE_LAYOUT
   1908 	IPCCOMMAND( incnstack, 1, {ARG_TYPE_SINT} ),
   1909 	IPCCOMMAND( rotatelayoutaxis, 1, {ARG_TYPE_SINT} ),
   1910 	IPCCOMMAND( setlayoutaxisex, 1, {ARG_TYPE_SINT} ),
   1911 	IPCCOMMAND( mirrorlayout, 1, {ARG_TYPE_NONE} ),
   1912 	#endif // FLEXTILE_DELUXE_LAYOUT
   1913 	#if FOCUSURGENT_PATCH
   1914 	IPCCOMMAND( focusurgent, 1, {ARG_TYPE_NONE} ),
   1915 	#endif // FOCUSURGENT_PATCH
   1916 	#if FOCUSADJACENTTAG_PATCH
   1917 	IPCCOMMAND( viewtoleft, 1, {ARG_TYPE_NONE} ),
   1918 	IPCCOMMAND( viewtoright, 1, {ARG_TYPE_NONE} ),
   1919 	IPCCOMMAND( tagtoleft, 1, {ARG_TYPE_NONE} ),
   1920 	IPCCOMMAND( tagtoright, 1, {ARG_TYPE_NONE} ),
   1921 	IPCCOMMAND( tagandviewtoleft, 1, {ARG_TYPE_NONE} ),
   1922 	IPCCOMMAND( tagandviewtoright, 1, {ARG_TYPE_NONE} ),
   1923 	#endif // FOCUSADJACENTTAG_PATCH
   1924 	#if INPLACEROTATE_PATCH
   1925 	IPCCOMMAND( inplacerotate, 1, {ARG_TYPE_SINT} ),
   1926 	#endif // INPLACEROTATE_PATCH
   1927 	#if KEYMODES_PATCH
   1928 	IPCCOMMAND( setkeymode, 1, {ARG_TYPE_UINT} ),
   1929 	#endif // KEYMODES_PATCH
   1930 	#if MAXIMIZE_PATCH
   1931 	IPCCOMMAND( togglehorizontalmax, 1, {ARG_TYPE_NONE} ),
   1932 	IPCCOMMAND( toggleverticalmax, 1, {ARG_TYPE_NONE} ),
   1933 	IPCCOMMAND( togglemax, 1, {ARG_TYPE_NONE} ),
   1934 	#endif // MAXIMIZE_PATCH
   1935 	#if MPDCONTROL_PATCH
   1936 	IPCCOMMAND( mpdchange, 1, {ARG_TYPE_SINT} ),
   1937 	IPCCOMMAND( mpdcontrol, 1, {ARG_TYPE_NONE} ),
   1938 	#endif // MPDCONTROL_PATCH
   1939 	#if MOVECENTER_PATCH
   1940 	IPCCOMMAND( movecenter, 1, {ARG_TYPE_NONE} ),
   1941 	#endif // MOVECENTER_PATCH
   1942 	#if MOVEPLACE_PATCH
   1943 	IPCCOMMAND( moveplace, 1, {ARG_TYPE_UINT} ),
   1944 	#endif // MOVEPLACE_PATCH
   1945 	#if MOVERESIZE_PATCH
   1946 	IPCCOMMAND( moveresize, 1, {ARG_TYPE_STR} ),
   1947 	#endif // MOVERESIZE_PATCH
   1948 	#if NAMETAG_PATCH
   1949 	IPCCOMMAND( nametag, 1, {ARG_TYPE_NONE} ),
   1950 	#endif // NAMETAG_PATCH
   1951 	#if RIODRAW_PATCH
   1952 	IPCCOMMAND( rioresize, 1, {ARG_TYPE_NONE} ),
   1953 	#endif // RIODRAW_PATCH
   1954 	#if PUSH_PATCH || PUSH_NO_MASTER_PATCH
   1955 	IPCCOMMAND( pushdown, 1, {ARG_TYPE_NONE} ),
   1956 	IPCCOMMAND( pushup, 1, {ARG_TYPE_NONE} ),
   1957 	#endif // PUSH_PATCH / PUSH_NO_MASTER_PATCH
   1958 	#if ROTATESTACK_PATCH
   1959 	IPCCOMMAND( rotatestack, 1, {ARG_TYPE_SINT} ),
   1960 	#endif // ROTATESTACK_PATCH
   1961 	#if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH
   1962 	IPCCOMMAND( togglescratch, 1, {ARG_TYPE_UINT} ),
   1963 	#endif // SCRATCHPADS_PATCH
   1964 	#if SELFRESTART_PATCH
   1965 	IPCCOMMAND( self_restart, 1, {ARG_TYPE_NONE} ),
   1966 	#endif // SELFRESTART_PATCH
   1967 	#if SETBORDERPX_PATCH
   1968 	IPCCOMMAND( setborderpx, 1, {ARG_TYPE_SINT} ),
   1969 	#endif // SETBORDERPX_PATCH
   1970 	#if BAR_WINTITLEACTIONS_PATCH
   1971 	IPCCOMMAND( showhideclient, 1, {ARG_TYPE_NONE} ),
   1972 	#endif // BAR_WINTITLEACTIONS_PATCH
   1973 	#if SHIFTBOTH_PATCH
   1974 	IPCCOMMAND( shiftboth, 1, {ARG_TYPE_SINT} ),
   1975 	#endif // SHIFTBOTH_PATCH
   1976 	#if SHIFTTAG_PATCH
   1977 	IPCCOMMAND( shifttag, 1, {ARG_TYPE_SINT} ),
   1978 	#endif // SHIFTTAG_PATCH
   1979 	#if SHIFTTAGCLIENTS_PATCH
   1980 	IPCCOMMAND( shifttagclients, 1, {ARG_TYPE_SINT} ),
   1981 	#endif // SHIFTVIEWCLIENTS_PATCH
   1982 	#if SHIFTVIEW_PATCH
   1983 	IPCCOMMAND( shiftview, 1, {ARG_TYPE_SINT} ),
   1984 	#endif // SHIFTVIEW_PATCH
   1985 	#if SHIFTVIEW_CLIENTS_PATCH
   1986 	IPCCOMMAND( shiftviewclients, 1, {ARG_TYPE_SINT} ),
   1987 	#endif // SHIFTVIEW_CLIENTS_PATCH
   1988 	#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
   1989 	IPCCOMMAND( shiftswaptags, 1, {ARG_TYPE_SINT} ),
   1990 	#endif // SHIFTSWAPTAGS_PATCH
   1991 	#if STACKER_PATCH
   1992 	IPCCOMMAND( pushstack, 1, {ARG_TYPE_SINT} ),
   1993 	#endif // STACKER_PATCH
   1994 	#if STICKY_PATCH
   1995 	IPCCOMMAND( togglesticky, 1, {ARG_TYPE_NONE} ),
   1996 	#endif // STICKY_PATCH
   1997 	#if SWAPFOCUS_PATCH && PERTAG_PATCH
   1998 	IPCCOMMAND( swapfocus, 1, {ARG_TYPE_SINT} ),
   1999 	#endif // SWAPFOCUS_PATCH
   2000 	#if SWITCHCOL_PATCH
   2001 	IPCCOMMAND( switchcol, 1, {ARG_TYPE_NONE} ),
   2002 	#endif // SWITCHCOL_PATCH
   2003 	#if TAGALLMON_PATCH
   2004 	IPCCOMMAND( tagallmon, 1, {ARG_TYPE_SINT} ),
   2005 	#endif // TAGALLMON_PATCH
   2006 	#if TAGOTHERMONITOR_PATCH
   2007 	IPCCOMMAND( tagnextmonex, 1, {ARG_TYPE_UINT} ),
   2008 	IPCCOMMAND( tagprevmonex, 1, {ARG_TYPE_UINT} ),
   2009 	#endif // TAGOTHERMONITOR_PATCH
   2010 	#if TAGSWAPMON_PATCH
   2011 	IPCCOMMAND( tagswapmon, 1, {ARG_TYPE_SINT} ),
   2012 	#endif // TAGSWAPMON_PATCH
   2013 	#if TOGGLEFULLSCREEN_PATCH
   2014 	IPCCOMMAND( togglefullscreen, 1, {ARG_TYPE_NONE} ),
   2015 	#endif // TOGGLEFULLSCREEN_PATCH
   2016 	#if TRANSFER_PATCH
   2017 	IPCCOMMAND( transfer, 1, {ARG_TYPE_NONE} ),
   2018 	#endif // TRANSFER_PATCH
   2019 	#if TRANSFER_ALL_PATCH
   2020 	IPCCOMMAND( transferall, 1, {ARG_TYPE_NONE} ),
   2021 	#endif // TRANSFER_ALL_PATCH
   2022 	#if UNFLOATVISIBLE_PATCH
   2023 	IPCCOMMAND( unfloatvisible, 1, {ARG_TYPE_NONE} ),
   2024 	#endif // UNFLOATVISIBLE_PATCH
   2025 	#if VANITYGAPS_PATCH
   2026 	IPCCOMMAND( incrgaps, 1, {ARG_TYPE_SINT} ),
   2027 	IPCCOMMAND( incrigaps, 1, {ARG_TYPE_SINT} ),
   2028 	IPCCOMMAND( incrogaps, 1, {ARG_TYPE_SINT} ),
   2029 	IPCCOMMAND( incrihgaps, 1, {ARG_TYPE_SINT} ),
   2030 	IPCCOMMAND( incrivgaps, 1, {ARG_TYPE_SINT} ),
   2031 	IPCCOMMAND( incrohgaps, 1, {ARG_TYPE_SINT} ),
   2032 	IPCCOMMAND( incrovgaps, 1, {ARG_TYPE_SINT} ),
   2033 	IPCCOMMAND( togglegaps, 1, {ARG_TYPE_NONE} ),
   2034 	IPCCOMMAND( defaultgaps, 1, {ARG_TYPE_NONE} ),
   2035 	IPCCOMMAND( setgapsex, 1, {ARG_TYPE_SINT} ),
   2036 	#endif // VANITYGAPS_PATCH
   2037 	#if WINVIEW_PATCH
   2038 	IPCCOMMAND( winview, 1, {ARG_TYPE_NONE} ),
   2039 	#endif // WINVIEW_PATCH
   2040 	#if XRDB_PATCH || XRESOURCES_PATCH
   2041 	IPCCOMMAND( xrdb, 1, {ARG_TYPE_NONE} ),
   2042 	#endif // XRDB_PATCH | XRESOURCES_PATCH
   2043 };
   2044 #endif // IPC_PATCH