home-manager/tests/modules/services/window-managers/bspwm/configuration.nix
Naïm Favier e70524cd2b
bspwm: various improvements (#2095)
* bspwm: various improvements

- fixes shell escaping issues and general style issues
- allow reloading the config on-the-fly by exposing bspwmrc to the user

* bspwm: add configuration test
2021-06-19 18:40:17 -04:00

40 lines
923 B
Nix

{ lib, pkgs, ... }:
with lib;
{
config = {
xsession.windowManager.bspwm = {
enable = true;
monitors.focused =
[ "desktop 1" "d'esk top" ]; # pathological desktop names
settings = {
border_width = 2;
split_ratio = 0.52;
gapless_monocle = true;
external_rules_command = "/path/to/external rules command";
};
rules."*" = {
sticky = true;
center = false;
desktop = "d'esk top#next";
splitDir = "north";
border = null;
};
extraConfig = ''
extra config
'';
startupPrograms = [ "foo" "bar || qux" ];
};
nmt.script = ''
bspwmrc=home-files/.config/bspwm/bspwmrc
assertFileExists "$bspwmrc"
assertFileIsExecutable "$bspwmrc"
assertFileContent "$bspwmrc" ${
pkgs.writeShellScript "bspwmrc-expected" (readFile ./bspwmrc)
}
'';
};
}