Dwm: Difference between revisions

imported>Hypnosis2839
Creating override: fix instructions to get SRI hash
fix links
 
(5 intermediate revisions by one other user not shown)
Line 4: Line 4:
== Installation ==
== Installation ==


Enable <code>dwm</dwm> in your system configuration:
Enable <code>dwm</code> in your system configuration:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 10: Line 10:
</syntaxhighlight>
</syntaxhighlight>


 
== Creating an override ==
== Creating override ==
=== Patching dwm ===


To patch dwm, override <code>services.xserver.windowManager.dwm.package</code> as below:
To patch dwm, override <code>services.xserver.windowManager.dwm.package</code> as below:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.xserver.windowManager.dwm.package = pkgs.dwm.overrideAttrs (oldAttrs: rec {
services.xserver.windowManager.dwm.package = pkgs.dwm.override {
   patches = [
   patches = [
     # for local patch files, replace with relative path to patch file
     # for local patch files, replace with relative path to patch file
Line 29: Line 29:
     })
     })
   ];
   ];
})
};
</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">
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:
* 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://nixos.wiki/wiki/St st]
* [[St]]
 
* [https://tools.suckless.org/dmenu/ DMenu]
[https://tools.suckless.org/dmenu/ DMenu]


[[Category:Window managers]]
[[Category:Window managers]]
[[Category:Applications]]
[[Category:Applications]]