热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

wezterm紫色风格配置

如你所见,这是一个紫色风格的配置文件没有加入vi相关的键位配置,因为我用的nvim,而且主要用的windows默认启动的是powershell7(pwsh.exe)加入了wsl相关

如你所见,这是一个紫色风格的配置文件


没有加入vi相关的键位配置,因为我用的nvim,而且主要用的windows

默认启动的是powershell 7(pwsh.exe)

加入了wsl相关的支持(来自官网的配置文件)



图片如下

-- Wezterm configuration
-- powered by aquawius
-- this is version 4
-- version 1: initial config
-- version 2: wsl support
-- version 3: update theme to purple style
-- version 4: fix bug "git log" with "terminal is not fully functional"
-- tracert: term set to "" is not a compatible term for git
local wezterm = require("wezterm")
local cOnfig= {
check_for_updates = false,
-- color_scheme = "Fahrenheit",
-- color_scheme = "Gruvbox Dark",
-- color_scheme = "Blue Matrix",
-- color_scheme = "Pandora",
-- color_scheme = "Grape",
-- color_scheme = "Firewatch",
-- color_scheme = "Duotone Dark",
color_scheme = "Sakura",
-- color_scheme = "lovelace",
enable_scroll_bar = true,
exit_behavior = "Close",
-- tab_bar_at_bottom = true,
inactive_pane_hsb = {
hue = 1.0,
saturation = 1.0,
brightness = 1.0,
},
-- fOnt= wezterm.font(''),
fOnt= wezterm.font_with_fallback({
"Cascadia Code",
"Fira Code",
}),
font_size = 12.0,
default_prog = { 'pwsh' },
-- default_cwd = "/some/path",
launch_menu = {
},
leader = { key = "b", mods = "CTRL" },
set_environment_variables = {},
-- Tab bar appearance
colors = {
tab_bar = {
-- The color of the strip that goes along the top of the window
background = "#282828",
-- The active tab is the one that has focus in the window
active_tab = {
-- The color of the background area for the tab
bg_color = "#18131e",
-- The color of the text for the tab
fg_color = "#ff65fd",
intensity = "Normal",
underline = "None",
italic = false,
strikethrough = false,
},
-- Inactive tabs are the tabs that do not have focus
inactive_tab = {
bg_color = "#282828",
fg_color = "#d19afc",
},
inactive_tab_hover = {
bg_color = "#202020",
fg_color = "#ff65fd",
},
new_tab = {
bg_color = "#282828",
fg_color = "#d19afc",
},
new_tab_hover = {
bg_color = "#18131e",
fg_color = "#ff65fd",
},
},
},
}
if wezterm.target_triple == "x86_64-pc-windows-msvc" then
-- config.term = "" -- Set to empty so FZF works on windows
-- config.term = "xterm" -- fix bug in command "git log" with "terminal is not fully functional" or delete this term = "xxxx" (using default term value)
table.insert(config.launch_menu, { label = "PowerShell 5", args = { "powershell.exe", "-NoLogo" } })
table.insert(config.launch_menu, { label = "PowerShell 7", args = { "pwsh.exe", "-NoLogo" } })
table.insert(config.launch_menu,
{ label = "VS PowerShell 2022", args = { "powershell", "-NoLogo", "-NoExit", "-Command", "devps 17.0" } })
table.insert(config.launch_menu,
{ label = "VS PowerShell 2019", args = { "powershell", "-NoLogo", "-NoExit", "-Command", "devps 16.0" } })
table.insert(config.launch_menu, { label = "Command Prompt", args = { "cmd.exe" } })
table.insert(config.launch_menu,
{ label = "VS Command Prompt 2022", args = { "powershell", "-NoLogo", "-NoExit", "-Command", "devcmd 17.0" } })
table.insert(config.launch_menu,
{ label = "VS Command Prompt 2019", args = { "powershell", "-NoLogo", "-NoExit", "-Command", "devcmd 16.0" } })
-- Enumerate any WSL distributions that are installed and add those to the menu
local success, wsl_list, wsl_err = wezterm.run_child_process({ "wsl", "-l" })
-- `wsl.exe -l` has a bug where it always outputs utf16:
-- https://github.com/microsoft/WSL/issues/4607
-- So we get to convert it
wsl_list = wezterm.utf16_to_utf8(wsl_list)
for idx, line in ipairs(wezterm.split_by_newlines(wsl_list)) do
-- Skip the first line of output; it's just a header
if idx > 1 then
-- Remove the "(Default)" marker from the default line to arrive
-- at the distribution name on its own
local distro = line:gsub(" %(Default%)", "")
-- Add an entry that will spawn into the distro with the default shell
table.insert(config.launch_menu, {
label = distro .. " (WSL default shell)",
args = { "wsl", "--distribution", distro },
})
-- Here's how to jump directly into some other program; in this example
-- its a shell that probably isn't the default, but it could also be
-- any other program that you want to run in that environment
table.insert(config.launch_menu, {
label = distro .. " (WSL zsh login shell)",
args = { "wsl", "--distribution", distro, "--exec", "/bin/zsh", "-l" },
})
end
end
else
table.insert(config.launch_menu, { label = "zsh", args = { "zsh", "-l" } })
end
-- Equivalent to POSIX basename(3)
-- Given "/foo/bar" returns "bar"
-- Given "c:\\foo\\bar" returns "bar"
function Basename(s)
return string.gsub(s, "(.*[/\\])(.*)", "%2")
end
wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width)
local pane = tab.active_pane
local title = Basename(pane.foreground_process_name)
return {
{ Text = " " .. title .. " " },
}
end)
return config


推荐阅读
  • 本文讨论了在Windows 8上安装gvim中插件时出现的错误加载问题。作者将EasyMotion插件放在了正确的位置,但加载时却出现了错误。作者提供了下载链接和之前放置插件的位置,并列出了出现的错误信息。 ... [详细]
  • 如何去除Win7快捷方式的箭头
    本文介绍了如何去除Win7快捷方式的箭头的方法,通过生成一个透明的ico图标并将其命名为Empty.ico,将图标复制到windows目录下,并导入注册表,即可去除箭头。这样做可以改善默认快捷方式的外观,提升桌面整洁度。 ... [详细]
  • Metasploit攻击渗透实践
    本文介绍了Metasploit攻击渗透实践的内容和要求,包括主动攻击、针对浏览器和客户端的攻击,以及成功应用辅助模块的实践过程。其中涉及使用Hydra在不知道密码的情况下攻击metsploit2靶机获取密码,以及攻击浏览器中的tomcat服务的具体步骤。同时还讲解了爆破密码的方法和设置攻击目标主机的相关参数。 ... [详细]
  • 本文介绍了三种方法来实现在Win7系统中显示桌面的快捷方式,包括使用任务栏快速启动栏、运行命令和自己创建快捷方式的方法。具体操作步骤详细说明,并提供了保存图标的路径,方便以后使用。 ... [详细]
  • C++字符字符串处理及字符集编码方案
    本文介绍了C++中字符字符串处理的问题,并详细解释了字符集编码方案,包括UNICODE、Windows apps采用的UTF-16编码、ASCII、SBCS和DBCS编码方案。同时说明了ANSI C标准和Windows中的字符/字符串数据类型实现。文章还提到了在编译时需要定义UNICODE宏以支持unicode编码,否则将使用windows code page编译。最后,给出了相关的头文件和数据类型定义。 ... [详细]
  • 安装mysqlclient失败解决办法
    本文介绍了在MAC系统中,使用django使用mysql数据库报错的解决办法。通过源码安装mysqlclient或将mysql_config添加到系统环境变量中,可以解决安装mysqlclient失败的问题。同时,还介绍了查看mysql安装路径和使配置文件生效的方法。 ... [详细]
  • 本文介绍了lua语言中闭包的特性及其在模式匹配、日期处理、编译和模块化等方面的应用。lua中的闭包是严格遵循词法定界的第一类值,函数可以作为变量自由传递,也可以作为参数传递给其他函数。这些特性使得lua语言具有极大的灵活性,为程序开发带来了便利。 ... [详细]
  • GetWindowLong函数
    今天在看一个代码里头写了GetWindowLong(hwnd,0),我当时就有点费解,靠,上网搜索函数原型说明,死活找不到第 ... [详细]
  • Linux服务器密码过期策略、登录次数限制、私钥登录等配置方法
    本文介绍了在Linux服务器上进行密码过期策略、登录次数限制、私钥登录等配置的方法。通过修改配置文件中的参数,可以设置密码的有效期、最小间隔时间、最小长度,并在密码过期前进行提示。同时还介绍了如何进行公钥登录和修改默认账户用户名的操作。详细步骤和注意事项可参考本文内容。 ... [详细]
  • 本文分享了一个关于在C#中使用异步代码的问题,作者在控制台中运行时代码正常工作,但在Windows窗体中却无法正常工作。作者尝试搜索局域网上的主机,但在窗体中计数器没有减少。文章提供了相关的代码和解决思路。 ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • 本文讨论了在数据库打开和关闭状态下,重新命名或移动数据文件和日志文件的情况。针对性能和维护原因,需要将数据库文件移动到不同的磁盘上或重新分配到新的磁盘上的情况,以及在操作系统级别移动或重命名数据文件但未在数据库层进行重命名导致报错的情况。通过三个方面进行讨论。 ... [详细]
  • FeatureRequestIsyourfeaturerequestrelatedtoaproblem?Please ... [详细]
  • 成功安装Sabayon Linux在thinkpad X60上的经验分享
    本文分享了作者在国庆期间在thinkpad X60上成功安装Sabayon Linux的经验。通过修改CHOST和执行emerge命令,作者顺利完成了安装过程。Sabayon Linux是一个基于Gentoo Linux的发行版,可以将电脑快速转变为一个功能强大的系统。除了作为一个live DVD使用外,Sabayon Linux还可以被安装在硬盘上,方便用户使用。 ... [详细]
  • 本文介绍了如何清除Eclipse中SVN用户的设置。首先需要查看使用的SVN接口,然后根据接口类型找到相应的目录并删除相关文件。最后使用SVN更新或提交来应用更改。 ... [详细]
author-avatar
mobiledu2502930043
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有