diff --git a/plugins/screenkey/default.nix b/plugins/screenkey/default.nix index 9f341a7..0ae5b87 100644 --- a/plugins/screenkey/default.nix +++ b/plugins/screenkey/default.nix @@ -7,4 +7,19 @@ (import ./package.nix { inherit lib pkgs; }) ]; }; + + rootOpts.keymaps = [ + { + mode = "n"; + key = "uk"; + action.__raw = '' + function() + vim.g.screenkey_statusline_component = not vim.g.screenkey_statusline_component + vim.api.nvim_exec_autocmds("User", { pattern = "ScreenkeyToggled" }) + vim.notify(("screenkey %s"):format(vim.g.screenkey_statusline_component and "on" or "off")) + end + ''; + options.desc = "Toggle screenkey"; + } + ]; }