Dwm: Difference between revisions
imported>Sikmir m Fix typos |
fix links |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<code>dwm</code> is a window manager made by the suckless team | <code>dwm</code> is a window manager made by the suckless team. | ||
== Installation == | == Installation == | ||
Enable <code>dwm</code> in your system configuration: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
Line 10: | Line 10: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Creating an override == | |||
=== Patching dwm === | |||
To patch dwm, override <code>services.xserver.windowManager.dwm.package</code> as below: | |||
To | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
services.xserver.windowManager.dwm.package = pkgs.dwm.override { | |||
patches = [ | |||
# for local patch files, replace with relative path to patch file | |||
# ... | ./path/to/local.patch | ||
}); | # for external patches | ||
(pkgs.fetchpatch { | |||
# replace with actual URL | |||
url = "https://dwm.suckless.org/patches/path/to/patch.diff"; | |||
# replace hash with the value from `nix-prefetch-url "https://dwm.suckless.org/patches/path/to/patch.diff" | xargs nix hash to-sri --type sha256` | |||
# or just leave it blank, rebuild, and use the hash value from the error | |||
hash = ""; | |||
}) | |||
]; | |||
}; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== | === Using custom sources === | ||
If you have a locally stored source tree for dwm with changes already applied, you can use that instead: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
services.xserver.windowManager.dwm.package = pkgs.dwm.overrideAttrs { | |||
src = ./path/to/dwm/source/tree; | |||
}; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Alternatively, you can set <code>src</code> to [https://nixos.org/manual/nixpkgs/stable/#chap-pkgs-fetchers the output of a fetcher], if you have the source tree stored online. | |||
== | == Troubleshooting == | ||
If your change does not appear to take effect: | |||
If | |||
* You must '''not''' have <code>dwm</code> listed anywhere in your <code>environment.systemPackages</code> or <code>home.packages</code>. | |||
* Remove any packages installed via <code>nix-env</code> or <code>nix profile</code>. | |||
* After rebuilding and switching, reboot and check again. | |||
== See also == | == See also == | ||
[https:// | * [[St]] | ||
* [https://tools.suckless.org/dmenu/ DMenu] | |||
[[Category:Window managers]] | [[Category:Window managers]] | ||
[[Category:Applications]] | [[Category:Applications]] |
Latest revision as of 13:28, 1 April 2024
dwm
is a window manager made by the suckless team.
Installation
Enable dwm
in your system configuration:
services.xserver.windowManager.dwm.enable = true;
Creating an override
Patching dwm
To patch dwm, override services.xserver.windowManager.dwm.package
as below:
services.xserver.windowManager.dwm.package = pkgs.dwm.override {
patches = [
# for local patch files, replace with relative path to patch file
./path/to/local.patch
# for external patches
(pkgs.fetchpatch {
# replace with actual URL
url = "https://dwm.suckless.org/patches/path/to/patch.diff";
# replace hash with the value from `nix-prefetch-url "https://dwm.suckless.org/patches/path/to/patch.diff" | xargs nix hash to-sri --type sha256`
# or just leave it blank, rebuild, and use the hash value from the error
hash = "";
})
];
};
Using custom sources
If you have a locally stored source tree for dwm with changes already applied, you can use that instead:
services.xserver.windowManager.dwm.package = pkgs.dwm.overrideAttrs {
src = ./path/to/dwm/source/tree;
};
Alternatively, you can set src
to the output of a fetcher, if you have the source tree stored online.
Troubleshooting
If your change does not appear to take effect:
- You must not have
dwm
listed anywhere in yourenvironment.systemPackages
orhome.packages
. - Remove any packages installed via
nix-env
ornix profile
. - After rebuilding and switching, reboot and check again.