Remove "src/config.h"
This commit is contained in:
parent
1bdb389916
commit
c2f9dfc992
4 changed files with 74 additions and 88 deletions
2
Makefile
2
Makefile
|
@ -43,7 +43,7 @@ MAIN_SRC = $(MODULES_SRC) src/main.c
|
|||
|
||||
MODULES_HDR = $(MODULES_SRC:.c=.h)
|
||||
DWM_HDR = $(DWM_SRC:.c=.h)
|
||||
MAIN_HDR = $(MODULES_HDR) src/main.h src/config.def.h
|
||||
MAIN_HDR = $(MODULES_HDR) src/main.h
|
||||
|
||||
MODULES_OBJ = $(MODULES_SRC:.c=.o)
|
||||
TEST_OBJ = $(TEST_SRC:.c=.o)
|
||||
|
|
|
@ -105,9 +105,6 @@ Toggles focused window between floating and tiled state.
|
|||
.TP
|
||||
.B Mod1\-Button3
|
||||
Resize focused window while dragging. Tiled windows will be toggled to the floating state.
|
||||
.SH CUSTOMIZATION
|
||||
PolytreeWM is customized by creating a custom config.h and (re)compiling the
|
||||
source code. This keeps it fast, secure and simple.
|
||||
.SH SEE ALSO
|
||||
.BR rofi (1)
|
||||
.SH ISSUES
|
||||
|
|
83
src/config.h
83
src/config.h
|
@ -1,83 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
/* appearance */
|
||||
|
||||
static const char *fonts[] = { "monospace:size=10" };
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
static const char col_gray4[] = "#eeeeee";
|
||||
static const char col_cyan[] = "#005577";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_cyan, "#d9b01c" },
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
|
||||
static const Layout layouts[] = {
|
||||
/* symbol function, arrange function */
|
||||
{ layouts_symbol_monocle, monocle }, /* first entry is default */
|
||||
{ layouts_symbol_floating, NULL }, /* no layout function means floating behavior */
|
||||
{ layouts_symbol_tile, tile },
|
||||
{ layouts_symbol_horizontile, horizontile },
|
||||
{ layouts_symbol_centeredmaster, centeredmaster },
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
|
||||
#define MODKEY Mod4Mask
|
||||
|
||||
static Key keys[] = {
|
||||
// WM
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {0} },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_r, dorestart, {0} },
|
||||
// Monitor
|
||||
{ MODKEY, XK_bracketleft, focusmon, {.i = -1 } },
|
||||
{ MODKEY, XK_bracketright, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_bracketleft, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_bracketright, tagmon, {.i = +1 } },
|
||||
// Layout
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[0]} }, // Monocle
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, // Floating
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[2]} }, // Tile
|
||||
{ MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[3]} }, // Horizontile
|
||||
{ MODKEY, XK_u, setlayout, {.v = &layouts[4]} }, // Centeredmaster
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_i, resetnmaster, {.i = 1 } },
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_d, resetnmaster, {.i = 0 } },
|
||||
// Stack
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
||||
{ MODKEY, XK_Return, zoom, {0} },
|
||||
// Window
|
||||
{ MODKEY|ShiftMask, XK_x, killclient, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
// Appearance
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY|Mod1Mask, XK_b, configborder, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_b, configborder, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask, XK_g, configgap, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_g, configgap, {.i = +1 } },
|
||||
// Starting applications
|
||||
{ MODKEY, XK_z, spawn, {.v = "lock" } },
|
||||
{ MODKEY, XK_slash, spawn, {.v = "menu" } },
|
||||
{ MODKEY|ShiftMask, XK_slash, spawn, {.v = "term" } },
|
||||
{ MODKEY|ShiftMask, XK_f, spawn, {.v = "firefox" } },
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
/* click can be ClkClientWin, or ClkRootWin */
|
||||
|
||||
static Button buttons[] = {
|
||||
/* click event mask button function argument */
|
||||
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
||||
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||
};
|
74
src/dwm.c
74
src/dwm.c
|
@ -254,7 +254,79 @@ static void (*handler[LASTEvent])(XEvent*) = {
|
|||
* configuration, allows nested code to access above variables *
|
||||
***************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
static const char *fonts[] = { "monospace:size=10" };
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
static const char col_gray4[] = "#eeeeee";
|
||||
static const char col_cyan[] = "#005577";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_cyan, "#d9b01c" },
|
||||
};
|
||||
|
||||
static const Layout layouts[] = {
|
||||
/* symbol function, arrange function */
|
||||
{ layouts_symbol_monocle, monocle }, /* first entry is default */
|
||||
{ layouts_symbol_floating, NULL }, /* no layout function means floating behavior */
|
||||
{ layouts_symbol_tile, tile },
|
||||
{ layouts_symbol_horizontile, horizontile },
|
||||
{ layouts_symbol_centeredmaster, centeredmaster },
|
||||
};
|
||||
|
||||
#define MODKEY Mod4Mask
|
||||
|
||||
static Key keys[] = {
|
||||
// WM
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {0} },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_r, dorestart, {0} },
|
||||
// Monitor
|
||||
{ MODKEY, XK_bracketleft, focusmon, {.i = -1 } },
|
||||
{ MODKEY, XK_bracketright, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_bracketleft, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_bracketright, tagmon, {.i = +1 } },
|
||||
// Layout
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[0]} }, // Monocle
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, // Floating
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[2]} }, // Tile
|
||||
{ MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[3]} }, // Horizontile
|
||||
{ MODKEY, XK_u, setlayout, {.v = &layouts[4]} }, // Centeredmaster
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_i, resetnmaster, {.i = 1 } },
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_d, resetnmaster, {.i = 0 } },
|
||||
// Stack
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
||||
{ MODKEY, XK_Return, zoom, {0} },
|
||||
// Window
|
||||
{ MODKEY|ShiftMask, XK_x, killclient, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
// Appearance
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY|Mod1Mask, XK_b, configborder, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_b, configborder, {.i = +1 } },
|
||||
{ MODKEY|Mod1Mask, XK_g, configgap, {.i = -1 } },
|
||||
{ MODKEY|Mod1Mask|ShiftMask, XK_g, configgap, {.i = +1 } },
|
||||
// Starting applications
|
||||
{ MODKEY, XK_z, spawn, {.v = "lock" } },
|
||||
{ MODKEY, XK_slash, spawn, {.v = "menu" } },
|
||||
{ MODKEY|ShiftMask, XK_slash, spawn, {.v = "term" } },
|
||||
{ MODKEY|ShiftMask, XK_f, spawn, {.v = "firefox" } },
|
||||
};
|
||||
|
||||
// click can be ClkClientWin, or ClkRootWin
|
||||
static Button buttons[] = {
|
||||
/* click event mask button function argument */
|
||||
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
||||
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||
};
|
||||
|
||||
/************************************
|
||||
* Private function implementations *
|
||||
|
|
Loading…
Reference in a new issue