run nixfmt
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.gnome.extensions;
|
||||
in
|
||||
@@ -10,18 +15,52 @@ in
|
||||
type = package;
|
||||
default = pkgs.gnomeExtensions.paperwm;
|
||||
};
|
||||
cycle-height-steps = lib.mkOption { type = listOf numbers.nonnegative; default = [ 0.33 0.5 0.67 1.0 ]; };
|
||||
cycle-width-steps = lib.mkOption { type = listOf numbers.nonnegative; default = [ 0.33 0.5 0.67 1.0 ]; };
|
||||
horizontal-margin = lib.mkOption { type = ints.unsigned; default = 5; };
|
||||
vertical-margin = lib.mkOption { type = ints.unsigned; default = 5; };
|
||||
window-gap = lib.mkOption { type = ints.unsigned; default = 5; };
|
||||
cycle-height-steps = lib.mkOption {
|
||||
type = listOf numbers.nonnegative;
|
||||
default = [
|
||||
0.33
|
||||
0.5
|
||||
0.67
|
||||
1.0
|
||||
];
|
||||
};
|
||||
cycle-width-steps = lib.mkOption {
|
||||
type = listOf numbers.nonnegative;
|
||||
default = [
|
||||
0.33
|
||||
0.5
|
||||
0.67
|
||||
1.0
|
||||
];
|
||||
};
|
||||
horizontal-margin = lib.mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 5;
|
||||
};
|
||||
vertical-margin = lib.mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 5;
|
||||
};
|
||||
window-gap = lib.mkOption {
|
||||
type = ints.unsigned;
|
||||
default = 5;
|
||||
};
|
||||
winprops = lib.mkOption {
|
||||
type = listOf (submodule {
|
||||
options = {
|
||||
wm_class = lib.mkOption { type = str; default = ""; };
|
||||
title = lib.mkOption { type = str; default = ""; };
|
||||
wm_class = lib.mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
};
|
||||
title = lib.mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
};
|
||||
scratch_layer = lib.mkEnableOption { };
|
||||
preferredWidth = lib.mkOption { type = nullOr str; default = null; };
|
||||
preferredWidth = lib.mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
});
|
||||
default = [ ];
|
||||
@@ -36,13 +75,23 @@ in
|
||||
config = lib.mkIf cfg.paperwm.enable {
|
||||
home.packages = [ cfg.paperwm.package ];
|
||||
dconf.settings = {
|
||||
"org/gnome/shell".enabled-extensions =
|
||||
lib.mkIf cfg.paperwm.enable [ cfg.paperwm.package.extensionUuid ];
|
||||
"org/gnome/shell/extensions/paperwm" = with cfg.paperwm; lib.mkIf cfg.paperwm.enable {
|
||||
inherit cycle-height-steps cycle-width-steps horizontal-margin vertical-margin window-gap;
|
||||
winprops = map (props: builtins.toJSON props) winprops;
|
||||
};
|
||||
"org/gnome/shell/extensions/paperwm/keybindings" = lib.mkIf cfg.paperwm.enable cfg.paperwm.keybindings;
|
||||
"org/gnome/shell".enabled-extensions = lib.mkIf cfg.paperwm.enable [
|
||||
cfg.paperwm.package.extensionUuid
|
||||
];
|
||||
"org/gnome/shell/extensions/paperwm" =
|
||||
with cfg.paperwm;
|
||||
lib.mkIf cfg.paperwm.enable {
|
||||
inherit
|
||||
cycle-height-steps
|
||||
cycle-width-steps
|
||||
horizontal-margin
|
||||
vertical-margin
|
||||
window-gap
|
||||
;
|
||||
winprops = map (props: builtins.toJSON props) winprops;
|
||||
};
|
||||
"org/gnome/shell/extensions/paperwm/keybindings" =
|
||||
lib.mkIf cfg.paperwm.enable cfg.paperwm.keybindings;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user