aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/default.nix
blob: dbb80879158bcdc79db6f68090775f796bdc0083 (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
{ lib, config, pkgs, ... }:

{
	imports = [
		./bspwm
		./polybar
		./sxhkd
	];

	options.desktop = {
		enable = lib.mkEnableOption "Enables graphical interface.";
	};

	config = lib.mkIf config.desktop.enable {
		xdg.enable = true;
		xsession.enable = true;

		xsession.windowManager.command = lib.mkForce "
#!/bin/sh
${if config.tools.feh.enable then
	"${pkgs.feh}/bin/feh --bg-scale ${../../assets/skeleton-mage.png}"
else "xsetroot -solid \"${config.scheme.withHashtag.base00}\""}
pkill sxhkd
sxhkd &
exec ${pkgs.bspwm}/bin/bspwm
";
	};
}