slot.nvim/README.md

54 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# QQdock.nvim
持久化自适应浮动终端管理器。
## 特性
- **持久化** — 同一个终端实例反复 show/hide命令输出不丢
- **自适应方向** — 横屏 → 右侧分屏45%),竖屏 → 下方分屏40%
- **轻量** — 依赖 toggleQQdock.nvimAPI 简洁
## 安装
```lua
{
"newbie/QQdock.nvim",
dependencies = { "akinsho/toggleQQdock.nvim" },
config = function()
require("QQdock").setup()
end,
}
```
## 用法
```lua
local T = require("QQdock")
T.shell() -- 普通 shell
T.open("reasonix") -- Reasonix AI
T.open("lazygit") -- lazygit
```
## 推荐键位
```lua
vim.keymap.set("n", "<c-t>", T.shell)
vim.keymap.set("i", "<c-t>", T.shell)
vim.keymap.set("n", "<C-i>", function() T.open("reasonix") end)
vim.keymap.set("n", "<leader>gg", function() T.open("lazygit") end)
```
## API
| 函数 | 参数 | 作用 |
|------|------|------|
| `T.shell()` | — | 打开/关闭持久 shell |
| `T.open(cmd)` | cmd: string | 打开/关闭指定命令的持久终端 |
## TODO
- [ ] 翻译trans
- [ ] 系统监控btop
- [ ] 文件管理器yazi