📜 ⬆️ ⬇️

DWM - minimalism in action

How it all started


Some time in ancient times, when there were no laptops (I couldn’t afford them), I had a computer at my home - a Pentium of something there, 64Mb of RAM, 2Gb HDD, a display 14 ".
KDE and Gnome stubbornly could not (even if they wanted to) run on such hardware. And I wanted to read the mail and see the weather in the Internet, I also really wanted to read a book. Rummaging in the network, set up IceWM, which worked quite decently on this equipment, started Firefox and mail

This is how my fascination with fast and functional environments began, and not a year goes by that I don’t start something new. Today I want to talk about DWM

In addition to working in DWM, there is little experience with awesome (complex config), xmonad (it's also not easy to set up the first minimum, the default config is quite simple), scrotwm ( don't like the concept of multi-monitor support ). From “fast” environments, I worked with IceWM, Fluxbox for a long time.

Pros DWM - Speed. Reliability. Simplicity.


Having a minimum of binary dependencies and not using anything extraneous, even the absence of a configuration file readable during execution can be a plus: this increases the reliability of the system as a whole.
')
The gain in speed of drawing and launching applications is really determined by eye. There is a feeling that the computer “flies” while on KDE the same computer at best “functions normally”.

As for simplicity, I want to say the following. Perhaps this is extreme - editing the config in config.h, but learning Lua (as in awesome), or haskell (as in xmonad) is also an extreme: trying to build a normal one
config using paste-paste in xmonad and awesome is a long and tedious thing,
learn a new programming language all the more.

In my opinion, of all the minimalist environments, DWM is one of the simplest window managers.
It is a single binary file, without a configuration file and any launch options. Configuration is done by editing the C language include file.

At the same time, the default configuration works immediately:
  1. tiling (modkey + t) and floating (Floating) modes (modkey + f)
  2. in tiling mode - increase / decrease in the number of clients of the master window (modkey + i, modkey + d)
  3. resizing areas (modkey + h, + l)
  4. and other standard features of tiling mededzherov.


T e we have a minimum of the required functionality of the tiling manager.

Custom keys are easy to set up. If it is a call to an external program, you must first define a variable with its call, and then call it. Let's say that I redefined the sound adjustment keys:

 static const char * incr_sound [] = {"amixer", "set", "Master", "2dB +", NULL};
 static const char * decr_sound [] = {"amixer", "set", "Master", "2dB-", NULL};

 ...

 static Key keys [] = {
 ...
	 {0, XF86XK_AudioRaiseVolume, spawn, {.v = incr_sound}},
	 {0, XF86XK_AudioLowerVolume, spawn, {.v = decr_sound}},


For quick launch of programs - I installed dmenu.



 static const char * dmenucmd [] = {"dmenu_run", "-fn", font, "-nb", colors [0] [2], "-nf",
				   colors [0] [1], "-sb", colors [1] [2], "-sf", colors [0] [1], NULL};
 ...
 {Mod1Mask, XK_F2, spawn, {.v = dmenucmd}},


A little about my preferences and requirements for the environment


Working as a programmer involves several essential points in the configuration of the development environment.

In general, of course, you can work in any environment and without changing the basic settings ...
... but then inevitable kilometers of mouse running on the table and often (subconscious) irritation from the boring, multiple performing of the same type of actions.

The topic of intensifying work and improving the functionality of development tools is very broad.
and touches on a lot of aspects and there are millions of possible configurations.

I personally need the following (at least I don’t know how to work
these features):



What is tiling-wm


More details can be found here: en.wikipedia.org/wiki/Tiling_window_manager

For me personally, I will briefly formulate: Tiling is when you don’t have to look for a hidden window when there are a large number of them , or when you don’t have to waste time dragging windows to it. Management of applications and their location on the screen occurs mainly from the keyboard. No need to press Alt + Tab for a long time - all windows are visible.

To amuse you I will tell the recent story about the "visibility of windows".
I worked in KDE ... I have two monica - the one on the laptop and the one on the table.
Working in Skype + Tmux remote session with a colleague, I accidentally somehow did not move the window and then: __ could not find it __!?

I already had this in KDE when moving the window it “fell through” to the neighboring desktop, but I didn’t find one after that!

In general, the situation was strange, we had to interrupt our rally, since we almost discussed everything. And what about the window? It was found. Accidentally ... After ~ 2 hours, I found it in the “invisible” area between the monitors, which was formed by the fact that the monitors are of different sizes and the virtual screen in KDE is rectangular. It rolled shorter in the lower right corner, there is a “dead” zone of 432 pixels in height. Here is such a story.

Moral: this would never have happened in Tiling mode since all windows are visible.

Specificity:

DWM is a minimalistic WM, while providing everything I need for successful and productive work.

  1. 10 pre-configured workspaces using modkey + n buttons
  2. 3 modes - tiling, floating, monocle
  3. full window title
  4. battery charge indication, date + time, sysload
  5. work in tiling mode: opening new windows, sizes of areas, increase / decrease in the number of wizard clients
  6. setting the floating and location for certain applications. gimp as an example.
  7. dmenu - fast dynamic menu
  8. my scripts - display configuration, sleep, set-desktop-wallpaper


For items 1-8, see my video. I deliberately drove the monitor into a mode with a lower resolution so that it could be clearly seen on small monitors:



Cons & Flaws:




findings



Perhaps for many, the DWM will be too minimal for everyday work. But I can recommend one thing - having installed once and adjusting it for yourself, DWM will be a very reliable assistant in situations where KDE or something else refuses to work correctly (the long and dreary package rebuilding in Gentoo is the most vivid example of such force majeure).

External links


Source: https://habr.com/ru/post/136533/


All Articles