diff options
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 117 |
1 files changed, 57 insertions, 60 deletions
diff --git a/config.def.h b/config.def.h index 9f6be48..e6d32c5 100644 --- a/config.def.h +++ b/config.def.h | |||
| @@ -1,27 +1,21 @@ | |||
| 1 | static const unsigned int borderpx = 0; /* border pixel of windows */ | 1 | // #include <cstddef> |
| 2 | static const unsigned int snap = 32; /* snap pixel */ | 2 | static const unsigned int borderpx = 0; |
| 3 | static const unsigned int systraypinning = | 3 | static const unsigned int snap = 32; |
| 4 | 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor | 4 | static const unsigned int systraypinning = 0; |
| 5 | X */ | 5 | static const unsigned int systrayonleft = 0; |
| 6 | static const unsigned int systrayonleft = | 6 | static const unsigned int systrayspacing = 2; |
| 7 | 0; /* 0: systray in the right corner, >0: systray on left of status text */ | 7 | static const unsigned int gappih = 5; |
| 8 | static const unsigned int systrayspacing = 2; /* systray spacing */ | 8 | static const unsigned int gappiv = 5; |
| 9 | static const int systraypinningfailfirst = | 9 | static const unsigned int gappoh = 5; |
| 10 | 1; /* 1: if pinning fails, display systray on the first monitor, False: | 10 | static const unsigned int gappov = 5; |
| 11 | display systray on the last monitor*/ | 11 | |
| 12 | static const int showsystray = 1; /* 0 means no systray */ | 12 | static const int showsystray = 1; |
| 13 | static const unsigned int gappih = 10; /* horiz inner gap between windows */ | 13 | static const int systraypinningfailfirst = 1; |
| 14 | static const unsigned int gappiv = 10; /* vert inner gap between windows */ | 14 | static const int smartgaps = 0; |
| 15 | static const unsigned int gappoh = | 15 | static const int swallowfloating = 1; |
| 16 | 10; /* horiz outer gap between windows and screen edge */ | 16 | static const int showbar = 0; |
| 17 | static const unsigned int gappov = | 17 | static const int topbar = 1; |
| 18 | 10; /* vert outer gap between windows and screen edge */ | 18 | |
| 19 | static const int smartgaps = | ||
| 20 | 0; /* 1 means no outer gap when there is only one window */ | ||
| 21 | static const int swallowfloating = | ||
| 22 | 1; /* 1 means no outer gap when there is only one window */ | ||
| 23 | static const int showbar = 0; /* 0 means no bar */ | ||
| 24 | static const int topbar = 1; /* 0 means bottom bar */ | ||
| 25 | static const char *fonts[] = {"monospace:size=10"}; | 19 | static const char *fonts[] = {"monospace:size=10"}; |
| 26 | static const char dmenufont[] = "monospace:size=10"; | 20 | static const char dmenufont[] = "monospace:size=10"; |
| 27 | static const char col_gray1[] = "#222222"; | 21 | static const char col_gray1[] = "#222222"; |
| @@ -29,20 +23,19 @@ static const char col_gray2[] = "#444444"; | |||
| 29 | static const char col_gray3[] = "#bbbbbb"; | 23 | static const char col_gray3[] = "#bbbbbb"; |
| 30 | static const char col_gray4[] = "#eeeeee"; | 24 | static const char col_gray4[] = "#eeeeee"; |
| 31 | static const char col_cyan[] = "#005577"; | 25 | static const char col_cyan[] = "#005577"; |
| 32 | static const char norm_fg[] = "#bfbfbf"; | 26 | static const char norm_fg[] = "#383a42"; |
| 33 | static const char norm_bg[] = "#000001"; | 27 | static const char norm_bg[] = "#e1e3ea"; |
| 34 | static const char norm_border[] = "#3f3f40"; | 28 | static const char norm_border[] = "#3f3f40"; |
| 35 | 29 | ||
| 36 | static const char sel_fg[] = "#bfbfbf"; | 30 | static const char sel_fg[] = "#383a42"; |
| 37 | static const char sel_bg[] = "#5A4A63"; | 31 | static const char sel_bg[] = "#e1e3ea"; |
| 38 | static const char sel_border[] = "#bfbfbf"; | 32 | static const char sel_border[] = "#225588"; |
| 39 | 33 | ||
| 40 | static const char urg_fg[] = "#bfbfbf"; | 34 | static const char urg_fg[] = "#225588"; |
| 41 | static const char urg_bg[] = "#501C61"; | 35 | static const char urg_bg[] = "#e1e3ea"; |
| 42 | static const char urg_border[] = "#501C61"; | 36 | static const char urg_border[] = "#000c18"; |
| 43 | 37 | ||
| 44 | static const char *colors[][3] = { | 38 | static const char *colors[][3] = { |
| 45 | /* fg bg border */ | ||
| 46 | [SchemeNorm] = {norm_fg, norm_bg, norm_border}, // unfocused wins | 39 | [SchemeNorm] = {norm_fg, norm_bg, norm_border}, // unfocused wins |
| 47 | [SchemeSel] = {sel_fg, sel_bg, sel_border}, // the focused win | 40 | [SchemeSel] = {sel_fg, sel_bg, sel_border}, // the focused win |
| 48 | }; | 41 | }; |
| @@ -57,19 +50,16 @@ static const Rule rules[] = { | |||
| 57 | {NULL, NULL, "Event Tester", 0, 0, 0, 1, -1}, /* xev */ | 50 | {NULL, NULL, "Event Tester", 0, 0, 0, 1, -1}, /* xev */ |
| 58 | }; | 51 | }; |
| 59 | 52 | ||
| 60 | /* layout(s) */ | 53 | static const float mfact = 0.50; |
| 61 | static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */ | 54 | static const int nmaster = 1; |
| 62 | static const int nmaster = 1; /* number of clients in master area */ | 55 | static const int resizehints = 0; |
| 63 | static const int resizehints = | 56 | static const int lockfullscreen = 1; |
| 64 | 0; /* 1 means respect size hints in tiled resizals */ | ||
| 65 | static const int lockfullscreen = | ||
| 66 | 1; /* 1 will force focus on the fullscreen window */ | ||
| 67 | 57 | ||
| 68 | static const Layout layouts[] = { | 58 | static const Layout layouts[] = { |
| 69 | /* symbol arrange function */ | 59 | /* symbol arrange function */ |
| 70 | {"[]=", tile}, /* first entry is default */ | 60 | {"[]=", tile}, /* first entry is default */ |
| 71 | {"><>", NULL}, /* no layout function means floating behavior */ | 61 | {"><>", NULL}, /* no layout function means floating behavior */ |
| 72 | {"[M]", monocle}, | 62 | // {"[M]", monocle}, |
| 73 | }; | 63 | }; |
| 74 | 64 | ||
| 75 | /* key definitions */ | 65 | /* key definitions */ |
| @@ -80,40 +70,47 @@ static const Layout layouts[] = { | |||
| 80 | {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \ | 70 | {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \ |
| 81 | {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, | 71 | {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, |
| 82 | 72 | ||
| 83 | /* helper for spawning shell commands in the pre dwm-5.0 fashion */ | ||
| 84 | #define SHCMD(cmd) \ | ||
| 85 | { \ | ||
| 86 | .v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } \ | ||
| 87 | } | ||
| 88 | |||
| 89 | /* commands */ | 73 | /* commands */ |
| 90 | static char dmenumon[2] = | 74 | static char dmenumon[2] = "0"; |
| 91 | "0"; /* component of dmenucmd, manipulated in spawn() */ | 75 | |
| 92 | // static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", | 76 | static const char *dmenucmd[] = {"dmenucmd.sh", NULL}; |
| 93 | // dmenufont, "-nb", norm_bg, "-nf", norm_fg, "-sb", sel_bg, "-sf", sel_fg, NULL | ||
| 94 | // }; | ||
| 95 | static const char *dmenucmd[] = {"dmenu_run", "-m", dmenumon, NULL}; | ||
| 96 | static const char *termcmd[] = {"st", NULL}; | 77 | static const char *termcmd[] = {"st", NULL}; |
| 78 | static const char *screenshotcmd[] = {"screenshotsel.sh", NULL}; | ||
| 97 | 79 | ||
| 98 | static const Key keys[] = { | 80 | static const Key keys[] = { |
| 99 | /* modifier key function argument */ | 81 | /* modifier key function argument */ |
| 100 | {MODKEY, XK_d, spawn, {.v = dmenucmd}}, | 82 | {MODKEY, XK_space, spawn, {.v = dmenucmd}}, |
| 101 | {MODKEY, XK_Return, spawn, {.v = termcmd}}, | 83 | {MODKEY, XK_Return, spawn, {.v = termcmd}}, |
| 84 | {MODKEY | ShiftMask, XK_s, spawn, {.v = screenshotcmd}}, | ||
| 102 | {MODKEY, XK_b, togglebar, {0}}, | 85 | {MODKEY, XK_b, togglebar, {0}}, |
| 103 | {MODKEY, XK_q, killclient, {0}}, | 86 | {MODKEY, XK_q, killclient, {0}}, |
| 104 | {MODKEY, XK_f, togglefullscr, {0}}, | 87 | {MODKEY, XK_f, togglefullscr, {0}}, |
| 105 | {MODKEY, XK_space, setlayout, {0}}, | 88 | {MODKEY, XK_l, setlayout, {0}}, |
| 106 | {MODKEY | ShiftMask, XK_space, togglefloating, {0}}, | 89 | {MODKEY | ShiftMask, XK_space, togglefloating, {0}}, |
| 107 | TAGKEYS(XK_1, 0) TAGKEYS(XK_2, 1) TAGKEYS(XK_3, 2) TAGKEYS(XK_4, 3) | 90 | TAGKEYS(XK_1, 0) TAGKEYS(XK_2, 1) TAGKEYS(XK_3, 2) TAGKEYS(XK_4, 3) |
| 108 | TAGKEYS(XK_5, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7) | 91 | TAGKEYS(XK_5, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7) |
| 109 | TAGKEYS(XK_9, 8){MODKEY | ShiftMask, XK_q, quit, {0}}, | 92 | TAGKEYS(XK_9, 8){MODKEY | ShiftMask, XK_q, quit, {0}}, |
| 110 | { 0, XF86XK_MonBrightnessUp, spawn, {.v = (const char*[]){ "xbacklight", "-inc", "15", NULL } } }, | 93 | {0, |
| 111 | { 0, XF86XK_MonBrightnessDown, spawn, {.v = (const char*[]){ "xbacklight", "-dec", "15", NULL } } }, | 94 | XF86XK_AudioMute, |
| 95 | spawn, | ||
| 96 | {.v = (const char *[]){"wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", | ||
| 97 | "toggle"}}}, | ||
| 98 | {0, | ||
| 99 | XF86XK_AudioMicMute, | ||
| 100 | spawn, | ||
| 101 | {.v = (const char *[]){"wpctl", "set-mute", "54", "toggle"}}}, | ||
| 102 | {0, | ||
| 103 | XF86XK_AudioRaiseVolume, | ||
| 104 | spawn, | ||
| 105 | {.v = (const char *[]){"wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", | ||
| 106 | "10%+"}}}, | ||
| 107 | {0, | ||
| 108 | XF86XK_AudioLowerVolume, | ||
| 109 | spawn, | ||
| 110 | {.v = (const char *[]){"wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", | ||
| 111 | "10%-"}}}, | ||
| 112 | }; | 112 | }; |
| 113 | 113 | ||
| 114 | /* button definitions */ | ||
| 115 | /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, | ||
| 116 | * ClkClientWin, or ClkRootWin */ | ||
| 117 | static const Button buttons[] = { | 114 | static const Button buttons[] = { |
| 118 | /* click event mask button function argument */ | 115 | /* click event mask button function argument */ |
| 119 | {ClkLtSymbol, 0, Button1, setlayout, {0}}, | 116 | {ClkLtSymbol, 0, Button1, setlayout, {0}}, |
