aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/display-server/x11/xinit/default.nix
blob: d2a59f7532f3b0a53c8a9392ae94fbf88eb24c36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, config, pkgs, ... }:

{
	options.desktop.display-server.x11.xinit = {
		enable = lib.mkEnableOption "Enables xinit.";
	};

	config = lib.mkIf config.desktop.display-server.x11.xinit.enable {
		home.file.".xinitrc" = {
			executable = true;
			source = pkgs.writeText ".xinitrc"
''
#!/bin/sh
xsetroot -solid "${config.scheme.withHashtag.base00}"
${if config.desktop.display-server.compositor.picom.enable then
	"picom &"
else ""}
${if config.tools.viewer.feh.enable then
	"feh --bg-scale ${../../../../../assets/skeleton-mage.png}"
else ""}
${if config.desktop.status-bar.polybar.enable then
	config.desktop.status-bar.polybar.command
else ""}
${if config.desktop.window-manager.sxhkd.enable then "sxhkd &" else ""}
exec ${config.desktop.window-manager.default}
'';
		};
	};
}