require("toggleterm").setup({ direction = "horizontal", open_mapping = [[]], hide_numbers = true, -- shell = 'fish', }) vim.keymap.set('n', [[]], [[ToggleTerm direction=float]], { desc = "Toggle terminal in floating window" }) vim.keymap.set('n', [[]], [[ToggleTerm direction=horizontal]], { desc = "Toggle terminal in horizontal bottom window" }) -- tmux muscle-memory for fullscreening nvim window -- replaced with true-zen.nvim -- vim.keymap.set('n', [[z]], [[ToggleTermToggleAll]]) -- vim.keymap.set('t', [[z]], [[tab split]]) vim.keymap.set('t', '', [[]], { desc = "Escape terminal mode" }) vim.keymap.set('t', '', [[wincmd h]], { desc = "Move focus down one window" }) vim.keymap.set('t', '', [[wincmd k]], { desc = "Move focus up one window" }) vim.keymap.set('t', '', [[wincmd h]], { desc = "Move focus left one window" }) vim.keymap.set('t', '', [[wincmd l]], { desc = "Move focus right one window" }) -- vim.keymap.set('n', '', [[ToggleTerm]], { noremap = true, silent = true }) -- vim.keymap.set('t', '', [[ToggleTerm]], { noremap = true, silent = true }) -- Custom gitui terminal local Terminal = require('toggleterm.terminal').Terminal local gitui = Terminal:new({ cmd = 'gitui', direction = 'float', float_opts = { border = "curved", width = function() return math.ceil(vim.o.columns * 0.8) end, height = function() return math.ceil(vim.o.lines * 0.8) end, winblend = 3, }, hidden = true, }) function _gitui_toggle() gitui:toggle() end vim.keymap.set('n', 'G', 'lua _gitui_toggle()', { noremap = true, silent = true, desc = "Toggle gitui floating terminal" }) -- Custom clx commandline hacker news terminal local clx = Terminal:new({ cmd = 'clx', direction = 'float', float_opts = { border = "curved", width = function() return math.ceil(vim.o.columns * 0.8) end, height = function() return math.ceil(vim.o.lines * 0.8) end, winblend = 3, }, hidden = true, }) function _clx_toggle() clx:toggle() end vim.keymap.set('n', 'H', 'lua _clx_toggle()', { noremap = true, silent = true, desc = "Toggle clx (console HackerNews) floating terminal" })