- C 92.9%
- Nix 3.3%
- Roff 2%
- Makefile 1.8%
My configuration of dwl
This configuration includes a lot of patches (found in the patches folder) and my configurations for some of my computers.
dwl
Patches included:
- alwayscenter
- attachbottom
- autostart (0.8)
- bar
- bar-systray (0.7)
- bartruecenteredtitle
- drm_lease
- fakefullscreenclient
- focusdir
- follow
- gaps
- gestures
- lock-size
- mouse-trackpad-split (0.7)
- movestack
- pointer-gestures-unstable
- regexrules
- rotate-clients
- shiftview
- smartborders
- sticky
- swallow
- unclutter
A lot of the patches have been modified to be compatible with each other. The patch files included are the original ones. Some other things have been modified as well, for a complete changelog, take a look at the commits.
Nixos
A flake is included in this repository that outputs a package and a module.
Module
This overrides the default nixos module, so you need to disable it. To use this in your configuration add it to your flake and then import it in your configuration:
# flake.nix
{
inputs = {
...
dwl = {
url = "git+ssh://git@codeberg.org/osmo1/dwl.git";
inputs.nixpkgs.follows = "nixpkgs";
};
};
...
}
# configuration.nix
{
inputs,
lib,
...
}:
{
...
disabledModules = [
"${inputs.nixpkgs}/nixos/modules/programs/wayland/dwl.nix"
];
imports = [
inputs.dwl.nixosModules.default
];
programs.dwl = {
enable = true;
package = (
inputs.dwl.packages.${pkgs.system}.dwl {
configH = ./config.h;
}
);
extraSessionCommands = "${lib.getExe pkgs.foot}";
statusCommand = "${lib.getExe pkgs.slstatus} -s";
};
...
}
Package
The outputed package includes a configH attribute (like in nixpkgs) which can be overriden:
inputs.dwl.packages.${pkgs.system}.dwl {
configH = ./config.h
}
or if you want mine:
inputs.dwl.packages.${pkgs.system}.dwl {
configH = pkgs.runCommand "config-masiina.h" { } ''
cp -L ${inputs.dwl}/config.masiina.h $out
'';
}
configH expects either a string or a path, if the value is a string, it gets put into the config.h file, if the value is a path, it gets copied to be the config.h. Unfortunately this makes it kinda hard to reference files in the flake from outside it. It isn't pretty but it works.
Building and testing
To build using the flake, run
$ nix build .#dwl --keep-failed
the result will be in the result folder, and if the build failed a temporary folder with the derivated files should be mentioned at the top of the logs.