term: favor foot over toggleterm

This commit is contained in:
Tigor Hutasuhut 2024-08-14 23:12:33 +07:00
parent 0321fa4d2b
commit 9d925637e8
2 changed files with 19 additions and 1 deletions

View file

@ -9,6 +9,23 @@ vim.keymap.set("t", "<c-d>", "<C-\\><C-n>", { silent = true, desc = "Exit Termin
vim.keymap.set( vim.keymap.set(
"n", "n",
"<leader>z", "<leader>z",
"<cmd>silent !wezterm start --class lazygit --cwd . -- lazygit<cr>", function()
local cwd = vim.fn.expand "%:p:h"
vim.system {
"hyprctl",
"dispatch",
"exec",
"--",
"foot",
"--app-id=lazygit",
"--title=lazygit",
"--working-directory=" .. cwd,
"--",
"lazygit",
}
end,
-- [[<cmd>silent !foot --app-id=lazygit --working-directory=. -- lazygit<cr>]],
{ desc = "Open Lazygit" } { desc = "Open Lazygit" }
) )
vim.keymap.set("n", "<F5>", [[<cmd>silent !footclient --no-wait<cr>]], { desc = "Open New terminal" })

View file

@ -1,4 +1,5 @@
return { return {
enabled = false,
"akinsho/toggleterm.nvim", "akinsho/toggleterm.nvim",
keys = { keys = {
{ "<F5>", "Open Toggleterm" }, { "<F5>", "Open Toggleterm" },