1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-02 21:13:33 +02:00

bspwm: add missing rule setting rectangle (#2974)

Also add a `freeformType` so that we don't have to do this in the
future.
This commit is contained in:
Naïm Camille Favier 2022-07-07 05:36:20 +02:00 committed by GitHub
parent f2445620d1
commit face4094d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View File

@ -4,7 +4,11 @@ with lib;
let let
primitive = with types; oneOf [ bool int float str ];
rule = types.submodule { rule = types.submodule {
freeformType = with types; attrsOf primitive;
options = { options = {
monitor = mkOption { monitor = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
@ -139,6 +143,14 @@ let
description = "Whether the node should have border."; description = "Whether the node should have border.";
example = true; example = true;
}; };
rectangle = mkOption {
type = types.nullOr types.str;
default = null;
description =
"The node's geometry, in the format <literal>WxH+X+Y</literal>.";
example = "800x600+32+32";
};
}; };
}; };
@ -155,9 +167,7 @@ in {
}; };
settings = mkOption { settings = mkOption {
type = with types; type = with types; attrsOf (either primitive (listOf primitive));
let primitive = either bool (either int (either float str));
in attrsOf (either primitive (listOf primitive));
default = { }; default = { };
description = "General settings given to <literal>bspc config</literal>."; description = "General settings given to <literal>bspc config</literal>.";
example = { example = {

View File

@ -9,7 +9,7 @@ bspc config 'ignore_ewmh_fullscreen' 'enter,exit'
bspc config 'split_ratio' '0.520000' bspc config 'split_ratio' '0.520000'
bspc rule -r '*' bspc rule -r '*'
bspc rule -a '*' 'center=off' 'desktop=d'\''esk top#next' 'split_dir=north' 'sticky=on' bspc rule -a '*' 'center=off' 'desktop=d'\''esk top#next' 'split_dir=north' 'sticky=on' 'unknown_rule=42'
# java gui fixes # java gui fixes
export _JAVA_AWT_WM_NONREPARENTING=1 export _JAVA_AWT_WM_NONREPARENTING=1

View File

@ -22,6 +22,7 @@ with lib;
desktop = "d'esk top#next"; desktop = "d'esk top#next";
splitDir = "north"; splitDir = "north";
border = null; border = null;
unknownRule = 42;
}; };
extraConfig = '' extraConfig = ''
extra config extra config