2020-10-01 15:46:04 -07:00
|
|
|
{ options, config, lib, pkgs, ... }:
|
2019-08-06 10:56:54 -07:00
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
with lib;
|
|
|
|
with lib.my;
|
|
|
|
let cfg = config.modules.desktop.bspwm;
|
2021-03-01 17:43:12 -08:00
|
|
|
configDir = config.dotfiles.configDir;
|
2020-10-01 15:46:04 -07:00
|
|
|
in {
|
2020-03-28 22:48:43 -07:00
|
|
|
options.modules.desktop.bspwm = {
|
2020-10-01 15:46:04 -07:00
|
|
|
enable = mkBoolOpt false;
|
2020-03-28 22:48:43 -07:00
|
|
|
};
|
2019-11-26 14:04:14 -08:00
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
config = mkIf cfg.enable {
|
2020-10-26 11:04:52 -07:00
|
|
|
modules.theme.onReload.bspwm = ''
|
|
|
|
${pkgs.bspwm}/bin/bspc wm -r
|
|
|
|
source $XDG_CONFIG_HOME/bspwm/bspwmrc
|
|
|
|
'';
|
2020-10-23 17:54:25 -07:00
|
|
|
|
2020-03-28 22:48:43 -07:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
lightdm
|
|
|
|
dunst
|
|
|
|
libnotify
|
|
|
|
(polybar.override {
|
|
|
|
pulseSupport = true;
|
|
|
|
nlSupport = true;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
services = {
|
2020-04-22 16:53:25 -07:00
|
|
|
picom.enable = true;
|
2020-03-28 22:48:43 -07:00
|
|
|
redshift.enable = true;
|
|
|
|
xserver = {
|
|
|
|
enable = true;
|
2020-10-01 15:46:04 -07:00
|
|
|
displayManager = {
|
|
|
|
defaultSession = "none+bspwm";
|
|
|
|
lightdm.enable = true;
|
|
|
|
lightdm.greeters.mini.enable = true;
|
|
|
|
};
|
2020-04-05 22:54:14 -07:00
|
|
|
windowManager.bspwm.enable = true;
|
2020-03-28 22:48:43 -07:00
|
|
|
};
|
2019-08-06 10:56:54 -07:00
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
systemd.user.services."dunst" = {
|
|
|
|
enable = true;
|
|
|
|
description = "";
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
serviceConfig.Restart = "always";
|
|
|
|
serviceConfig.RestartSec = 2;
|
|
|
|
serviceConfig.ExecStart = "${pkgs.dunst}/bin/dunst";
|
|
|
|
};
|
|
|
|
|
2020-02-09 00:03:58 -08:00
|
|
|
# link recursively so other modules can link files in their folders
|
2020-10-01 15:46:04 -07:00
|
|
|
home.configFile = {
|
|
|
|
"sxhkd".source = "${configDir}/sxhkd";
|
2020-04-05 22:54:14 -07:00
|
|
|
"bspwm" = {
|
2020-10-01 15:46:04 -07:00
|
|
|
source = "${configDir}/bspwm";
|
2020-04-05 22:54:14 -07:00
|
|
|
recursive = true;
|
|
|
|
};
|
2020-01-12 15:17:17 -08:00
|
|
|
};
|
2019-08-06 10:56:54 -07:00
|
|
|
};
|
|
|
|
}
|