mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
kitty: add option mouseBindings (#8111)
This commit is contained in:
parent
0fe68257a9
commit
50a5766d51
6 changed files with 35 additions and 1 deletions
|
|
@ -42,6 +42,10 @@ let
|
|||
mkKeyValue = key: command: "map ${key} ${command}";
|
||||
};
|
||||
|
||||
toKittyMouseBindings = lib.generators.toKeyValue {
|
||||
mkKeyValue = key: command: "mouse_map ${key} ${command}";
|
||||
};
|
||||
|
||||
toKittyActionAliases = lib.generators.toKeyValue {
|
||||
mkKeyValue = alias_name: action: "action_alias ${alias_name} ${action}";
|
||||
};
|
||||
|
|
@ -199,6 +203,18 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
mouseBindings = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
description = "Mapping of mouse bindings to actions.";
|
||||
example = literalExpression ''
|
||||
{
|
||||
"ctrl+left click" = "ungrabbed mouse_handle_click selection link prompt";
|
||||
"left click" = "ungrabbed no-op";
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
environment = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
|
|
@ -316,7 +332,8 @@ in
|
|||
(mkOrder 540 (toKittyConfig cfg.settings))
|
||||
(mkOrder 550 (toKittyActionAliases cfg.actionAliases))
|
||||
(mkOrder 560 (toKittyKeybindings cfg.keybindings))
|
||||
(mkOrder 570 (toKittyEnv cfg.environment))
|
||||
(mkOrder 570 (toKittyMouseBindings cfg.mouseBindings))
|
||||
(mkOrder 580 (toKittyEnv cfg.environment))
|
||||
];
|
||||
|
||||
xdg.configFile."kitty/kitty.conf" = {
|
||||
|
|
|
|||
|
|
@ -19,5 +19,8 @@ action_alias launch_window launch --cwd=current --type=os-window
|
|||
map ctrl+c copy_or_interrupt
|
||||
map ctrl+f>2 set_font_size 20
|
||||
|
||||
mouse_map ctrl+left click ungrabbed mouse_handle_click selection link prompt
|
||||
mouse_map left click ungrabbed no-op
|
||||
|
||||
env LS_COLORS=1
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@
|
|||
"ctrl+f>2" = "set_font_size 20";
|
||||
};
|
||||
|
||||
mouseBindings = {
|
||||
"ctrl+left click" = "ungrabbed mouse_handle_click selection link prompt";
|
||||
"left click" = "ungrabbed no-op";
|
||||
};
|
||||
|
||||
actionAliases = {
|
||||
"launch_tab" = "launch --cwd=current --type=tab";
|
||||
"launch_window" = "launch --cwd=current --type=os-window";
|
||||
|
|
|
|||
|
|
@ -17,5 +17,8 @@ action_alias launch_window launch --cwd=current --type=os-window
|
|||
map ctrl+c copy_or_interrupt
|
||||
map ctrl+f>2 set_font_size 20
|
||||
|
||||
mouse_map ctrl+left click ungrabbed mouse_handle_click selection link prompt
|
||||
mouse_map left click ungrabbed no-op
|
||||
|
||||
env LS_COLORS=1
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@
|
|||
"ctrl+f>2" = "set_font_size 20";
|
||||
};
|
||||
|
||||
mouseBindings = {
|
||||
"ctrl+left click" = "ungrabbed mouse_handle_click selection link prompt";
|
||||
"left click" = "ungrabbed no-op";
|
||||
};
|
||||
|
||||
actionAliases = {
|
||||
"launch_tab" = "launch --cwd=current --type=tab";
|
||||
"launch_window" = "launch --cwd=current --type=os-window";
|
||||
|
|
|
|||
|
|
@ -4,3 +4,4 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue