diff --git a/dwm/README.md b/dwm/README.md index 1079bd7..0ddf510 100755 --- a/dwm/README.md +++ b/dwm/README.md @@ -1,36 +1,28 @@ # My dwm (Dynamic Window Manager) build ![Screenshot of my desktop](https://gitlab.com/dwt1/dotfiles/raw/master/.screenshots/dotfiles04.png) -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 -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 | | :--- | :--- | -| `MODKEY + Keypad Insert` | opens run launcher (dmenu is the run launcher but can be easily changed) | -| `MODKEY + Enter` | opens terminal (st is the terminal but can be easily changed) | +| `MODKEY + RETURN` | opens terminal (alacritty 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 + 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 + 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 + k` | rotate stack -1 (rotates the windows in the stack) | -| `MODKEY + h` | setmfact -0.05 (decreases window width) | -| `MODKEY + l` | setmfact +0.05 (increases window width) | -| `MODKEY + ,` | focusmon -1 (switches focus between monitors) | -| `MODKEY + .` | focusmon +1 (switches focus between 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). +| `MODKEY + h` | setmfact -0.05 (expands size of window) | +| `MODKEY + l` | setmfact +0.05 (shrinks size of window) | +| `MODKEY + .` | focusmon +1 (switches focus next monitors) | +| `MODKEY + ,` | focusmon -1 (switches focus to prev monitors) | Afterwards enter the following command to build and install dwm (if necessary as root): diff --git a/dwm/config.h b/dwm/config.h index 29da4a9..5f65253 100755 --- a/dwm/config.h +++ b/dwm/config.h @@ -8,7 +8,7 @@ /* appearance */ static const unsigned int borderpx = 2; /* border pixel of windows */ 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 topbar = 1; /* 0 means bottom bar */ 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 dmenufont[] = "Mononoki Nerd Font:size=9"; 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_gray4[] = "#d7d7d7"; 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[] = { /* modifier key function argument */ + { MODKEY|ShiftMask, XK_Return, spawn, {.v = dmenucmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } }, @@ -93,7 +94,7 @@ static Key keys[] = { { MODKEY, XK_d, incnmaster, {.i = -1 } }, { MODKEY, XK_h, 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|ShiftMask, XK_c, killclient, {0} }, @@ -117,7 +118,6 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, /* 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_m, spawn, CMD("./.dmenu/dmenu-sysmon.sh") }, { Mod1Mask|ControlMask, XK_p, spawn, CMD("passmenu") }, diff --git a/dwm/dwm.c b/dwm/dwm.c index 3945c1f..b49b919 100755 --- a/dwm/dwm.c +++ b/dwm/dwm.c @@ -1397,15 +1397,8 @@ resizeclient(Client *c, int x, int y, int w, int h) if (c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) { 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 { gapoffset = gappx; gapincr = 2 * gappx; - } } c->oldx = c->x; c->x = wc.x = x + gapoffset;