项目作者: gonzafernan

项目描述 :
My dwm build!
高级语言: C
项目地址: git://github.com/gonzafernan/dwm.git
创建时间: 2020-04-06T06:57:12Z
项目社区:https://github.com/gonzafernan/dwm

开源协议:MIT License

下载


dwm - dynamic window manager

dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. All of the layouts can be applied dynamically, optimising the environment for the application in use and the task performed.

Preview

Requirements

Patches

autostart

This patch will make dwm run ~/.dwm/autostart_blocking.sh and ~/.dwm/autostart.sh & before entering the handler loop. One or both of these files can be ommited.

In this build, those scripts are in the scripts folder.

systray

A simple system tray implementation. Multi-monitor is also supported. The tray is following the selected monitor.

systray fails when is patched with alpha. To fix this, in the dwm.c file, I needed to change the following line in the void updatesystray(void) function:

  1. - XFillRectangle(dpy, systray->win, drw->gc, 0, 0, w, bh);
  2. + XFillRectangle(dpy, systray->win, XCreateGC(dpy, root, 0 , NULL), 0, 0, w, bh);

You can see this better in this commit. I could fix this thanks to this post in reddit.

xrdb

Allows dwm to read colors from xrdb (.Xresources) at run time.

This patch also presents problems with alpha patch, but it’s really easy to solve. The conflict is with the function Clr *drw_scm_create(Drw *drw, char *clrnames[], const unsigned int alphas[], size_t clrcount), that xrdb uses and, as you see, the alpha patch added a parameter alphas. When you try to build you’ll get an error in the following line in the void xrdb(const Arg *arg) function:

  1. - scheme[i] = drw_scm_create(drw, colors[i], 3);
  2. + scheme[i] = drw_scm_create(drw, colors[i], alphas[i], 3);

With that change it works.

activetagindicatorbar

This patch changes the rectangle indicating if a tag is used by a client into a bar above the tag name.

The only problem is that you need to use a font which leaves enough space between the text of the tag name and the top of the bar. I wanted to use Hack font, so I fix this editing the following line in the dwm.c file:

  1. - bh = drw->fonts->h + 2;
  2. + bh = drw->fonts->h + 10;

That increase the statusbar height a lot, but I didn’t want to apply the statuspadding patch.

Trying to contribute

" class="reference-link">xbacklight

This patch was developed by myself and I sent it to suckless.org. It’s really simple: Adds keys to control monitor backlight using xbackligh. See Backlight in the ArchWiki.

Requirements

  • xbacklight

Configuration

Change the following line in your config file:

  1. static char xbacklight_perc[2] = "5";

The xbacklight_perc variable gives the value in percentage of brightness you increment or decrement every time you press the monitor brightness key (default to 5).

Why I removed xbacklight patch from my build?

When I proposed the patch, Greg Minshall told me that he handles shortcuts like monitor backlight and volume outside dwm, using xbindkeys. After thinking about it, I convinced myself that it’s a better choice. In any case, the patch is available to anyone who doesn’t have the same opinion.

License


dwm