summaryrefslogtreecommitdiff
path: root/README.md
blob: 435340349f439b28547d90f7e2b38c156d7a3af3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
My dwm
---
A Dynamic Window Manager

dwm is an extremely fast, small, and dynamic window manager for X.
It is written with the [suckless philosophy][15]
in mind and is objectively one of the best window managers out there.

## What my build has to offer
I have patched dwm extensively using official  patches but also with the
awesome patches [Floris Laporte][16] makes for his own build to
make the experience more enjoyable. Here are the following patches which I
installed:

- [dwm-activetagindicatorbar-6.2][1]
- [dwm-alpha-20180613-b69c870][2]
- [dwm-bar-height-6.2][3]
- [dwm-centeredmaster-6.1][4]
- [dwm-dwmc-6.2][5]
- [dwm-focusmaster][6]
- [dwm-fullscreen][7]
- [dwm-gaplessgrid-20160731-56a31dc][8]
- [dwm-libxft-bgra][9]
- [dwm-movestack-6.1][10]
- [dwm-rotatestack-20161021-ab9571b][11]
- [dwm-statuscmd-signal-6.2][21]
- [dwm-tilegap][12]
- [dwm-zoomswap-6.2][13]
- [flaport-center][14]
- [flaport-mastermon][14]
- [flaport-swallow][14]

So that's a nice list... But what does it actually mean?  Here are the main
points that make my build stand out.

**Decentralized keybindings:**

So if I have a piece of software that does one thing and does it well, why
would I use anything else. I personally use the *Simple X Hotkey Daemon*
([SXHKD][17]) to manage all my keybindings and dwm should be no exception.
That's why I use the [dwmc][5] patch to allow sxhkd to control dwm.

For this reason, I highly recommend you take a look at my [dotfiles][18]
repository as it contains my current configuration for sxhkd. **This build
of dwm is basically unusable until you have sxhkd setup for it.** This also
means sxhkd should be launched along dwm inside your `.xinitrc`. As a bonus,
if you install this build of dwm with my dotfiles using [archer][19], you
can press `super + alt + shift + h` to view a procedurally generated pdf of
all my keybindings.

**Window swallowing:**

This is a feature which allows terminals to "transform" themselves into the
software they are launching (essentially saving screen real estate). For
example: If I were to open a video inside mpv from my terminal, the terminal
window would disapear and where it once was, mpv would appear.

**Aesthetics:**

I love transparency and that's why I added the [alpha][2] patch to my build.
While I was at it, I switched the standard corner square bar indicator for a
centered rectangle on each tag using the [activetagindicatorbar][1] patch.
Most fonts don't play well with it so I added the [bar-height][3] patch to make
the bar taller. I don't like to have gaps everywhere, but I don't dislike them
either. Therefore, I only added them to the tiling layout (which is where they
make the most sense).

**Emoji Compatibility:**

Some Suckless software have a frustrating tendency of crashing when
encountering color emoji. This got fixed with the [libxft-bgra][9] patch.  I'm
not the greatest fan of emojis (I personally prefer the fontawesome fonts for
icons), but in the unlikely event that one makes it's way to my statusbar, it
will not crash.

**dwmblocks compatibility:**

I personnally have a personal build of [dwmblocks][20] which is capable of
handling click events. For that to work, I had to add the
[statuscmd-signal][21] patch.

**Accessible stack navigation and manipulation:**

I don't want to spend half an hour placing a window where I want in in the
stack. I need a suite of functions aiding me to do certain motions
either to position windows or navigate through them:

- [Rotatestack][11]: Rotate the entire stack (clockwise/couterclockwise).
- [Movestack][10]: Move the current window up or down the stack.
- [FocusMaster][6]: Focus the master window (the last spawned window).
- [ZoomSwap][13]: Swap the master window with the currently focused one.

**Diverse but consise tiling modes:**

I'm not a fan of having so many tiling modes I need a patch just to switch
through all of them. I only included those I found usefull on a day to day
basis. The following schematics will showcase these (1 being the newest
spawned window):

```
                           Tile (Regular):
┌───────────────────────────────┐┌────────────────────────────────┐
│ 1                             ││ 2                              │
│                               ││                                │
│                               │└────────────────────────────────┘
│                               │┌────────────────────────────────┐
│                               ││ 3                              │
│                               ││                                │
│                               │└────────────────────────────────┘
│                               │┌────────────────────────────────┐
│                               ││ 4                              │
│                               ││                                │
│                               │└────────────────────────────────┘
│                               │┌────────────────────────────────┐
│                               ││ 5                              │
│                               ││                                │
│                               │└────────────────────────────────┘
│                               │┌────────────────────────────────┐
│                               ││ 6                              │
│                               ││                                │
└───────────────────────────────┘└────────────────────────────────┘

                          Centered Master:
┌───────────────┐┌───────────────────────────────┐┌───────────────┐
│ 3             ││ 1                             ││ 2             │
│               ││                               ││               │
└───────────────┘│                               │└───────────────┘
┌───────────────┐│                               │┌───────────────┐
│ 5             ││                               ││ 4             │
│               ││                               ││               │
└───────────────┘│                               │└───────────────┘
┌───────────────┐│                               │┌───────────────┐
│ 7             ││                               ││ 6             │
│               ││                               ││               │
└───────────────┘│                               │└───────────────┘
┌───────────────┐│                               │┌───────────────┐
│ 9             ││                               ││ 8             │
│               ││                               ││               │
└───────────────┘│                               │└───────────────┘
┌───────────────┐│                               │┌───────────────┐
│ 11            ││                               ││ 10            │
│               ││                               ││               │
└───────────────┘└───────────────────────────────┘└───────────────┘

                     Floating Centered Master:
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 2             ││ 3             ││ 4             ││ 5             │
│               ││               ││               ││               │
│             ┌──────────────────────────────────────┐             │
│             │ 1                                    │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             │                                      │             │
│             └──────────────────────────────────────┘             │
│               ││               ││               ││               │
│               ││               ││               ││               │
│               ││               ││               ││               │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘

                           Gappless Grid:
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 1             ││ 5             ││ 9             ││ 13            │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 2             ││ 6             ││ 10            ││ 14            │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 3             ││ 7             ││ 11            ││ 15            │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘
┌───────────────┐┌───────────────┐┌───────────────┐┌───────────────┐
│ 4             ││ 8             ││ 12            ││ 16            │
│               ││               ││               ││               │
│               ││               ││               ││               │
└───────────────┘└───────────────┘└───────────────┘└───────────────┘

```
There are 3 more layout which don't require drawings:
- Fullscreen
- Monocle: Windows are stacked one over the over in "fullscreen"
  (the statusbar remains).
- Floating: Windows don't respond to any tiling function and simply
  spawn in the top left corner (they remain in place coming from
	another tiling function).

## 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
necessary as root):
```
    make clean install
```

## Running dwm
Add the following line to your .xinitrc to start dwm using startx:
```
    exec dwm
```

## Configuration
The configuration of dwm is done by creating a custom config.h
and (re)compiling the source code.


[1]:  https://dwm.suckless.org/patches/activetagindicatorbar/
[2]:  https://dwm.suckless.org/patches/alpha/
[3]:  https://dwm.suckless.org/patches/bar_height/
[4]:  https://dwm.suckless.org/patches/centeredmaster/
[5]:  https://dwm.suckless.org/patches/dwmc/
[6]:  https://dwm.suckless.org/patches/focusmaster/
[7]:  https://dwm.suckless.org/patches/fullscreen/
[8]:  https://dwm.suckless.org/patches/gaplessgrid/
[9]:  https://youtu.be/f9qNXV01yzg
[10]: https://dwm.suckless.org/patches/movestack/
[11]: https://dwm.suckless.org/patches/rotatestack/
[12]: https://dwm.suckless.org/patches/tilegap/
[13]: https://dwm.suckless.org/patches/zoomswap/
[14]: https://github.com/flaport/dwm
[15]: https://suckless.org/philosophy/
[16]: https://github.com/flaport
[17]: https://github.com/baskerville/sxhkd
[18]: https://git.chausse.xyz/dotfiles/
[19]: https://git.chausse.xyz/archer/
[20]: https://git.chausse.xyz/dwmblocks/
[21]: https://dwm.suckless.org/patches/statuscmd/