1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: add some cmp keybinds, remove realtime-stt-server (now in whisper-overlay)

This commit is contained in:
oddlama 2024-06-21 22:07:05 +02:00
parent e1e8997525
commit 9b428f2480
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
6 changed files with 17 additions and 368 deletions

View file

@ -99,10 +99,18 @@
connected-active = "<span foreground='red'></span>";
};
return-type = "json";
exec = "${lib.getExe pkgs.whisper-overlay} waybar-status --address localhost:43007";
#exec = "${lib.getExe pkgs.whisper-overlay} waybar-status";
on-click-middle = lib.getExe (pkgs.writeShellApplication {
name = "restart-whisper-overlay";
runtimeInputs = [];
# FIXME: TODO and use libnotify
text = ''
'';
});
on-click-right = lib.getExe (pkgs.writeShellApplication {
name = "toggle-realtime-stt-server";
runtimeInputs = [];
# FIXME: TODO and use libnotify
text = ''
'';
});

View file

@ -62,7 +62,7 @@
end
if cmp.visible() then
cmp.select_next_item()
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
elseif require("luasnip").expandable() then
require("luasnip").expand()
elseif require("luasnip").expand_or_locally_jumpable() then
@ -80,12 +80,18 @@
"<Up>" =
# lua
''cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), {'i'})'';
"<PageDown>" =
# lua
''cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select, count = -10 }), {'i'})'';
"<PageUp>" =
# lua
''cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select, count = 10 }), {'i'})'';
"<S-Tab>" =
# lua
''
cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else