Skip to content

Commit

Permalink
feat(workspace): Add option to disable pasting with middle click (#387)
Browse files Browse the repository at this point in the history
Co-authored-by: Heitor Augusto <[email protected]>
  • Loading branch information
valeth and HeitorAugustoLN authored Oct 18, 2024
1 parent 9d851ce commit 30d186a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions modules/workspace.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ in
'';
};

enableMiddleClickPaste = lib.mkOption {
type = with lib.types; nullOr bool;
default = null;
example = false;
description = ''
Clicking the middle mouse button pastes clipboard content";
'';
};

tooltipDelay = lib.mkOption {
type = with lib.types; nullOr ints.positive;
default = null;
Expand Down Expand Up @@ -324,8 +333,9 @@ in
lib.mkIf (cfg.workspace.windowDecorations.theme != null) {
"org.kde.kdecoration2".library = cfg.workspace.windowDecorations.library;
"org.kde.kdecoration2".theme = cfg.workspace.windowDecorations.theme;
}
);
}) // (lib.optionalAttrs (cfg.workspace.enableMiddleClickPaste != null) {
Wayland.EnablePrimarySelection = cfg.workspace.enableMiddleClickPaste;
});
}
# We add persistence to some keys in order to not reset the themes on
# each generation when we use overrideConfig.
Expand Down

0 comments on commit 30d186a

Please sign in to comment.