dwm/patches/personnal_config.diff

355 lines
13 KiB
Diff

From 0ea912d5a5808003b572d4d9bc08f985bf1ab7ae Mon Sep 17 00:00:00 2001
From: David JULIEN <swytch@mailo.com>
Date: Sat, 23 Apr 2022 15:57:35 +0200
Subject: [PATCH] feat: personnal config
---
Makefile | 2 +-
config.def.h | 96 +++++++++++++++++++++++++++-------------------------
dwm.1 | 78 +++++++++++++++++++++---------------------
3 files changed, 89 insertions(+), 87 deletions(-)
diff --git a/Makefile b/Makefile
index 77bcbc0..c05dbdd 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ dwm: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
clean:
- rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
+ rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz config.h
dist: clean
mkdir -p dwm-${VERSION}
diff --git a/config.def.h b/config.def.h
index 5b00ea3..7aaece5 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,14 +1,15 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
-static unsigned int borderpx = 1; /* border pixel of windows */
-static unsigned int gappx = 5; /* gaps between windows */
-static unsigned int snap = 32; /* snap pixel */
-static int swallowfloating = 0; /* 1 means swallow floating windows by default */
-static int showbar = 1; /* 0 means no bar */
-static int topbar = 1; /* 0 means bottom bar */
-static char font[] = "monospace:size=10";
-static char dmenufont[] = "monospace:size=10";
+static unsigned int borderpx = 1; /* border pixel of windows */
+static unsigned int gappx = 5; /* gaps between windows */
+static unsigned int snap = 32; /* snap pixel */
+static int swallowfloating = 0; /* 1 means swallow floating windows by default */
+static int showbar = 1; /* 0 means no bar */
+static int topbar = 1; /* 0 means bottom bar */
+static char font[] = "monospace:size=10";
+static char symbols[] = "monospace:size=10";
+static char dmenufont[] = "monospace:size=10";
static const char *fonts[] = { font };
static char normbgcolor[] = "#222222";
static char normbordercolor[] = "#444444";
@@ -31,10 +32,11 @@ static const Rule rules[] = {
* WM_NAME(STRING) = title
*/
/* class instance title tags mask iscentered isfloating isterminal noswallow monitor */
- { "Gimp", NULL, NULL, 0, 0, 1, 0, 0, -1 },
- { "Firefox", NULL, NULL, 1 << 8, 0, 0, 0, -1, -1 },
- { "St", NULL, NULL, 0, 0, 0, 1, 0, -1 },
- { NULL, NULL, "Event Tester", 0, 0, 0, 0, 1, -1 }, /* xev */
+// { "Gimp", NULL, NULL, 0, 0, 1, 0, 0, -1 },
+// { "Firefox", NULL, NULL, 1 << 8, 0, 0, 0, -1, -1 },
+ { "St", NULL, NULL, 0, 0, 0, 1, -1, -1 },
+ { "floating",NULL, NULL, 0, 1, 1, 1, -1, -1 },
+ { NULL, NULL, "Event Tester", 0, 0, 1, 0, 1, -1 }, /* xev */
};
/* layout(s) */
@@ -51,7 +53,7 @@ static const Layout layouts[] = {
};
/* key definitions */
-#define MODKEY Mod1Mask
+#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
@@ -63,7 +65,7 @@ static const Layout layouts[] = {
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
-static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
+static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-p", "run:", NULL };
static const char *termcmd[] = { "st", NULL };
/*
@@ -71,59 +73,61 @@ static const char *termcmd[] = { "st", NULL };
*/
ResourcePref resources[] = {
{ "font", STRING, &font },
+ { "symbols", STRING, &symbols },
{ "dmenufont", STRING, &dmenufont },
- { "normbgcolor", STRING, &normbgcolor },
- { "normbordercolor", STRING, &normbordercolor },
- { "normfgcolor", STRING, &normfgcolor },
- { "selbgcolor", STRING, &selbgcolor },
- { "selbordercolor", STRING, &selbordercolor },
- { "selfgcolor", STRING, &selfgcolor },
+ { "background", STRING, &normbgcolor },
+ { "background", STRING, &normbordercolor },
+ { "normforeground", STRING, &normfgcolor },
+ { "selbackground", STRING, &selbgcolor },
+ { "color2", STRING, &selbordercolor },
+ { "selforeground", STRING, &selfgcolor },
{ "borderpx", INTEGER, &borderpx },
- { "snap", INTEGER, &snap },
- { "showbar", INTEGER, &showbar },
- { "topbar", INTEGER, &topbar },
- { "nmaster", INTEGER, &nmaster },
- { "resizehints", INTEGER, &resizehints },
- { "mfact", FLOAT, &mfact },
+ { "gappx", INTEGER, &gappx },
+ { "snap", INTEGER, &snap },
+ { "showbar", INTEGER, &showbar },
+ { "topbar", INTEGER, &topbar },
+ { "nmaster", INTEGER, &nmaster },
+ { "resizehints", INTEGER, &resizehints },
+ { "mfact", FLOAT, &mfact },
};
static Key keys[] = {
/* modifier key function argument */
- { MODKEY, XK_p, spawn, {.v = dmenucmd } },
- { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
+ // { MODKEY, XK_p, spawn, {.v = dmenucmd } },
+ // { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
- { MODKEY, XK_i, incnmaster, {.i = +1 } },
- { MODKEY, XK_d, incnmaster, {.i = -1 } },
+ { MODKEY, XK_o, incnmaster, {.i = +1 } },
+ { MODKEY, XK_i, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
- { MODKEY, XK_Return, zoom, {0} },
+ { MODKEY, XK_space, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
- { MODKEY|ShiftMask, XK_c, killclient, {0} },
+ { MODKEY, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
- { MODKEY, XK_space, setlayout, {0} },
+ // { MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
- { MODKEY, XK_0, view, {.ui = ~0 } },
- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
+ { MODKEY, XK_agrave, view, {.ui = ~0 } },
+ { MODKEY|ShiftMask, XK_agrave, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
- { MODKEY, XK_minus, setgaps, {.i = -1 } },
- { MODKEY, XK_equal, setgaps, {.i = +1 } },
+ { MODKEY, XK_less, setgaps, {.i = -1 } },
+ { MODKEY|ShiftMask, XK_less, setgaps, {.i = +1 } },
{ MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } },
- TAGKEYS( XK_1, 0)
- TAGKEYS( XK_2, 1)
- TAGKEYS( XK_3, 2)
- TAGKEYS( XK_4, 3)
- TAGKEYS( XK_5, 4)
- TAGKEYS( XK_6, 5)
- TAGKEYS( XK_7, 6)
- TAGKEYS( XK_8, 7)
- TAGKEYS( XK_9, 8)
+ TAGKEYS( XK_ampersand, 0)
+ TAGKEYS( XK_eacute, 1)
+ TAGKEYS( XK_quotedbl, 2)
+ TAGKEYS( XK_apostrophe, 3)
+ TAGKEYS( XK_parenleft, 4)
+ TAGKEYS( XK_minus, 5)
+ TAGKEYS( XK_egrave, 6)
+ TAGKEYS( XK_underscore, 7)
+ TAGKEYS( XK_ccedilla, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
diff --git a/dwm.1 b/dwm.1
index 85b3438..230bf30 100644
--- a/dwm.1
+++ b/dwm.1
@@ -25,9 +25,7 @@ layout, the title of the focused window, and the text read from the root window
name property, if the screen is focused. A floating window is indicated with an
empty square and a maximised floating window is indicated with a filled square
before the windows title. The selected tags are indicated with a different
-color. The tags of the focused window are indicated with a filled square in the
-top left corner. The tags which are applied to one or more windows are
-indicated with an empty square in the top left corner.
+color.
.P
dwm draws a small border around windows to indicate the focus state.
.SH OPTIONS
@@ -49,118 +47,118 @@ label toggles between tiled and floating layout.
.B Button3
click on a tag label adds/removes all windows with that tag to/from the view.
.TP
-.B Mod1\-Button1
+.B Mod4\-Button1
click on a tag label applies that tag to the focused window.
.TP
-.B Mod1\-Button3
+.B Mod4\-Button3
click on a tag label adds/removes that tag to/from the focused window.
.SS Keyboard commands
.TP
-.B Mod1\-Shift\-Return
+.B Mod4\-Shift\-Return
Start
.BR st(1).
.TP
-.B Mod1\-p
+.B Mod4\-d
Spawn
.BR dmenu(1)
for launching other programs.
.TP
-.B Mod1\-,
+.B Mod4\-,
Focus previous screen, if any.
.TP
-.B Mod1\-.
+.B Mod4\-.
Focus next screen, if any.
.TP
-.B Mod1\-Shift\-,
+.B Mod4\-Shift\-,
Send focused window to previous screen, if any.
.TP
-.B Mod1\-Shift\-.
+.B Mod4\-Shift\-.
Send focused window to next screen, if any.
.TP
-.B Mod1\-b
+.B Mod4\-b
Toggles bar on and off.
.TP
-.B Mod1\-t
+.B Mod4\-t
Sets tiled layout.
.TP
-.B Mod1\-f
+.B Mod4\-f
Sets floating layout.
.TP
-.B Mod1\-m
+.B Mod4\-m
Sets monocle layout.
.TP
-.B Mod1\-space
-Toggles between current and previous layout.
+.\" .B Mod4\-space
+.\" Toggles between current and previous layout.
.TP
-.B Mod1\-j
+.B Mod4\-j
Focus next window.
.TP
-.B Mod1\-k
+.B Mod4\-k
Focus previous window.
.TP
-.B Mod1\-i
+.B Mod4\-o
Increase number of windows in master area.
.TP
-.B Mod1\-d
+.B Mod4\-i
Decrease number of windows in master area.
.TP
-.B Mod1\-l
+.B Mod4\-l
Increase master area size.
.TP
-.B Mod1\-h
+.B Mod4\-h
Decrease master area size.
.TP
-.B Mod1\-Return
+.B Mod4\-space
Zooms/cycles focused window to/from master area (tiled layouts only).
.TP
-.B Mod1\-Shift\-c
+.B Mod4\-q
Close focused window.
.TP
-.B Mod1\-Shift\-space
+.B Mod4\-Shift\-space
Toggle focused window between tiled and floating state.
.TP
-.B Mod1\-Tab
+.B Mod4\-Tab
Toggles to the previously selected tags.
.TP
-.B Mod1\-Shift\-[1..n]
+.B Mod4\-Shift\-[1..n]
Apply nth tag to focused window.
.TP
-.B Mod1\-Shift\-0
+.B Mod4\-Shift\-0
Apply all tags to focused window.
.TP
-.B Mod1\-Control\-Shift\-[1..n]
+.B Mod4\-Control\-Shift\-[1..n]
Add/remove nth tag to/from focused window.
.TP
-.B Mod1\-[1..n]
+.B Mod4\-[1..n]
View all windows with nth tag.
.TP
-.B Mod1\-0
+.B Mod4\-0
View all windows with any tag.
.TP
-.B Mod1\-Control\-[1..n]
+.B Mod4\-Control\-[1..n]
Add/remove all windows with nth tag to/from the view.
.TP
-.B Mod1\--
+.B Mod4\-<
Decrease the gaps around windows.
.TP
-.B Mod1\-=
+.B Mod4\->
Increase the gaps around windows.
.TP
-.B Mod1\-Shift-=
+.B Mod4\-Shift-=
Reset the gaps around windows to
.BR 0 .
.TP
-.B Mod1\-Shift\-q
+.B Mod4\-Shift\-q
Quit dwm.
.SS Mouse commands
.TP
-.B Mod1\-Button1
+.B Mod4\-Button1
Move focused window while dragging. Tiled windows will be toggled to the floating state.
.TP
-.B Mod1\-Button2
+.B Mod4\-Button2
Toggles focused window between floating and tiled state.
.TP
-.B Mod1\-Button3
+.B Mod4\-Button3
Resize focused window while dragging. Tiled windows will be toggled to the floating state.
.SH CUSTOMIZATION
dwm is customized by creating a custom config.h and (re)compiling the source
--
2.35.1