mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-24 03:50:24 +10:00
Working on dwm README.
This commit is contained in:
@@ -1,36 +1,28 @@
|
|||||||
# My dwm (Dynamic Window Manager) build
|
# My dwm (Dynamic Window Manager) build
|
||||||
|
|
||||||

|

|
||||||
dwm is an extremely fast, small, and dynamic window manager for X.
|
Dwm is an extremely fast, small, and dynamic window manager for X. This is my personal build of dwm. I used a number of patches in this build to make dwm more "sensible" rather than "suckless."
|
||||||
|
|
||||||
# My Keybindings
|
# My Keybindings
|
||||||
|
|
||||||
The MODKEY is set to the `Super` key (aka the `Windows` key)
|
The MODKEY is set to the Super key (aka the Windows key). I try to keep the
|
||||||
|
keybindings consistent with all of my window managers.
|
||||||
|
|
||||||
| Keybinding | Action |
|
| Keybinding | Action |
|
||||||
| :--- | :--- |
|
| :--- | :--- |
|
||||||
| `MODKEY + Keypad Insert` | opens run launcher (dmenu is the run launcher but can be easily changed) |
|
| `MODKEY + RETURN` | opens terminal (alacritty is the terminal but can be easily changed) |
|
||||||
| `MODKEY + Enter` | opens terminal (st is the terminal but can be easily changed) |
|
| `MODKEY + SHIFT + RETURN` | opens run launcher (dmenu is the run launcher but can be easily changed) |
|
||||||
| `MODKEY + SHIFT + c` | closes window with focus |
|
| `MODKEY + SHIFT + c` | closes window with focus |
|
||||||
| `MODKEY + SHIFT + q` | quits dwm |
|
| `MODKEY + SHIFT + r` | restarts dwm |
|
||||||
|
| `MODKEY + SHIFT + q` | quits ddwm |
|
||||||
| `MODKEY + j` | focus stack +1 (switches focus between windows in the stack) |
|
| `MODKEY + j` | focus stack +1 (switches focus between windows in the stack) |
|
||||||
| `MODKEY + k` | focus stack -1 (switches focus between windows in the stack) |
|
| `MODKEY + k` | focus stack -1 (switches focus between windows in the stack) |
|
||||||
| `MODKEY + SHIFT + j` | rotate stack +1 (rotates the windows in the stack) |
|
| `MODKEY + SHIFT + j` | rotate stack +1 (rotates the windows in the stack) |
|
||||||
| `MODKEY + SHIFT + k` | rotate stack -1 (rotates the windows in the stack) |
|
| `MODKEY + SHIFT + k` | rotate stack -1 (rotates the windows in the stack) |
|
||||||
| `MODKEY + h` | setmfact -0.05 (decreases window width) |
|
| `MODKEY + h` | setmfact -0.05 (expands size of window) |
|
||||||
| `MODKEY + l` | setmfact +0.05 (increases window width) |
|
| `MODKEY + l` | setmfact +0.05 (shrinks size of window) |
|
||||||
| `MODKEY + ,` | focusmon -1 (switches focus between monitors) |
|
| `MODKEY + .` | focusmon +1 (switches focus next monitors) |
|
||||||
| `MODKEY + .` | focusmon +1 (switches focus between monitors) |
|
| `MODKEY + ,` | focusmon -1 (switches focus to prev monitors) |
|
||||||
|
|
||||||
# Requirements
|
|
||||||
|
|
||||||
In order to build dwm you need the Xlib header files.
|
|
||||||
|
|
||||||
|
|
||||||
# Installation
|
|
||||||
|
|
||||||
Edit config.mk to match your local setup (dwm is installed into
|
|
||||||
the /usr/local namespace by default).
|
|
||||||
|
|
||||||
Afterwards enter the following command to build and install dwm (if
|
Afterwards enter the following command to build and install dwm (if
|
||||||
necessary as root):
|
necessary as root):
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
/* appearance */
|
/* appearance */
|
||||||
static const unsigned int borderpx = 2; /* border pixel of windows */
|
static const unsigned int borderpx = 2; /* border pixel of windows */
|
||||||
static const unsigned int snap = 32; /* snap pixel */
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
static const unsigned int gappx = 5; /* pixel gap between clients */
|
static const unsigned int gappx = 6; /* pixel gap between clients */
|
||||||
static const int showbar = 1; /* 0 means no bar */
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
static const int horizpadbar = 6; /* horizontal padding for statusbar */
|
static const int horizpadbar = 6; /* horizontal padding for statusbar */
|
||||||
@@ -16,7 +16,7 @@ static const int vertpadbar = 7; /* vertical padding for status
|
|||||||
static const char *fonts[] = { "Mononoki Nerd Font:size=9" };
|
static const char *fonts[] = { "Mononoki Nerd Font:size=9" };
|
||||||
static const char dmenufont[] = "Mononoki Nerd Font:size=9";
|
static const char dmenufont[] = "Mononoki Nerd Font:size=9";
|
||||||
static const char col_gray1[] = "#282a36";
|
static const char col_gray1[] = "#282a36";
|
||||||
static const char col_gray2[] = "#000000"; /* border color unfocused windows */
|
static const char col_gray2[] = "#282a36"; /* border color unfocused windows */
|
||||||
static const char col_gray3[] = "#96b5b4";
|
static const char col_gray3[] = "#96b5b4";
|
||||||
static const char col_gray4[] = "#d7d7d7";
|
static const char col_gray4[] = "#d7d7d7";
|
||||||
static const char col_cyan[] = "#924441"; /* border color focused windows and tags */
|
static const char col_cyan[] = "#924441"; /* border color focused windows and tags */
|
||||||
@@ -83,6 +83,7 @@ static const char *termcmd[] = { "alacritty", NULL };
|
|||||||
|
|
||||||
static Key keys[] = {
|
static Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = dmenucmd } },
|
||||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||||
{ MODKEY, XK_b, togglebar, {0} },
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
|
{ MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
|
||||||
@@ -93,7 +94,7 @@ static Key keys[] = {
|
|||||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||||
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
|
{ MODKEY|ControlMask, XK_Return, zoom, {0} },
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||||
|
|
||||||
@@ -117,7 +118,6 @@ static Key keys[] = {
|
|||||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
|
|
||||||
/* Dmenu scripts launched with ALT + CTRL + KEY */
|
/* Dmenu scripts launched with ALT + CTRL + KEY */
|
||||||
{ Mod1Mask|ControlMask, XK_Return, spawn, {.v = dmenucmd } },
|
|
||||||
{ Mod1Mask|ControlMask, XK_e, spawn, CMD("./.dmenu/dmenu-edit-configs.sh") },
|
{ Mod1Mask|ControlMask, XK_e, spawn, CMD("./.dmenu/dmenu-edit-configs.sh") },
|
||||||
{ Mod1Mask|ControlMask, XK_m, spawn, CMD("./.dmenu/dmenu-sysmon.sh") },
|
{ Mod1Mask|ControlMask, XK_m, spawn, CMD("./.dmenu/dmenu-sysmon.sh") },
|
||||||
{ Mod1Mask|ControlMask, XK_p, spawn, CMD("passmenu") },
|
{ Mod1Mask|ControlMask, XK_p, spawn, CMD("passmenu") },
|
||||||
|
|||||||
@@ -1396,17 +1396,10 @@ resizeclient(Client *c, int x, int y, int w, int h)
|
|||||||
/* Do nothing if layout is floating */
|
/* Do nothing if layout is floating */
|
||||||
if (c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) {
|
if (c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) {
|
||||||
gapincr = gapoffset = 0;
|
gapincr = gapoffset = 0;
|
||||||
} else {
|
|
||||||
/* Remove border and gap if layout is monocle or only one client */
|
|
||||||
if (selmon->lt[selmon->sellt]->arrange == monocle || n == 1) {
|
|
||||||
gapoffset = 0;
|
|
||||||
gapincr = -2 * borderpx;
|
|
||||||
wc.border_width = 0;
|
|
||||||
} else {
|
} else {
|
||||||
gapoffset = gappx;
|
gapoffset = gappx;
|
||||||
gapincr = 2 * gappx;
|
gapincr = 2 * gappx;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
c->oldx = c->x; c->x = wc.x = x + gapoffset;
|
c->oldx = c->x; c->x = wc.x = x + gapoffset;
|
||||||
c->oldy = c->y; c->y = wc.y = y + gapoffset;
|
c->oldy = c->y; c->y = wc.y = y + gapoffset;
|
||||||
|
|||||||
Reference in New Issue
Block a user