aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/services/xcape.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/modules/services/xcape.nix')
-rw-r--r--home-manager/modules/services/xcape.nix22
1 files changed, 11 insertions, 11 deletions
diff --git a/home-manager/modules/services/xcape.nix b/home-manager/modules/services/xcape.nix
index 26115a93062..f4f77caa331 100644
--- a/home-manager/modules/services/xcape.nix
+++ b/home-manager/modules/services/xcape.nix
@@ -6,9 +6,7 @@ let
cfg = config.services.xcape;
-in
-
-{
+in {
meta.maintainers = [ maintainers.nickhu ];
options = {
@@ -27,8 +25,11 @@ in
mapExpression = mkOption {
type = types.attrsOf types.str;
- default = {};
- example = { Shift_L = "Escape"; Control_L = "Control_L|O"; };
+ default = { };
+ example = {
+ Shift_L = "Escape";
+ Control_L = "Control_L|O";
+ };
description = ''
The value has the grammar <literal>Key[|OtherKey]</literal>.
</para>
@@ -63,14 +64,13 @@ in
Type = "forking";
ExecStart = "${pkgs.xcape}/bin/xcape"
+ optionalString (cfg.timeout != null) " -t ${toString cfg.timeout}"
- + optionalString (cfg.mapExpression != {})
- " -e '${builtins.concatStringsSep ";"
- (attrsets.mapAttrsToList (n: v: "${n}=${v}") cfg.mapExpression)}'";
+ + optionalString (cfg.mapExpression != { }) " -e '${
+ builtins.concatStringsSep ";"
+ (attrsets.mapAttrsToList (n: v: "${n}=${v}") cfg.mapExpression)
+ }'";
};
- Install = {
- WantedBy = [ "graphical-session.target" ];
- };
+ Install = { WantedBy = [ "graphical-session.target" ]; };
};
};
}