-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.def.h
1776 lines (1727 loc) · 92.8 KB
/
config.def.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* See LICENSE file for copyright and license details. */
/* appearance */
#if ROUNDED_CORNERS_PATCH
static const unsigned int borderpx = 0; /* border pixel of windows */
static const int corner_radius = 10;
#else
static const unsigned int borderpx = 1; /* border pixel of windows */
#endif // ROUNDED_CORNERS_PATCH
static const unsigned int snap = 32; /* snap pixel */
#if SWALLOW_PATCH
static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
#endif // SWALLOW_PATCH
#if BAR_TAGPREVIEW_PATCH
static const int scalepreview = 4; /* Tag preview scaling */
#endif // BAR_TAGPREVIEW_PATCH
#if NO_MOD_BUTTONS_PATCH
static int nomodbuttons = 1; /* allow client mouse button bindings that have no modifier */
#endif // NO_MOD_BUTTONS_PATCH
#if VANITYGAPS_PATCH
static const unsigned int gappih = 50; /* horiz inner gap between windows */
static const unsigned int gappiv = 50; /* vert inner gap between windows */
static const unsigned int gappoh = 20; /* horiz outer gap between windows and screen edge */
static const unsigned int gappov = 20; /* vert outer gap between windows and screen edge */
static const int smartgaps_fact = 1; /* gap factor when there is only one client; 0 = no gaps, 3 = 3x outer gaps */
#endif // VANITYGAPS_PATCH
#if AUTOSTART_PATCH
static const char autostartblocksh[] = "autostart_blocking.sh";
static const char autostartsh[] = "autostart.sh";
static const char dwmdir[] = "dwm";
static const char localshare[] = ".local/share";
#endif // AUTOSTART_PATCH
#if BAR_ANYBAR_PATCH
static const int usealtbar = 1; /* 1 means use non-dwm status bar */
static const char *altbarclass = "Polybar"; /* Alternate bar class name */
static const char *altbarcmd = "$HOME/bar.sh"; /* Alternate bar launch command */
#endif // BAR_ANYBAR_PATCH
#if BAR_HOLDBAR_PATCH
static const int showbar = 0; /* 0 means no bar */
#else
static const int showbar = 1; /* 0 means no bar */
#endif // BAR_HOLDBAR_PATCH
static const int topbar = 1; /* 0 means bottom bar */
#if TAB_PATCH
/* Display modes of the tab bar: never shown, always shown, shown only in */
/* monocle mode in the presence of several windows. */
/* Modes after showtab_nmodes are disabled. */
enum showtab_modes { showtab_never, showtab_auto, showtab_nmodes, showtab_always};
static const int showtab = showtab_auto; /* Default tab bar show mode */
static const int toptab = False; /* False means bottom tab bar */
#endif // TAB_PATCH
#if BAR_HEIGHT_PATCH
static const int bar_height = 0; /* 0 means derive from font, >= 1 explicit height */
#endif // BAR_HEIGHT_PATCH
#if BAR_PADDING_PATCH
static const int vertpad = 10; /* vertical padding of bar */
static const int sidepad = 10; /* horizontal padding of bar */
#endif // BAR_PADDING_PATCH
#if BAR_WINICON_PATCH
#define ICONSIZE 20 /* icon size */
#define ICONSPACING 5 /* space between icon and title */
#endif // BAR_WINICON_PATCH
#if FOCUSONCLICK_PATCH
static const int focusonwheel = 0;
#endif // FOCUSONCLICK_PATCH
#if FLOATPOS_PATCH
static int floatposgrid_x = 5; /* float grid columns */
static int floatposgrid_y = 5; /* float grid rows */
#endif // FLOATPOS_PATCH
#if RIODRAW_PATCH
static const char slopspawnstyle[] = "-t 0 -c 0.92,0.85,0.69,0.3 -o"; /* do NOT define -f (format) here */
static const char slopresizestyle[] = "-t 0 -c 0.92,0.85,0.69,0.3"; /* do NOT define -f (format) here */
static const int riodraw_borders = 0; /* 0 or 1, indicates whether the area drawn using slop includes the window borders */
#if SWALLOW_PATCH
static const int riodraw_matchpid = 1; /* 0 or 1, indicates whether to match the PID of the client that was spawned with riospawn */
#endif // SWALLOW_PATCH
#endif // RIODRAW_PATCH
/* Status is to be shown on: -1 (all monitors), 0 (a specific monitor by index), 'A' (active monitor) */
#if BAR_STATUSALLMONS_PATCH
static const int statusmon = -1;
#elif BAR_STATICSTATUS_PATCH
static const int statusmon = 0;
#else
static const int statusmon = 'A';
#endif // BAR_STATUSALLMONS_PATCH | BAR_STATICSTATUS_PATCH
#if BAR_STATUSPADDING_PATCH
static const int horizpadbar = 2; /* horizontal padding for statusbar */
static const int vertpadbar = 0; /* vertical padding for statusbar */
#endif // BAR_STATUSPADDING_PATCH
#if BAR_STATUSBUTTON_PATCH
static const char buttonbar[] = "<O>";
#endif // BAR_STATUSBUTTON_PATCH
#if BAR_SYSTRAY_PATCH
static const unsigned int systrayspacing = 2; /* systray spacing */
static const int showsystray = 1; /* 0 means no systray */
#endif // BAR_SYSTRAY_PATCH
#if BAR_TAGLABELS_PATCH
static const char ptagf[] = "[%s %s]"; /* format of a tag label */
static const char etagf[] = "[%s]"; /* format of an empty tag */
static const int lcaselbl = 0; /* 1 means make tag label lowercase */
#endif // BAR_TAGLABELS_PATCH
#if BAR_UNDERLINETAGS_PATCH
static const unsigned int ulinepad = 5; /* horizontal padding between the underline and tag */
static const unsigned int ulinestroke = 2; /* thickness / height of the underline */
static const unsigned int ulinevoffset = 0; /* how far above the bottom of the bar the line should appear */
static const int ulineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */
#endif // BAR_UNDERLINETAGS_PATCH
#if NAMETAG_PATCH
#if NAMETAG_PREPEND_PATCH
/* The format in which the tag is written when named. E.g. %d: %.12s will write the tag number
* followed the first 12 characters of the given string. You can also just use "%d: %s" here. */
#define NAMETAG_FORMAT "%d: %.12s"
#else
#define NAMETAG_FORMAT "%s"
#endif // NAMETAG_PREPEND_PATCH
/* The maximum amount of bytes reserved for each tag text. */
#define MAX_TAGLEN 16
/* The command to run (via popen). This can be tailored by adding a prompt, passing other command
* line arguments or providing name options. Optionally you can use other dmenu like alternatives
* like rofi -dmenu. */
#define NAMETAG_COMMAND "dmenu < /dev/null"
#endif // NAMETAG_PATCH
#if ALT_TAB_PATCH
/* alt-tab configuration */
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 */
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 */
static const unsigned int tabposy = 1; /* tab position on Y axis, 0 = top, 1 = center, 2 = bottom */
static const unsigned int tabposx = 1; /* tab position on X axis, 0 = left, 1 = center, 2 = right */
static const unsigned int maxwtab = 600; /* tab menu width */
static const unsigned int maxhtab = 200; /* tab menu height */
#endif // ALT_TAB_PATCH
/* Indicators: see patch/bar_indicators.h for options */
static int tagindicatortype = INDICATOR_TOP_LEFT_SQUARE;
static int tiledindicatortype = INDICATOR_NONE;
static int floatindicatortype = INDICATOR_TOP_LEFT_SQUARE;
#if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
static int fakefsindicatortype = INDICATOR_PLUS;
static int floatfakefsindicatortype = INDICATOR_PLUS_AND_LARGER_SQUARE;
#endif // FAKEFULLSCREEN_CLIENT_PATCH
#if ONLYQUITONEMPTY_PATCH
static const int quit_empty_window_count = 0; /* only allow dwm to quit if no (<= count) windows are open */
#endif // ONLYQUITONEMPTY_PATCH
#if BAR_EXTRASTATUS_PATCH
static const char statussep = ';'; /* separator between status bars */
#endif // BAR_EXTRASTATUS_PATCH
#if BAR_TABGROUPS_PATCH
#if MONOCLE_LAYOUT
static void (*bartabmonfns[])(Monitor *) = { monocle /* , customlayoutfn */ };
#else
static void (*bartabmonfns[])(Monitor *) = { NULL /* , customlayoutfn */ };
#endif // MONOCLE_LAYOUT
#endif // BAR_TABGROUPS_PATCH
#if BAR_PANGO_PATCH
static const char font[] = "monospace 10";
#else
static const char *fonts[] = { "Hack Nerd Font:size=10" };
#endif // BAR_PANGO_PATCH
static const char dmenufont[] = "monospace:size=10";
static char c000000[] = "#504945"; // placeholder value
static char normfgcolor[] = "#bdae93";
static char normbgcolor[] = "#282828";
static char normbordercolor[] = "#504945";
static char normfloatcolor[] = "#504945";
static char selfgcolor[] = "#bdae93";
static char selbgcolor[] = "#282828";
static char selbordercolor[] = "#504945";
static char selfloatcolor[] = "#504945";
static char titlenormfgcolor[] = "#bdae93";
static char titlenormbgcolor[] = "#282828";
static char titlenormbordercolor[] = "#504945";
static char titlenormfloatcolor[] = "#504945";
static char titleselfgcolor[] = "#bdae93";
static char titleselbgcolor[] = "#282828";
static char titleselbordercolor[] = "#504945";
static char titleselfloatcolor[] = "#db8fd9";
static char tagsnormfgcolor[] = "#bdae93";
static char tagsnormbgcolor[] = "#282828";
static char tagsnormbordercolor[] = "#504945";
static char tagsnormfloatcolor[] = "#db8fd9";
static char tagsselfgcolor[] = "#ebdbb2";
static char tagsselbgcolor[] = "#282828";
static char tagsselbordercolor[] = "#504945";
static char tagsselfloatcolor[] = "#FFFFFF";
static char hidnormfgcolor[] = "#005577";
static char hidselfgcolor[] = "#227799";
static char hidnormbgcolor[] = "#222222";
static char hidselbgcolor[] = "#222222";
static char urgfgcolor[] = "#bbbbbb";
static char urgbgcolor[] = "#222222";
static char urgbordercolor[] = "#ff0000";
static char urgfloatcolor[] = "#db8fd9";
#if RENAMED_SCRATCHPADS_PATCH
static char scratchselfgcolor[] = "#FFF7D4";
static char scratchselbgcolor[] = "#77547E";
static char scratchselbordercolor[] = "#894B9F";
static char scratchselfloatcolor[] = "#894B9F";
static char scratchnormfgcolor[] = "#FFF7D4";
static char scratchnormbgcolor[] = "#664C67";
static char scratchnormbordercolor[] = "#77547E";
static char scratchnormfloatcolor[] = "#77547E";
#endif // RENAMED_SCRATCHPADS_PATCH
#if BAR_FLEXWINTITLE_PATCH
static char normTTBbgcolor[] = "#330000";
static char normLTRbgcolor[] = "#330033";
static char normMONObgcolor[] = "#000033";
static char normGRIDbgcolor[] = "#003300";
static char normGRD1bgcolor[] = "#003300";
static char normGRD2bgcolor[] = "#003300";
static char normGRDMbgcolor[] = "#506600";
static char normHGRDbgcolor[] = "#b96600";
static char normDWDLbgcolor[] = "#003333";
static char normSPRLbgcolor[] = "#333300";
static char normfloatbgcolor[] = "#115577";
static char actTTBbgcolor[] = "#440000";
static char actLTRbgcolor[] = "#440044";
static char actMONObgcolor[] = "#000044";
static char actGRIDbgcolor[] = "#004400";
static char actGRD1bgcolor[] = "#004400";
static char actGRD2bgcolor[] = "#004400";
static char actGRDMbgcolor[] = "#507711";
static char actHGRDbgcolor[] = "#b97711";
static char actDWDLbgcolor[] = "#004444";
static char actSPRLbgcolor[] = "#444400";
static char actfloatbgcolor[] = "#116688";
static char selTTBbgcolor[] = "#550000";
static char selLTRbgcolor[] = "#550055";
static char selMONObgcolor[] = "#212171";
static char selGRIDbgcolor[] = "#005500";
static char selGRD1bgcolor[] = "#005500";
static char selGRD2bgcolor[] = "#005500";
static char selGRDMbgcolor[] = "#508822";
static char selHGRDbgcolor[] = "#b98822";
static char selDWDLbgcolor[] = "#005555";
static char selSPRLbgcolor[] = "#555500";
static char selfloatbgcolor[] = "#117799";
#endif // BAR_FLEXWINTITLE_PATCH
#if BAR_ALPHA_PATCH
static const unsigned int baralpha = 0xd0;
static const unsigned int borderalpha = OPAQUE;
static const unsigned int alphas[][3] = {
/* fg bg border */
[SchemeNorm] = { OPAQUE, baralpha, borderalpha },
[SchemeSel] = { OPAQUE, baralpha, borderalpha },
[SchemeTitleNorm] = { OPAQUE, baralpha, borderalpha },
[SchemeTitleSel] = { OPAQUE, baralpha, borderalpha },
[SchemeTagsNorm] = { OPAQUE, baralpha, borderalpha },
[SchemeTagsSel] = { OPAQUE, baralpha, borderalpha },
[SchemeHidNorm] = { OPAQUE, baralpha, borderalpha },
[SchemeHidSel] = { OPAQUE, baralpha, borderalpha },
[SchemeUrg] = { OPAQUE, baralpha, borderalpha },
#if RENAMED_SCRATCHPADS_PATCH
[SchemeScratchSel] = { OPAQUE, baralpha, borderalpha },
[SchemeScratchNorm] = { OPAQUE, baralpha, borderalpha },
#endif // RENAMED_SCRATCHPADS_PATCH
#if BAR_FLEXWINTITLE_PATCH
[SchemeFlexActTTB] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActLTR] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActMONO] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActGRID] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActGRD1] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActGRD2] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActGRDM] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActHGRD] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActDWDL] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActSPRL] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexActFloat] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaTTB] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaLTR] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaMONO] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaGRID] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaGRD1] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaGRD2] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaGRDM] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaHGRD] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaDWDL] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaSPRL] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexInaFloat] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelTTB] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelLTR] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelMONO] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelGRID] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelGRD1] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelGRD2] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelGRDM] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelHGRD] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelDWDL] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelSPRL] = { OPAQUE, baralpha, borderalpha },
[SchemeFlexSelFloat] = { OPAQUE, baralpha, borderalpha },
#endif // BAR_FLEXWINTITLE_PATCH
};
#endif // BAR_ALPHA_PATCH
#if BAR_VTCOLORS_PATCH
static const char title_bg_dark[] = "#303030";
static const char title_bg_light[] = "#fdfdfd";
static const int color_ptrs[][ColCount] = {
/* fg bg border float */
[SchemeNorm] = { -1, -1, 5, 12 },
[SchemeSel] = { -1, -1, 11, 13 },
[SchemeTitleNorm] = { 6, -1, -1, -1 },
[SchemeTitleSel] = { 6, -1, -1, -1 },
[SchemeTagsNorm] = { 2, 0, 0, -1 },
[SchemeTagsSel] = { 6, 5, 5, -1 },
[SchemeHidNorm] = { 5, 0, 0, -1 },
[SchemeHidSel] = { 6, -1, -1, -1 },
[SchemeUrg] = { 7, 9, 9, 15 },
};
#endif // BAR_VTCOLORS_PATCH
static char *colors[][ColCount] = {
/* fg bg border float */
[SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor, normfloatcolor },
[SchemeSel] = { selfgcolor, selbgcolor, selbordercolor, selfloatcolor },
[SchemeTitleNorm] = { titlenormfgcolor, titlenormbgcolor, titlenormbordercolor, titlenormfloatcolor },
[SchemeTitleSel] = { titleselfgcolor, titleselbgcolor, titleselbordercolor, titleselfloatcolor },
[SchemeTagsNorm] = { tagsnormfgcolor, tagsnormbgcolor, tagsnormbordercolor, tagsnormfloatcolor },
[SchemeTagsSel] = { tagsselfgcolor, tagsselbgcolor, tagsselbordercolor, tagsselfloatcolor },
[SchemeHidNorm] = { hidnormfgcolor, hidnormbgcolor, c000000, c000000 },
[SchemeHidSel] = { hidselfgcolor, hidselbgcolor, c000000, c000000 },
[SchemeUrg] = { urgfgcolor, urgbgcolor, urgbordercolor, urgfloatcolor },
#if RENAMED_SCRATCHPADS_PATCH
[SchemeScratchSel] = { scratchselfgcolor, scratchselbgcolor, scratchselbordercolor, scratchselfloatcolor },
[SchemeScratchNorm] = { scratchnormfgcolor, scratchnormbgcolor, scratchnormbordercolor, scratchnormfloatcolor },
#endif // RENAMED_SCRATCHPADS_PATCH
#if BAR_FLEXWINTITLE_PATCH
[SchemeFlexActTTB] = { titleselfgcolor, actTTBbgcolor, actTTBbgcolor, c000000 },
[SchemeFlexActLTR] = { titleselfgcolor, actLTRbgcolor, actLTRbgcolor, c000000 },
[SchemeFlexActMONO] = { titleselfgcolor, actMONObgcolor, actMONObgcolor, c000000 },
[SchemeFlexActGRID] = { titleselfgcolor, actGRIDbgcolor, actGRIDbgcolor, c000000 },
[SchemeFlexActGRD1] = { titleselfgcolor, actGRD1bgcolor, actGRD1bgcolor, c000000 },
[SchemeFlexActGRD2] = { titleselfgcolor, actGRD2bgcolor, actGRD2bgcolor, c000000 },
[SchemeFlexActGRDM] = { titleselfgcolor, actGRDMbgcolor, actGRDMbgcolor, c000000 },
[SchemeFlexActHGRD] = { titleselfgcolor, actHGRDbgcolor, actHGRDbgcolor, c000000 },
[SchemeFlexActDWDL] = { titleselfgcolor, actDWDLbgcolor, actDWDLbgcolor, c000000 },
[SchemeFlexActSPRL] = { titleselfgcolor, actSPRLbgcolor, actSPRLbgcolor, c000000 },
[SchemeFlexActFloat] = { titleselfgcolor, actfloatbgcolor, actfloatbgcolor, c000000 },
[SchemeFlexInaTTB] = { titlenormfgcolor, normTTBbgcolor, normTTBbgcolor, c000000 },
[SchemeFlexInaLTR] = { titlenormfgcolor, normLTRbgcolor, normLTRbgcolor, c000000 },
[SchemeFlexInaMONO] = { titlenormfgcolor, normMONObgcolor, normMONObgcolor, c000000 },
[SchemeFlexInaGRID] = { titlenormfgcolor, normGRIDbgcolor, normGRIDbgcolor, c000000 },
[SchemeFlexInaGRD1] = { titlenormfgcolor, normGRD1bgcolor, normGRD1bgcolor, c000000 },
[SchemeFlexInaGRD2] = { titlenormfgcolor, normGRD2bgcolor, normGRD2bgcolor, c000000 },
[SchemeFlexInaGRDM] = { titlenormfgcolor, normGRDMbgcolor, normGRDMbgcolor, c000000 },
[SchemeFlexInaHGRD] = { titlenormfgcolor, normHGRDbgcolor, normHGRDbgcolor, c000000 },
[SchemeFlexInaDWDL] = { titlenormfgcolor, normDWDLbgcolor, normDWDLbgcolor, c000000 },
[SchemeFlexInaSPRL] = { titlenormfgcolor, normSPRLbgcolor, normSPRLbgcolor, c000000 },
[SchemeFlexInaFloat] = { titlenormfgcolor, normfloatbgcolor, normfloatbgcolor, c000000 },
[SchemeFlexSelTTB] = { titleselfgcolor, selTTBbgcolor, selTTBbgcolor, c000000 },
[SchemeFlexSelLTR] = { titleselfgcolor, selLTRbgcolor, selLTRbgcolor, c000000 },
[SchemeFlexSelMONO] = { titleselfgcolor, selMONObgcolor, selMONObgcolor, c000000 },
[SchemeFlexSelGRID] = { titleselfgcolor, selGRIDbgcolor, selGRIDbgcolor, c000000 },
[SchemeFlexSelGRD1] = { titleselfgcolor, selGRD1bgcolor, selGRD1bgcolor, c000000 },
[SchemeFlexSelGRD2] = { titleselfgcolor, selGRD2bgcolor, selGRD2bgcolor, c000000 },
[SchemeFlexSelGRDM] = { titleselfgcolor, selGRDMbgcolor, selGRDMbgcolor, c000000 },
[SchemeFlexSelHGRD] = { titleselfgcolor, selHGRDbgcolor, selHGRDbgcolor, c000000 },
[SchemeFlexSelDWDL] = { titleselfgcolor, selDWDLbgcolor, selDWDLbgcolor, c000000 },
[SchemeFlexSelSPRL] = { titleselfgcolor, selSPRLbgcolor, selSPRLbgcolor, c000000 },
[SchemeFlexSelFloat] = { titleselfgcolor, selfloatbgcolor, selfloatbgcolor, c000000 },
#endif // BAR_FLEXWINTITLE_PATCH
};
#if BAR_POWERLINE_STATUS_PATCH
static char *statuscolors[][ColCount] = {
/* fg bg border float */
[SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor, normfloatcolor },
[SchemeSel] = { selfgcolor, selbgcolor, selbordercolor, selfloatcolor },
[SchemeTitleNorm] = { titlenormfgcolor, titlenormbgcolor, titlenormbordercolor, titlenormfloatcolor },
[SchemeTitleSel] = { titleselfgcolor, titleselbgcolor, titleselbordercolor, titleselfloatcolor },
[SchemeTagsNorm] = { tagsnormfgcolor, tagsnormbgcolor, tagsnormbordercolor, tagsnormfloatcolor },
[SchemeTagsSel] = { tagsselfgcolor, tagsselbgcolor, tagsselbordercolor, tagsselfloatcolor },
[SchemeHidNorm] = { hidnormfgcolor, hidnormbgcolor, c000000, c000000 },
[SchemeHidSel] = { hidselfgcolor, hidselbgcolor, c000000, c000000 },
[SchemeUrg] = { urgfgcolor, urgbgcolor, urgbordercolor, urgfloatcolor },
};
#endif // BAR_POWERLINE_STATUS_PATCH
#if BAR_LAYOUTMENU_PATCH
static const char *layoutmenu_cmd = "layoutmenu.sh";
#endif
#if COOL_AUTOSTART_PATCH
static const char *const autostart[] = {
"alacritty", NULL,
//"google-chrome-stable", NULL,
NULL, /* terminate */
};
#endif // COOL_AUTOSTART_PATCH
#if RENAMED_SCRATCHPADS_PATCH
static const char *scratchpadcmd[] = {"s", "st", "-n", "spterm", NULL};
#elif SCRATCHPADS_PATCH
const char *spcmd1[] = {"alacritty", "--class", "scratch0", NULL};
const char *spcmd2[] = {"alacritty", "--class", "scratch1", NULL};
const char *spcmd3[] = {"/home/seds/.bin/editor", NULL};
static Sp scratchpads[] = {
/* name cmd */
{"scratch0", spcmd1},
{"scratch1", spcmd2},
{"emacs0", spcmd3},
};
#endif // SCRATCHPADS_PATCH
/* Tags
* In a traditional dwm the number of tags in use can be changed simply by changing the number
* of strings in the tags array. This build does things a bit different which has some added
* benefits. If you need to change the number of tags here then change the NUMTAGS macro in dwm.c.
*
* Examples:
*
* 1) static char *tagicons[][NUMTAGS*2] = {
* [DEFAULT_TAGS] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I" },
* }
*
* 2) static char *tagicons[][1] = {
* [DEFAULT_TAGS] = { "•" },
* }
*
* The first example would result in the tags on the first monitor to be 1 through 9, while the
* tags for the second monitor would be named A through I. A third monitor would start again at
* 1 through 9 while the tags on a fourth monitor would also be named A through I. Note the tags
* count of NUMTAGS*2 in the array initialiser which defines how many tag text / icon exists in
* the array. This can be changed to *3 to add separate icons for a third monitor.
*
* For the second example each tag would be represented as a bullet point. Both cases work the
* same from a technical standpoint - the icon index is derived from the tag index and the monitor
* index. If the icon index is is greater than the number of tag icons then it will wrap around
* until it an icon matches. Similarly if there are two tag icons then it would alternate between
* them. This works seamlessly with alternative tags and alttagsdecoration patches.
*/
#if NAMETAG_PATCH
static char tagicons[][NUMTAGS][MAX_TAGLEN] =
#else
static char *tagicons[][NUMTAGS] =
#endif // NAMETAG_PATCH
{
[DEFAULT_TAGS] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" },
[ALTERNATIVE_TAGS] = { "A", "B", "C", "D", "E", "F", "G", "H", "I" },
[ALT_TAGS_DECORATION] = { "<1>", "<2>", "<3>", "<4>", "<5>", "<6>", "<7>", "<8>", "<9>" },
};
#if BAR_TAGGRID_PATCH
/* grid of tags */
#define SWITCHTAG_UP 1 << 0
#define SWITCHTAG_DOWN 1 << 1
#define SWITCHTAG_LEFT 1 << 2
#define SWITCHTAG_RIGHT 1 << 3
#define SWITCHTAG_TOGGLETAG 1 << 4
#define SWITCHTAG_TAG 1 << 5
#define SWITCHTAG_VIEW 1 << 6
#define SWITCHTAG_TOGGLEVIEW 1 << 7
static const int tagrows = 2;
#endif // BAR_TAGGRID_PATCH
/* There are two options when it comes to per-client rules:
* - a typical struct table or
* - using the RULE macro
*
* A traditional struct table looks like this:
* // class instance title wintype tags mask isfloating monitor
* { "Gimp", NULL, NULL, NULL, 1 << 4, 0, -1 },
* { "Firefox", NULL, NULL, NULL, 1 << 7, 0, -1 },
*
* The RULE macro has the default values set for each field allowing you to only
* specify the values that are relevant for your rule, e.g.
*
* RULE(.class = "Gimp", .tags = 1 << 4)
* RULE(.class = "Firefox", .tags = 1 << 7)
*
* Refer to the Rule struct definition for the list of available fields depending on
* the patches you enable.
*/
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
* WM_WINDOW_ROLE(STRING) = role
* _NET_WM_WINDOW_TYPE(ATOM) = wintype
*/
RULE(.wintype = WTYPE "DIALOG", .isfloating = 1)
RULE(.wintype = WTYPE "UTILITY", .isfloating = 1)
RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
RULE(.class = "Gimp", .tags = 1 << 4)
RULE(.class = "Firefox", .tags = 1 << 7)
RULE(.class = "Blueman-manager", .isfloating = 1, .monitor = -1)
RULE(.class = "Nm-connection-editor", .isfloating = 1, .monitor = -1)
RULE(.class = "Pavucontrol", .isfloating = 1, .monitor = -1)
RULE(.class = "Pcmanfm", .isfloating = 1, .monitor = -1)
RULE(.class = "Thunar", .isfloating = 1, .monitor = -1)
#if RENAMED_SCRATCHPADS_PATCH
RULE(.instance = "spterm", .scratchkey = 's', .isfloating = 1)
#elif SCRATCHPADS_PATCH
RULE(.instance = "scratch0", .tags = SPTAG(0), .isfloating = 1, .monitor = -1)
RULE(.instance = "scratch1", .tags = SPTAG(1), .isfloating = 1, .monitor = -1)
RULE(.instance = "emacs0", .tags = SPTAG(2), .isfloating = 1, .monitor = -1)
#endif // SCRATCHPADS_PATCH
};
#if MONITOR_RULES_PATCH
#if PERTAG_PATCH
static const MonitorRule monrules[] = {
/* monitor tag layout mfact nmaster showbar topbar */
{ 1, -1, 2, -1, -1, -1, -1 }, // use a different layout for the second monitor
{ -1, -1, 0, -1, -1, -1, -1 }, // default
};
#else
static const MonitorRule monrules[] = {
/* monitor layout mfact nmaster showbar topbar */
{ 1, 2, -1, -1, -1, -1 }, // use a different layout for the second monitor
{ -1, 0, -1, -1, -1, -1 }, // default
};
#endif // PERTAG_PATCH
#endif // MONITOR_RULES_PATCH
#if INSETS_PATCH
static const Inset default_inset = {
.x = 0,
.y = 30,
.w = 0,
.h = 0,
};
#endif // INSETS_PATCH
/* Bar rules allow you to configure what is shown where on the bar, as well as
* introducing your own bar modules.
*
* monitor:
* -1 show on all monitors
* 0 show on monitor 0
* 'A' show on active monitor (i.e. focused / selected) (or just -1 for active?)
* bar - bar index, 0 is default, 1 is extrabar
* alignment - how the module is aligned compared to other modules
* widthfunc, drawfunc, clickfunc - providing bar module width, draw and click functions
* name - does nothing, intended for visual clue and for logging / debugging
*/
static const BarRule barrules[] = {
/* monitor bar alignment widthfunc drawfunc clickfunc hoverfunc name */
#if BAR_STATUSBUTTON_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_stbutton, draw_stbutton, click_stbutton, NULL, "statusbutton" },
#endif // BAR_STATUSBUTTON_PATCH
#if BAR_POWERLINE_TAGS_PATCH
{ 0, 0, BAR_ALIGN_LEFT, width_pwrl_tags, draw_pwrl_tags, click_pwrl_tags, NULL, "powerline_tags" },
#endif // BAR_POWERLINE_TAGS_PATCH
#if BAR_TAGS_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, hover_tags, "tags" },
#endif // BAR_TAGS_PATCH
#if BAR_TAGLABELS_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_taglabels, draw_taglabels, click_taglabels, NULL, "taglabels" },
#endif // BAR_TAGLABELS_PATCH
#if BAR_TAGGRID_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_taggrid, draw_taggrid, click_taggrid, NULL, "taggrid" },
#endif // BAR_TAGGRID_PATCH
#if BAR_SYSTRAY_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, NULL, "systray" },
#endif // BAR_SYSTRAY_PATCH
#if BAR_LTSYMBOL_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, NULL, "layout" },
#endif // BAR_LTSYMBOL_PATCH
#if BAR_STATUSCOLORS_PATCH && BAR_STATUSCMD_PATCH
{ statusmon, 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscmd, NULL, "statuscolors" },
#elif BAR_STATUSCOLORS_PATCH
{ statusmon, 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscolors, NULL, "statuscolors" },
#elif BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status2d, draw_status2d, click_statuscmd, NULL, "status2d" },
#elif BAR_STATUS2D_PATCH
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status2d, draw_status2d, click_status2d, NULL, "status2d" },
#elif BAR_POWERLINE_STATUS_PATCH
{ statusmon, 0, BAR_ALIGN_RIGHT, width_pwrl_status, draw_pwrl_status, click_pwrl_status, NULL, "powerline_status" },
#elif BAR_STATUS_PATCH && BAR_STATUSCMD_PATCH
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_statuscmd, NULL, "status" },
#elif BAR_STATUS_PATCH
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_status, NULL, "status" },
#endif // BAR_STATUS2D_PATCH | BAR_STATUSCMD_PATCH
#if XKB_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_xkb, draw_xkb, click_xkb, NULL, "xkb" },
#endif // XKB_PATCH
#if BAR_FLEXWINTITLE_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_flexwintitle, draw_flexwintitle, click_flexwintitle, NULL, "flexwintitle" },
#elif BAR_TABGROUPS_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_bartabgroups, draw_bartabgroups, click_bartabgroups, NULL, "bartabgroups" },
#elif BAR_AWESOMEBAR_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_awesomebar, draw_awesomebar, click_awesomebar, NULL, "awesomebar" },
#elif BAR_FANCYBAR_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_fancybar, draw_fancybar, click_fancybar, NULL, "fancybar" },
#elif BAR_WINTITLE_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_wintitle, draw_wintitle, click_wintitle, NULL, "wintitle" },
#endif // BAR_TABGROUPS_PATCH | BAR_AWESOMEBAR_PATCH | BAR_FANCYBAR_PATCH | BAR_WINTITLE_PATCH
#if BAR_EXTRASTATUS_PATCH
#if BAR_STATUSCOLORS_PATCH && BAR_STATUSCMD_PATCH
{ statusmon, 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscmd_es, NULL, "statuscolors_es" },
#elif BAR_STATUSCOLORS_PATCH
{ statusmon, 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscolors, NULL, "statuscolors_es" },
#elif BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
{ statusmon, 1, BAR_ALIGN_CENTER, width_status2d_es, draw_status2d_es, click_statuscmd_es, NULL, "status2d_es" },
#elif BAR_STATUS2D_PATCH
{ statusmon, 1, BAR_ALIGN_CENTER, width_status2d_es, draw_status2d_es, click_status2d, NULL, "status2d_es" },
#elif BAR_POWERLINE_STATUS_PATCH
{ statusmon, 1, BAR_ALIGN_RIGHT, width_pwrl_status_es, draw_pwrl_status_es, click_pwrl_status, NULL, "powerline_status" },
#elif BAR_STATUSCMD_PATCH && BAR_STATUS_PATCH
{ statusmon, 1, BAR_ALIGN_CENTER, width_status_es, draw_status_es, click_statuscmd_es, NULL, "status_es" },
#elif BAR_STATUS_PATCH
{ statusmon, 1, BAR_ALIGN_CENTER, width_status_es, draw_status_es, click_status, NULL, "status_es" },
#endif // BAR_STATUS2D_PATCH | BAR_STATUSCMD_PATCH
#endif // BAR_EXTRASTATUS_PATCH
#if BAR_FLEXWINTITLE_PATCH
#if BAR_WINTITLE_HIDDEN_PATCH
{ -1, 1, BAR_ALIGN_RIGHT_RIGHT, width_wintitle_hidden, draw_wintitle_hidden, click_wintitle_hidden, NULL, "wintitle_hidden" },
#endif
#if BAR_WINTITLE_FLOATING_PATCH
{ -1, 1, BAR_ALIGN_LEFT, width_wintitle_floating, draw_wintitle_floating, click_wintitle_floating, NULL, "wintitle_floating" },
#endif // BAR_WINTITLE_FLOATING_PATCH
#endif // BAR_FLEXWINTITLE_PATCH
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
#if FLEXTILE_DELUXE_LAYOUT
static const int nstack = 0; /* number of clients in primary stack area */
#endif // FLEXTILE_DELUXE_LAYOUT
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
#if DECORATION_HINTS_PATCH
static const int decorhints = 1; /* 1 means respect decoration hints */
#endif // DECORATION_HINTS_PATCH
#if NROWGRID_LAYOUT
#define FORCE_VSPLIT 1
#endif
#if TAPRESIZE_PATCH
/* mouse scroll resize */
static const int scrollsensetivity = 30; /* 1 means resize window by 1 pixel for each scroll event */
/* resizemousescroll direction argument list */
static const int scrollargs[][2] = {
/* width change height change */
{ +scrollsensetivity, 0 },
{ -scrollsensetivity, 0 },
{ 0, +scrollsensetivity },
{ 0, -scrollsensetivity },
};
#endif // TAPRESIZE_PATCH
#if FLEXTILE_DELUXE_LAYOUT
static const Layout layouts[] = {
/* symbol arrange function, { nmaster, nstack, layout, master axis, stack axis, secondary stack axis, symbol func } */
{ "[]=", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL } }, // default tile layout
{ "><>", NULL, {0} }, /* no layout function means floating behavior */
{ "[M]", flextile, { -1, -1, NO_SPLIT, MONOCLE, MONOCLE, 0, NULL } }, // monocle
{ "|||", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // columns (col) layout
{ ">M>", flextile, { -1, -1, FLOATING_MASTER, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // floating master
{ "[D]", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, MONOCLE, 0, NULL } }, // deck
{ "TTT", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // bstack
{ "===", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // bstackhoriz
{ "|M|", flextile, { -1, -1, SPLIT_CENTERED_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, TOP_TO_BOTTOM, NULL } }, // centeredmaster
{ "-M-", flextile, { -1, -1, SPLIT_CENTERED_HORIZONTAL, TOP_TO_BOTTOM, LEFT_TO_RIGHT, LEFT_TO_RIGHT, NULL } }, // centeredmaster horiz
{ ":::", flextile, { -1, -1, NO_SPLIT, GAPPLESSGRID, GAPPLESSGRID, 0, NULL } }, // gappless grid
{ "[\\]", flextile, { -1, -1, NO_SPLIT, DWINDLE, DWINDLE, 0, NULL } }, // fibonacci dwindle
{ "(@)", flextile, { -1, -1, NO_SPLIT, SPIRAL, SPIRAL, 0, NULL } }, // fibonacci spiral
{ "[T]", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TATAMI, 0, NULL } }, // tatami mats
#if TILE_LAYOUT
{ "[]=", tile, {0} },
#endif
#if MONOCLE_LAYOUT
{ "[M]", monocle, {0} },
#endif
#if BSTACK_LAYOUT
{ "TTT", bstack, {0} },
#endif
#if BSTACKHORIZ_LAYOUT
{ "===", bstackhoriz, {0} },
#endif
#if CENTEREDMASTER_LAYOUT
{ "|M|", centeredmaster, {0} },
#endif
#if CENTEREDFLOATINGMASTER_LAYOUT
{ ">M>", centeredfloatingmaster, {0} },
#endif
#if COLUMNS_LAYOUT
{ "|||", col, {0} },
#endif
#if DECK_LAYOUT
{ "[D]", deck, {0} },
#endif
#if FIBONACCI_SPIRAL_LAYOUT
{ "(@)", spiral, {0} },
#endif
#if FIBONACCI_DWINDLE_LAYOUT
{ "[\\]", dwindle, {0} },
#endif
#if GRIDMODE_LAYOUT
{ "HHH", grid, {0} },
#endif
#if HORIZGRID_LAYOUT
{ "---", horizgrid, {0} },
#endif
#if GAPPLESSGRID_LAYOUT
{ ":::", gaplessgrid, {0} },
#endif
#if NROWGRID_LAYOUT
{ "###", nrowgrid, {0} },
#endif
};
#else
static const Layout layouts[] = {
/* symbol arrange function */
#if TILE_LAYOUT
{ "[]=", tile }, /* first entry is default */
#endif
{ "><>", NULL }, /* no layout function means floating behavior */
#if MONOCLE_LAYOUT
{ "[M]", monocle },
#endif
#if BSTACK_LAYOUT
{ "TTT", bstack },
#endif
#if BSTACKHORIZ_LAYOUT
{ "===", bstackhoriz },
#endif
#if CENTEREDMASTER_LAYOUT
{ "|M|", centeredmaster },
#endif
#if CENTEREDFLOATINGMASTER_LAYOUT
{ ">M>", centeredfloatingmaster },
#endif
#if COLUMNS_LAYOUT
{ "|||", col },
#endif
#if DECK_LAYOUT
{ "[D]", deck },
#endif
#if FIBONACCI_SPIRAL_LAYOUT
{ "(@)", spiral },
#endif
#if FIBONACCI_DWINDLE_LAYOUT
{ "[\\]", dwindle },
#endif
#if GRIDMODE_LAYOUT
{ "HHH", grid },
#endif
#if HORIZGRID_LAYOUT
{ "---", horizgrid },
#endif
#if GAPPLESSGRID_LAYOUT
{ ":::", gaplessgrid },
#endif
#if NROWGRID_LAYOUT
{ "###", nrowgrid },
#endif
};
#endif // FLEXTILE_DELUXE_LAYOUT
#if XKB_PATCH
/* xkb frontend */
static const char *xkb_layouts[] = {
"en",
"ru",
};
#endif // XKB_PATCH
/* key definitions */
#define MODKEY Mod4Mask
#define MODKEY1 Mod1Mask
#if COMBO_PATCH && SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#elif COMBO_PATCH && SWAPTAGS_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
#elif COMBO_PATCH && TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#elif COMBO_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
#elif SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#elif SWAPTAGS_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
#elif TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#else
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
#endif // COMBO_PATCH / SWAPTAGS_PATCH / TAGOTHERMONITOR_PATCH
#if STACKER_PATCH
#define STACKKEYS(MOD,ACTION) \
{ MOD, XK_j, ACTION##stack, {.i = INC(+1) } }, \
{ MOD, XK_k, ACTION##stack, {.i = INC(-1) } }, \
{ MOD, XK_s, ACTION##stack, {.i = PREVSEL } }, \
{ MOD, XK_w, ACTION##stack, {.i = 0 } }, \
{ MOD, XK_e, ACTION##stack, {.i = 1 } }, \
{ MOD, XK_a, ACTION##stack, {.i = 2 } }, \
{ MOD, XK_z, ACTION##stack, {.i = -1 } },
#endif // STACKER_PATCH
#if BAR_HOLDBAR_PATCH
#define HOLDKEY 0 // replace 0 with the keysym to activate holdbar
#endif // BAR_HOLDBAR_PATCH
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/usr/bin/zsh", "-c", cmd, NULL } }
/* commands */
#if !NODMENU_PATCH
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
#endif // NODMENU_PATCH
static const char *dmenucmd[] = {
"dmenu_run",
#if !NODMENU_PATCH
"-m", dmenumon,
#endif // NODMENU_PATCH
"-fn", dmenufont,
"-nb", normbgcolor,
"-nf", normfgcolor,
"-sb", selbgcolor,
"-sf", selfgcolor,
#if BAR_DMENUMATCHTOP_PATCH
topbar ? NULL : "-b",
#endif // BAR_DMENUMATCHTOP_PATCH
NULL
};
static const char *termcmd[] = { "alacritty", NULL };
#if BAR_STATUSCMD_PATCH
#if BAR_DWMBLOCKS_PATCH
/* This defines the name of the executable that handles the bar (used for signalling purposes) */
#define STATUSBAR "dwmblocks"
#else
/* commands spawned when clicking statusbar, the mouse button pressed is exported as BUTTON */
static const StatusCmd statuscmds[] = {
{ "notify-send Volume$BUTTON", 1 },
{ "notify-send CPU$BUTTON", 2 },
{ "notify-send Battery$BUTTON", 3 },
};
/* test the above with: xsetroot -name "$(printf '\x01Volume |\x02 CPU |\x03 Battery')" */
static const char *statuscmd[] = { "/bin/sh", "-c", NULL, NULL };
#endif // BAR_DWMBLOCKS_PATCH
#endif // BAR_STATUSCMD_PATCH
#if ON_EMPTY_KEYS_PATCH
static const char* firefoxcmd[] = {"firefox", NULL};
static const Key on_empty_keys[] = {
/* modifier key function argument */
{ 0, XK_f, spawn, {.v = firefoxcmd } },
};
#endif // ON_EMPTY_KEYS_PATCH
static const Key keys[] = {
/* modifier key function argument */
#if KEYMODES_PATCH
{ MODKEY, XK_Escape, setkeymode, {.ui = COMMANDMODE} },
#endif // KEYMODES_PATCH
{ MODKEY|MODKEY1, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
#if RIODRAW_PATCH
{ MODKEY|ControlMask, XK_p, riospawnsync, {.v = dmenucmd } },
{ MODKEY|ControlMask, XK_Return, riospawn, {.v = termcmd } },
{ MODKEY, XK_s, rioresize, {0} },
#endif // RIODRAW_PATCH
{ MODKEY, XK_b, togglebar, {0} },
#if TAB_PATCH
{ MODKEY|ControlMask, XK_b, tabmode, {-1} },
#endif // TAB_PATCH
#if FOCUSMASTER_PATCH
{ MODKEY|ControlMask, XK_space, focusmaster, {0} },
#endif // FOCUSMASTER_PATCH
#if STACKER_PATCH
STACKKEYS(MODKEY, focus)
STACKKEYS(MODKEY|ShiftMask, push)
#else
{ MODKEY|MODKEY1, XK_j, focusstack, {.i = +1 } },
{ MODKEY|MODKEY1, XK_k, focusstack, {.i = -1 } },
#endif // STACKER_PATCH
#if FOCUSDIR_PATCH
{ MODKEY, XK_Left, focusdir, {.i = 0 } }, // left
{ MODKEY, XK_Right, focusdir, {.i = 1 } }, // right
{ MODKEY, XK_Up, focusdir, {.i = 2 } }, // up
{ MODKEY, XK_Down, focusdir, {.i = 3 } }, // down
#endif // FOCUSDIR_PATCH
#if SWAPFOCUS_PATCH && PERTAG_PATCH
{ MODKEY, XK_s, swapfocus, {.i = -1 } },
#endif // SWAPFOCUS_PATCH
#if SWITCHCOL_PATCH
{ MODKEY, XK_v, switchcol, {0} },
#endif // SWITCHCOL_PATCH
#if ROTATESTACK_PATCH
{ MODKEY|Mod4Mask, XK_j, rotatestack, {.i = +1 } },
{ MODKEY|Mod4Mask, XK_k, rotatestack, {.i = -1 } },
#endif // ROTATESTACK_PATCH
#if INPLACEROTATE_PATCH
{ MODKEY|Mod4Mask, XK_j, inplacerotate, {.i = +2 } }, // same as rotatestack
{ MODKEY|Mod4Mask, XK_k, inplacerotate, {.i = -2 } }, // same as reotatestack
{ MODKEY|Mod4Mask|ShiftMask, XK_j, inplacerotate, {.i = +1} },
{ MODKEY|Mod4Mask|ShiftMask, XK_k, inplacerotate, {.i = -1} },
#endif // INPLACEROTATE_PATCH
#if PUSH_PATCH || PUSH_NO_MASTER_PATCH
{ MODKEY|ControlMask, XK_j, pushdown, {0} },
{ MODKEY|ControlMask, XK_k, pushup, {0} },
#endif // PUSH_PATCH / PUSH_NO_MASTER_PATCH
{ MODKEY|MODKEY1, XK_i, incnmaster, {.i = +1 } },
{ MODKEY|MODKEY1, XK_d, incnmaster, {.i = -1 } },
#if FLEXTILE_DELUXE_LAYOUT
{ MODKEY|ControlMask, XK_i, incnstack, {.i = +1 } },
{ MODKEY|ControlMask, XK_u, incnstack, {.i = -1 } },
#endif // FLEXTILE_DELUXE_LAYOUT
{ MODKEY|MODKEY1, XK_h, setmfact, {.f = -0.05} },
{ MODKEY|MODKEY1, XK_l, setmfact, {.f = +0.05} },
#if CFACTS_PATCH
{ MODKEY|ShiftMask, XK_h, setcfact, {.f = +0.25} },
{ MODKEY|ShiftMask, XK_l, setcfact, {.f = -0.25} },
{ MODKEY|ShiftMask, XK_o, setcfact, {0} },
#endif // CFACTS_PATCH
#if ASPECTRESIZE_PATCH
{ MODKEY|ControlMask|ShiftMask, XK_e, aspectresize, {.i = +24} },
{ MODKEY|ControlMask|ShiftMask, XK_r, aspectresize, {.i = -24} },
#endif // ASPECTRESIZE_PATCH
#if MOVERESIZE_PATCH
{ MODKEY|Mod4Mask, XK_Down, moveresize, {.v = "0x 25y 0w 0h" } },
{ MODKEY|Mod4Mask, XK_Up, moveresize, {.v = "0x -25y 0w 0h" } },
{ MODKEY|Mod4Mask, XK_Right, moveresize, {.v = "25x 0y 0w 0h" } },
{ MODKEY|Mod4Mask, XK_Left, moveresize, {.v = "-25x 0y 0w 0h" } },
{ MODKEY|Mod4Mask|ShiftMask, XK_Down, moveresize, {.v = "0x 0y 0w 25h" } },
{ MODKEY|Mod4Mask|ShiftMask, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } },
{ MODKEY|Mod4Mask|ShiftMask, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } },
{ MODKEY|Mod4Mask|ShiftMask, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } },
#endif // MOVERESIZE_PATCH
#if MOVESTACK_PATCH
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
#endif // MOVESTACK_PATCH
#if TRANSFER_PATCH
{ MODKEY, XK_x, transfer, {0} },
#endif // TRANSFER_PATCH
#if TRANSFER_ALL_PATCH
{ MODKEY|ControlMask, XK_x, transferall, {0} },
#endif // TRANSFER_ALL_PATCH
#if REORGANIZETAGS_PATCH
{ MODKEY|ControlMask, XK_r, reorganizetags, {0} },
#endif // REORGANIZETAGS_PATCH
#if DISTRIBUTETAGS_PATCH
{ MODKEY|ControlMask, XK_d, distributetags, {0} },
#endif // DISTRIBUTETAGS_PATCH
#if INSETS_PATCH