1 { config, lib, pkgs, ... }:
6 cfg = config.services.xserver.windowManager.bspwm;
11 services.xserver.windowManager.bspwm = {
12 enable = mkEnableOption (lib.mdDoc "bspwm");
17 defaultText = literalExpression "pkgs.bspwm";
18 example = literalExpression "pkgs.bspwm-unstable";
19 description = lib.mdDoc ''
23 configFile = mkOption {
24 type = with types; nullOr path;
25 example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/bspwmrc"'';
27 description = lib.mdDoc ''
28 Path to the bspwm configuration file.
29 If null, $HOME/.config/bspwm/bspwmrc will be used.
37 defaultText = literalExpression "pkgs.sxhkd";
38 example = literalExpression "pkgs.sxhkd-unstable";
39 description = lib.mdDoc ''
43 configFile = mkOption {
44 type = with types; nullOr path;
45 example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/sxhkdrc"'';
47 description = lib.mdDoc ''
48 Path to the sxhkd configuration file.
49 If null, $HOME/.config/sxhkd/sxhkdrc will be used.
56 config = mkIf cfg.enable {
57 services.xserver.windowManager.session = singleton {
60 export _JAVA_AWT_WM_NONREPARENTING=1
61 SXHKD_SHELL=/bin/sh ${cfg.sxhkd.package}/bin/sxhkd ${optionalString (cfg.sxhkd.configFile != null) "-c \"${cfg.sxhkd.configFile}\""} &
62 ${cfg.package}/bin/bspwm ${optionalString (cfg.configFile != null) "-c \"${cfg.configFile}\""} &
66 environment.systemPackages = [ cfg.package ];
70 (mkRemovedOptionModule [ "services" "xserver" "windowManager" "bspwm-unstable" "enable" ]
71 "Use services.xserver.windowManager.bspwm.enable and set services.xserver.windowManager.bspwm.package to pkgs.bspwm-unstable to use the unstable version of bspwm.")
72 (mkRemovedOptionModule [ "services" "xserver" "windowManager" "bspwm" "startThroughSession" ]
73 "bspwm package does not provide bspwm-session anymore.")
74 (mkRemovedOptionModule [ "services" "xserver" "windowManager" "bspwm" "sessionScript" ]
75 "bspwm package does not provide bspwm-session anymore.")