mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-30 11:34:14 +00:00
add clang-format'ing
This commit is contained in:
parent
c69a2bec3f
commit
032bf3e951
11
.clang-format
Normal file
11
.clang-format
Normal file
@ -0,0 +1,11 @@
|
||||
BasedOnStyle: GNU
|
||||
UseTab: AlignWithSpaces
|
||||
IndentWidth: 4
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
BreakBeforeBraces: Linux
|
||||
IndentCaseLabels: false
|
||||
ColumnLimit: 100
|
||||
AlignConsecutiveStyle: Consecutive
|
||||
AlignTrailingComments:
|
||||
Kind: Always
|
||||
OverEmptyLines: 2
|
||||
52
config.def.h
52
config.def.h
@ -1,11 +1,13 @@
|
||||
/* appearance */
|
||||
static const int sloppyfocus = 1; /* focus follows mouse */
|
||||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle
|
||||
tracking even if it's surface isn't visible */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const float rootcolor[] = { 0.3, 0.3, 0.3, 1.0 };
|
||||
static const float bordercolor[] = { 0.5, 0.5, 0.5, 1.0 };
|
||||
static const float focuscolor[] = { 1.0, 0.0, 0.0, 1.0 };
|
||||
/* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */
|
||||
/* To conform the xdg-protocol, set the alpha to zero to restore the old
|
||||
* behavior */
|
||||
static const float fullscreen_bg[] = { 0.1, 0.1, 0.1, 1.0 };
|
||||
|
||||
/* tagging */
|
||||
@ -31,7 +33,8 @@ static const Layout layouts[] = {
|
||||
static const MonitorRule monrules[] = {
|
||||
/* name mfact nmaster scale layout rotate/reflect x y */
|
||||
/* example of a HiDPI laptop monitor:
|
||||
{ "eDP-1", 0.5, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL -1, -1 },
|
||||
{ "eDP-1", 0.5, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL
|
||||
-1, -1 },
|
||||
*/
|
||||
/* defaults */
|
||||
{ NULL, 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||
@ -95,13 +98,23 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
|
||||
#define MODKEY WLR_MODIFIER_ALT
|
||||
|
||||
#define TAGKEYS(KEY, SKEY, TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|WLR_MODIFIER_CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY, KEY, view, { .ui = 1 << TAG } }, { MODKEY | WLR_MODIFIER_CTRL, KEY, toggleview, { .ui = 1 << TAG } }, \
|
||||
{ MODKEY | WLR_MODIFIER_SHIFT, SKEY, tag, { .ui = 1 << TAG } }, \
|
||||
{ MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT,SKEY,toggletag, {.ui = 1 << TAG} }
|
||||
{ \
|
||||
MODKEY | WLR_MODIFIER_CTRL | WLR_MODIFIER_SHIFT, SKEY, toggletag, \
|
||||
{ \
|
||||
.ui = 1 << TAG \
|
||||
} \
|
||||
}
|
||||
|
||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
#define SHCMD(cmd) \
|
||||
{ \
|
||||
.v = (const char *[]) \
|
||||
{ \
|
||||
"/bin/sh", "-c", cmd, NULL \
|
||||
} \
|
||||
}
|
||||
|
||||
/* commands */
|
||||
static const char *termcmd[] = { "foot", NULL };
|
||||
@ -109,7 +122,8 @@ static const char *menucmd[] = { "bemenu-run", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
||||
/* modifier key function argument */
|
||||
/* modifier key function argument
|
||||
*/
|
||||
{ MODKEY, XKB_KEY_p, spawn, { .v = menucmd } },
|
||||
{ MODKEY | WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, { .v = termcmd } },
|
||||
{ MODKEY, XKB_KEY_j, focusstack, { .i = +1 } },
|
||||
@ -146,9 +160,25 @@ static const Key keys[] = {
|
||||
|
||||
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
||||
{ WLR_MODIFIER_CTRL | WLR_MODIFIER_ALT, XKB_KEY_Terminate_Server, quit, { 0 } },
|
||||
#define CHVT(n) { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_XF86Switch_VT_##n, chvt, {.ui = (n)} }
|
||||
CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),
|
||||
CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
|
||||
#define CHVT(n) \
|
||||
{ \
|
||||
WLR_MODIFIER_CTRL | WLR_MODIFIER_ALT, XKB_KEY_XF86Switch_VT_##n, chvt, \
|
||||
{ \
|
||||
.ui = (n) \
|
||||
} \
|
||||
}
|
||||
CHVT (1),
|
||||
CHVT (2),
|
||||
CHVT (3),
|
||||
CHVT (4),
|
||||
CHVT (5),
|
||||
CHVT (6),
|
||||
CHVT (7),
|
||||
CHVT (8),
|
||||
CHVT (9),
|
||||
CHVT (10),
|
||||
CHVT (11),
|
||||
CHVT (12),
|
||||
};
|
||||
|
||||
static const Button buttons[] = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user