Return to repo list


Gentoo-friendly patches for Suckless's dmenu.
Return to

README (6268B)

      1 suckless-gf-dmenu - Gentoo-Friendly Patches for Suckless's dmenu
      3 == What Is This? ==
      5     This repository contains a host of patches that can be applied to dmenu, the dynamic menu for X from These
      6 patches have been modified to work with Gentoo's dmenu package, and are specifically compatible with the 'savedconfig' USE flag. Each
      7 patch in this repository has its own directory. Each of these directories contains the actual patch file itself (ending in '.patch',
      8 for Portage compatibility reasons), and a file called USAGE that informs the user of any manual changes that should or might be
      9 applied in order to use the patch. Be sure to read USAGE carefully before applying the patch, and follow the instructions therein!
     11     This project exists because of a problem with the default way that Suckless programs work in a Gentoo environment. Gentoo's
     12 package manager, Portage, offers a built-in utility for patching programs, and this utility works nicely with the patches for dmenu
     13 that can be found on Additionally, since Portage is a source-based package manager, it also offers a utility for 
     14 editing config.h files in Suckless programs by using the 'savedconfig' USE flag. This USE flag, when enabled, will create a directory 
     15 in /etc/portage/savedconfig that contains a header file (this file is located in /etc/portage/savedconfig/x11-misc/ in dmenu's case).
     16 This header file can be edited just like the one that you would edit if you were working with a git repository or other copy of the
     17 dmenu code directly. Edits made to this file are applied as a diff to config.def.h at emerge time, thus providing a very simple and
     18 convenient way of incorporating Suckless's recommended modification methodology in a Portage-friendly fashion. There is a problem
     19 with this, however; because of the way that Portage patches programs as part of ebuilds, most of the time any patches that make
     20 changes to config.def.h themselves will be totally incompatible with a custom savedconfig header file, and emerge will fail if you
     21 try to apply such a patch while 'savedconfig' is enabled. The solution to this dilemma is to modify the patches in such a way as to
     22 make them never make any changes to config.def.h, and thus make them compatible with 'savedconfig' and friendly to Gentoo. Any
     23 changes that the patch originally tried to make to config.def.h could either be applied manually to the savedconfig header file by
     24 the user, or potentially included in another file as part of the patching process, depending on what the changes do.
     26     A side-goal of this repository is to make each target patch (see below) support the current stable version of x11-terms/dmenu as
     27 offered by Gentoo tree (currently dmenu version 0.8.4). Many of the patches suckless-gf-dmenu targets are not themselves considered to be
     28 compatible with this modern version of dmenu, but the project intends to fix any compatibilty issues that the target patches have with 
     29 the unmodified current dmenu codebase and thus make them work. This could potentially result in substantial changes coming to individual 
     30 patches, or perhaps the total rewrite of patches altogether. Compatibility changes will be noted in individual patches' USAGE files.
     32     These patches are ALL compatible with Portage and savedconfig. Effort has also been taken to ensure the patches are themselves
     33 cross-compatible; that is, that they do not conflict with each other. Despite this effort, lack of conflict between patches is not 
     34 guaranteed at this time. If any specific patches are known to be incompatible with each other, the conflict will be noted inside the 
     35 patches' USAGE files. Normally, this should serve to document most incompatiblities, but in the case of the user applying a great many 
     36 patches all at once, it is possible that novel conflicts may occur. Be aware of this should you try to emerge with a huge number of 
     37 patches!
     39 == Target Patches ==
     41     suckless-gf-dmenu targets the patches located at the following locations:
     43         (1).
     45     CURRENT PROGRESS: 18/32 patches supported
     46                       3/32 patches unsupported
     49         (1). fuzzyhighlight -
     50              |- Targets 4.9, Gentoo stable x11-misc/dmenu is version 4.8 currently. Work is being done on this patch + fuzzymatch below.
     51         (2). fuzzymatch -
     52              |- Makes changes to that I have yet to successfully integrate with the default ebuild.
     53         (3). json -
     54              |- Makes changes to, plus has an external dependency (jansson). This one may need a custom ebuild to fix.
     58 == NoDoc Patches ==
     60     Among the most common causes of conflict between different dmenu patches is documentation changes. A great many patches make changes
     61 to the file 'dmenu.1', which defines the dmenu man page, and/or to the 'usage()' function in 'dmenu.c'. Both of these changes are only ever
     62 made for documentation purposes, and do not affect the actual functionality added by any given patch. Because so many differenct patches 
     63 make changes to these places, they will often conflict. These conflicts are trivial to resolve, but in the interest of making the patches 
     64 in suckless-gf-dmenu more robust and "just-work-y", any patch that makes changes to either 'dmenu.1' or 'usage()' in 'dmenu.c' will have a
     65 second version available, called 'xyz-nodoc.patch' (where 'xyz' is the patch name), that removes any documentation changes. These 'nodoc'
     66 patches are functionally the same as their regular counterparts, but they should avoid common conflicts with other patches that also
     67 change the documentation.
     69 == License ==
     71     suckless-gf-dmenu is released under the MIT/X Consortium License, the same license that dmenu itself is under:
     72     (
     74     See the LICENSE file for details.
     76 == Maintainer ==
     78     suckless-gf-dmenu is maintained by Erik Letson <>. Please direct any questions or patches to that email.