mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
add: set title wezterm with current folder name
This commit is contained in:
parent
17a0574662
commit
f23060a0f2
1 changed files with 11 additions and 0 deletions
|
@ -5,3 +5,14 @@ if transparent_mode ~= nil then
|
||||||
vim.cmd("TransparentEnable")
|
vim.cmd("TransparentEnable")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- get folder name from current directory
|
||||||
|
local _get_folder_name = function()
|
||||||
|
local str = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
|
||||||
|
return "My " .. str:lower():gsub("^%l", string.upper)
|
||||||
|
end
|
||||||
|
|
||||||
|
local term_program = vim.fn.getenv("TERM_PROGRAM")
|
||||||
|
if term_program == "WezTerm" then
|
||||||
|
vim.cmd('silent !wezterm cli set-tab-title "' .. _get_folder_name() .. '"')
|
||||||
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue