Skip to content

Commit 02c0a71

Browse files
committed
1 parent 659e189 commit 02c0a71

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

nixos/modules/services/x11/window-managers/bspwm.nix

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ in
1616
services.xserver.windowManager.bspwm = {
1717
enable = mkEnableOption "bspwm";
1818

19-
package = mkPackageOption pkgs "bspwm" {
20-
example = "bspwm-unstable";
21-
};
19+
package = mkPackageOption pkgs "bspwm" { };
2220
configFile = mkOption {
2321
type = with types; nullOr path;
2422
example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/bspwmrc"'';
@@ -30,9 +28,7 @@ in
3028
};
3129

3230
sxhkd = {
33-
package = mkPackageOption pkgs "sxhkd" {
34-
example = "sxhkd-unstable";
35-
};
31+
package = mkPackageOption pkgs "sxhkd" { };
3632
configFile = mkOption {
3733
type = with types; nullOr path;
3834
example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/sxhkdrc"'';
@@ -52,19 +48,18 @@ in
5248
start = ''
5349
export _JAVA_AWT_WM_NONREPARENTING=1
5450
SXHKD_SHELL=/bin/sh ${cfg.sxhkd.package}/bin/sxhkd ${
55-
optionalString (cfg.sxhkd.configFile != null) "-c \"${cfg.sxhkd.configFile}\""
51+
optionalString (cfg.sxhkd.configFile != null) "-c ${escapeShellArg cfg.sxhkd.configFile}"
52+
} &
53+
${cfg.package}/bin/bspwm ${
54+
optionalString (cfg.configFile != null) "-c ${escapeShellArg cfg.configFile}"
5655
} &
57-
${cfg.package}/bin/bspwm ${optionalString (cfg.configFile != null) "-c \"${cfg.configFile}\""} &
5856
waitPID=$!
5957
'';
6058
};
6159
environment.systemPackages = [ cfg.package ];
6260
};
6361

6462
imports = [
65-
(mkRemovedOptionModule [ "services" "xserver" "windowManager" "bspwm-unstable" "enable" ]
66-
"Use services.xserver.windowManager.bspwm.enable and set services.xserver.windowManager.bspwm.package to pkgs.bspwm-unstable to use the unstable version of bspwm."
67-
)
6863
(mkRemovedOptionModule [
6964
"services"
7065
"xserver"

pkgs/by-name/bs/bspwm/package.nix

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
xcbutil,
88
xcbutilkeysyms,
99
xcbutilwm,
10+
nixosTests,
1011
}:
1112

1213
stdenv.mkDerivation rec {
1314
pname = "bspwm";
14-
version = "0.9.10";
15+
version = "0.9.11";
1516

1617
src = fetchFromGitHub {
1718
owner = "baskerville";
1819
repo = "bspwm";
1920
rev = version;
20-
sha256 = "0qlv7b4c2mmjfd65y100d11x8iqyg5f6lfiws3cgmpjidhdygnxc";
21+
sha256 = "sha256-5mAw3uSsDozGUJdYE1gD1u0u6Xnik3/LbE654vCFU9E=";
2122
};
2223

2324
buildInputs = [
@@ -30,10 +31,17 @@ stdenv.mkDerivation rec {
3031

3132
makeFlags = [ "PREFIX=$(out)" ];
3233

34+
passthru.tests = {
35+
inherit (nixosTests) startx;
36+
};
37+
3338
meta = with lib; {
3439
description = "Tiling window manager based on binary space partitioning";
3540
homepage = "https://github.com/baskerville/bspwm";
36-
maintainers = with maintainers; [ meisternu ];
41+
maintainers = with maintainers; [
42+
meisternu
43+
ncfavier
44+
];
3745
license = licenses.bsd2;
3846
platforms = platforms.linux;
3947
};

0 commit comments

Comments
 (0)