config.h (7685B) download
1/* See LICENSE file for copyright and license details. */
2
3#include <X11/XF86keysym.h>
4
5//#include "theme.h"
6
7static const char black[] = "#282828";
8static const char blue[] = "#83a598"; // focused window border
9static const char gray2[] = "#282828"; // unfocused window border
10static const char gray3[] = "#3c3836";
11static const char gray4[] = "#282828";
12static const char green[] = "#8ec07c";
13static const char orange[] = "#fe8019";
14static const char pink[] = "#d3869b";
15static const char red[] = "#fb4934";
16static const char white[] = "#ebdbb2";
17static const char yellow[] = "#b8bb26";
18static const char col_borderbar[] = "#1e2122";
19
20/* appearance */
21static const unsigned int borderpx = 2; /* border pixel of windows */
22static const unsigned int snap = 10; /* snap pixel */
23static const int horizpadbar = 10; /* horizontal padding for statusbar */
24static const int vertpadbar = 10; /* vertical padding for statusbar */
25static const int showbar = 1; /* 0 means no bar */
26static const int topbar = 0; /* 0 means bottom bar */
27static const unsigned int systraypinning =
28 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor
29 X */
30static const unsigned int systrayonleft =
31 0; /* 0: systray in the right corner, >0: systray on left of status text */
32static const unsigned int systrayspacing = 2; /* systray spacing */
33static const int systraypinningfailfirst =
34 1; /* 1: if pinning fails, display systray on the first monitor, False:
35 display systray on the last monitor*/
36static const int showsystray = 1; /* 0 means no systray */
37static const char *fonts[] = {"Monaco:size=9"};
38static const char *colors[][3] = { // dark
39 /* fg bg border */
40 [SchemeNorm] = { white, gray2, gray2 },
41 [SchemeSel] = { blue, gray3, blue },
42 [SchemeUrg] = { orange, gray3, red },
43 [3] = { gray3, orange, gray2 },
44 [4] = { gray3, green, gray2 }
45 };
46
47
48
49static const char *colors__[][3] = {
50 /* fg bg border */
51 [SchemeNorm] = { "#000000", "#eaffea", "#9eeeee" }, // fg = white, bg = gray2, border = gray2
52 [SchemeSel] = { "#eaffea", "#448844", "#55aaaa" }, // fg = blue, bg = gray3, border = blue
53 [SchemeUrg] = { "#eaffea", "#999999", "#ff0000" }, // fg = orange (light green), bg = gray3, border = red
54 [3] = { "#999999", "#eaffea", "#cccccc" }, // fg = gray3, bg = orange (light green), border = gray2
55 [4] = { "#999999", "#448844", "#cccccc" } // fg = gray3, bg = green, border = gray2
56};
57
58static const char dwmrc[] = ".dwmrc";
59
60/* tagging */
61static const char *tags[] = {"1", "2", "3", "4", "5"};
62
63static const Rule rules[] = {
64 /* xprop(1):
65 * WM_CLASS(STRING) = instance, class
66 * WM_NAME(STRING) = title
67 */
68 /* class instance title tags mask isfloating monitor */
69 {"Firefox", NULL, NULL, 1 << 5, 0, -1},
70};
71
72/* layout(s) */
73static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
74static const int nmaster = 1; /* number of clients in master area */
75static const int resizehints =
76 1; /* 1 means respect size hints in tiled resizals */
77static const int lockfullscreen =
78 1; /* 1 will force focus on the fullscreen window */
79
80static const Layout layouts[] = {
81 /* symbol arrange function */
82 {"[]=", tile}, /* first entry is default */
83 {"{ }", NULL}, /* no layout function means floating behavior */
84 {"[o]", monocle},
85};
86
87/* key definitions */
88#define MODKEY Mod4Mask
89#define TAGKEYS(KEY, TAG) \
90 {MODKEY, KEY, view, {.ui = 1 << TAG}}, \
91 {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
92 {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, { \
93 MODKEY | ControlMask | ShiftMask, KEY, toggletag, { .ui = 1 << TAG } \
94 }
95
96/* helper for spawning shell commands in the pre dwm-5.0 fashion */
97#define SHELL(cmd) \
98 { \
99 .v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } \
100 }
101#define COMMAND(...) \
102 { \
103 .v = (const char *[]) { __VA_ARGS__, NULL } \
104 }
105#define BACKLIGHT(device, value) \
106 COMMAND("brightnessctl", "-q", "-d", device, "set", value)
107
108#define monitor_backlight "intel_backlight"
109#define keyboard_backlight "smc::kbd_backlight"
110
111static const Key keys[] = {
112 /* modifier key function argument */
113 {MODKEY, XK_Return, spawn, COMMAND("st")},
114 {MODKEY | ShiftMask, XK_w, spawn, COMMAND("surf")},
115 {MODKEY, XK_w, spawn, COMMAND("firefox")},
116 {MODKEY, XK_space, spawn, COMMAND("dmenu_run")},
117 {MODKEY, XK_m, spawn, SHELL("man -k . | dmenu -l 25 | cut -d' ' -f1-2 | sed -E 's/(\\S+) \\((\\S+)\\)/\\2 \\1/' | xargs st -f 'SF Mono' -e man -s")},
118 {0, XF86XK_MonBrightnessUp, spawn, BACKLIGHT(monitor_backlight, "+5%")},
119 {0, XF86XK_MonBrightnessDown, spawn, BACKLIGHT(monitor_backlight, "5%-")},
120 {0, XF86XK_KbdBrightnessUp, spawn, BACKLIGHT(keyboard_backlight, "+5%")},
121 {0, XF86XK_KbdBrightnessDown, spawn, BACKLIGHT(keyboard_backlight, "5%-")},
122 {MODKEY, XK_o, spawn, COMMAND("dfm")},
123 {MODKEY | ShiftMask, XK_o, spawn, COMMAND("dfm", "-c")},
124 {MODKEY, XK_b, togglebar, {0}},
125 {MODKEY, XK_j, focusstack, {.i = +1}},
126 {MODKEY, XK_k, focusstack, {.i = -1}},
127 {MODKEY, XK_i, incnmaster, {.i = +1}},
128 {MODKEY, XK_d, incnmaster, {.i = -1}},
129 {MODKEY, XK_Left, setmfact, {.f = -0.05}},
130 {MODKEY, XK_Right, setmfact, {.f = +0.05}},
131 {MODKEY | ShiftMask, XK_Return, zoom, {0}},
132 {MODKEY, XK_Tab, view, {0}},
133 {MODKEY, XK_q, killclient, {0}},
134 {MODKEY | ControlMask, XK_comma, cyclelayout, {.i = -1}},
135 {MODKEY | ControlMask, XK_period, cyclelayout, {.i = +1}},
136 {MODKEY | ControlMask, XK_space, setlayout, {0}},
137 {MODKEY | ShiftMask, XK_space, togglefloating, {0}},
138 {MODKEY, XK_0, view, {.ui = ~0}},
139 {MODKEY | ShiftMask, XK_0, tag, {.ui = ~0}},
140 {MODKEY, XK_comma, focusmon, {.i = -1}},
141 {MODKEY, XK_period, focusmon, {.i = +1}},
142 {MODKEY | ShiftMask, XK_comma, tagmon, {.i = -1}},
143 {MODKEY | ShiftMask, XK_period, tagmon, {.i = +1}},
144 TAGKEYS(XK_1, 0),
145 TAGKEYS(XK_2, 1),
146 TAGKEYS(XK_3, 2),
147 TAGKEYS(XK_4, 3),
148 TAGKEYS(XK_5, 4),
149 {MODKEY | ShiftMask, XK_q, quit, {0}},
150};
151
152/* button definitions */
153/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
154 * ClkClientWin, or ClkRootWin */
155static const Button buttons[] = {
156 /* click event mask button function argument */
157 {ClkLtSymbol, 0, Button1, cyclelayout, {.i = +1}},
158 {ClkWinTitle, 0, Button2, zoom, {0}},
159 {ClkStatusText, 0, Button2, spawn, COMMAND("st")},
160 {ClkClientWin, MODKEY, Button1, movemouse, {0}},
161 {ClkClientWin, MODKEY, Button2, togglefloating, {0}},
162 {ClkClientWin, MODKEY, Button3, resizemouse, {0}},
163 {ClkTagBar, 0, Button1, view, {0}},
164 {ClkTagBar, 0, Button3, toggleview, {0}},
165 {ClkTagBar, MODKEY, Button1, tag, {0}},
166 {ClkTagBar, MODKEY, Button3, toggletag, {0}},
167};