mirror of
https://github.com/acedanger/dotfiles.git
synced 2025-12-05 22:30:13 -08:00
copied profile
This commit is contained in:
89
wezterm/.config/config/appearance.lua
Normal file
89
wezterm/.config/config/appearance.lua
Normal file
@@ -0,0 +1,89 @@
|
||||
local Utils = require "utils"
|
||||
local color = Utils.fn.color
|
||||
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
local G = require("wezterm").GLOBAL
|
||||
|
||||
local Config = {}
|
||||
|
||||
Config.color_schemes = color.get_schemes()
|
||||
Config.color_scheme = color.get_scheme()
|
||||
|
||||
local theme = Config.color_schemes[Config.color_scheme]
|
||||
|
||||
Config.background = {
|
||||
{
|
||||
source = { Color = theme.background },
|
||||
width = "100%",
|
||||
height = "100%",
|
||||
opacity = G.opacity or 1,
|
||||
},
|
||||
}
|
||||
|
||||
Config.bold_brightens_ansi_colors = "BrightAndBold"
|
||||
|
||||
---char select and command palette
|
||||
Config.char_select_bg_color = theme.brights[6]
|
||||
Config.char_select_fg_color = theme.background
|
||||
Config.char_select_font_size = 12
|
||||
|
||||
Config.command_palette_bg_color = theme.brights[6]
|
||||
Config.command_palette_fg_color = theme.background
|
||||
Config.command_palette_font_size = 14
|
||||
Config.command_palette_rows = 20
|
||||
|
||||
---cursor
|
||||
Config.cursor_blink_ease_in = "EaseIn"
|
||||
Config.cursor_blink_ease_out = "EaseOut"
|
||||
Config.cursor_blink_rate = 500
|
||||
Config.default_cursor_style = "BlinkingUnderline"
|
||||
Config.cursor_thickness = 1
|
||||
Config.force_reverse_video_cursor = true
|
||||
|
||||
Config.enable_scroll_bar = true
|
||||
|
||||
Config.hide_mouse_cursor_when_typing = true
|
||||
|
||||
---text blink
|
||||
Config.text_blink_ease_in = "EaseIn"
|
||||
Config.text_blink_ease_out = "EaseOut"
|
||||
Config.text_blink_rapid_ease_in = "Linear"
|
||||
Config.text_blink_rapid_ease_out = "Linear"
|
||||
Config.text_blink_rate = 500
|
||||
Config.text_blink_rate_rapid = 250
|
||||
|
||||
---visual bell
|
||||
Config.audible_bell = "SystemBeep"
|
||||
Config.visual_bell = {
|
||||
fade_in_function = "EaseOut",
|
||||
fade_in_duration_ms = 200,
|
||||
fade_out_function = "EaseIn",
|
||||
fade_out_duration_ms = 200,
|
||||
}
|
||||
|
||||
---window appearance
|
||||
Config.window_padding = { left = 2, right = 2, top = 2, bottom = 1 }
|
||||
Config.integrated_title_button_alignment = "Right"
|
||||
Config.integrated_title_button_style = "Windows"
|
||||
Config.integrated_title_buttons = { "Hide", "Maximize", "Close" }
|
||||
|
||||
---exit behavior
|
||||
Config.clean_exit_codes = { 130 }
|
||||
Config.exit_behavior = "CloseOnCleanExit"
|
||||
Config.exit_behavior_messaging = "Verbose"
|
||||
Config.skip_close_confirmation_for_processes_named = {
|
||||
"bash",
|
||||
"sh",
|
||||
"zsh",
|
||||
"fish",
|
||||
"tmux",
|
||||
"nu",
|
||||
"cmd.exe",
|
||||
"pwsh.exe",
|
||||
"powershell.exe",
|
||||
}
|
||||
Config.window_close_confirmation = "AlwaysPrompt"
|
||||
|
||||
color.set_tab_button(Config, theme)
|
||||
|
||||
return Config
|
||||
99
wezterm/.config/config/font.lua
Normal file
99
wezterm/.config/config/font.lua
Normal file
@@ -0,0 +1,99 @@
|
||||
---@diagnostic disable: undefined-field
|
||||
|
||||
local wt = require "wezterm"
|
||||
local fs = require("utils.fn").fs
|
||||
|
||||
local Config = {}
|
||||
|
||||
Config.adjust_window_size_when_changing_font_size = false
|
||||
Config.allow_square_glyphs_to_overflow_width = "WhenFollowedBySpace"
|
||||
Config.anti_alias_custom_block_glyphs = true
|
||||
|
||||
Config.font = wt.font_with_fallback {
|
||||
{
|
||||
family = "FiraCode Nerd Font",
|
||||
weight = "Regular",
|
||||
harfbuzz_features = {
|
||||
-- "cv01", ---styles: a
|
||||
-- "cv02", ---styles: g
|
||||
"cv06", ---styles: i (03..06)
|
||||
-- "cv09", ---styles: l (07..10)
|
||||
"cv12", ---styles: 0 (11..13, zero)
|
||||
"cv14", ---styles: 3
|
||||
"cv16", ---styles: * (15..16)
|
||||
-- "cv17", ---styles: ~
|
||||
-- "cv18", ---styles: %
|
||||
-- "cv19", ---styles: <= (19..20)
|
||||
-- "cv21", ---styles: =< (21..22)
|
||||
-- "cv23", ---styles: >=
|
||||
-- "cv24", ---styles: /=
|
||||
"cv25", ---styles: .-
|
||||
"cv26", ---styles: :-
|
||||
-- "cv27", ---styles: []
|
||||
"cv28", ---styles: {. .}
|
||||
"cv29", ---styles: { }
|
||||
-- "cv30", ---styles: |
|
||||
"cv31", ---styles: ()
|
||||
"cv32", ---styles: .=
|
||||
-- "ss01", ---styles: r
|
||||
-- "ss02", ---styles: <= >=
|
||||
"ss03", ---styles: &
|
||||
"ss04", ---styles: $
|
||||
"ss05", ---styles: @
|
||||
-- "ss06", ---styles: \\
|
||||
"ss07", ---styles: =~ !~
|
||||
-- "ss08", ---styles: == === != !==
|
||||
"ss09", ---styles: >>= <<= ||= |=
|
||||
-- "ss10", ---styles: Fl Tl fi fj fl ft
|
||||
-- "onum", ---styles: 1234567890
|
||||
},
|
||||
},
|
||||
{ family = "Noto Color Emoji" },
|
||||
{ family = "LegacyComputing" },
|
||||
}
|
||||
|
||||
if fs.platform().is_win then
|
||||
Config.font_size = 9.5
|
||||
else
|
||||
Config.font_size = 10.5
|
||||
end
|
||||
|
||||
Config.underline_position = -2.5
|
||||
Config.underline_thickness = "2px"
|
||||
Config.warn_about_missing_glyphs = false
|
||||
|
||||
local monaspace_features =
|
||||
{ "dlig", "ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "ss07", "ss08" }
|
||||
|
||||
Config.font_rules = {
|
||||
{
|
||||
intensity = "Normal",
|
||||
italic = true,
|
||||
font = wt.font_with_fallback {
|
||||
{
|
||||
family = "Monaspace Radon Var",
|
||||
style = "Normal",
|
||||
weight = "Regular",
|
||||
stretch = "Normal",
|
||||
harfbuzz_features = monaspace_features,
|
||||
},
|
||||
{ family = "Symbols Nerd Font" },
|
||||
},
|
||||
},
|
||||
{
|
||||
intensity = "Bold",
|
||||
italic = true,
|
||||
font = wt.font_with_fallback {
|
||||
{
|
||||
family = "Monaspace Krypton Var",
|
||||
style = "Italic",
|
||||
weight = "Black",
|
||||
harfbuzz_features = monaspace_features,
|
||||
scale = 1.1,
|
||||
},
|
||||
{ family = "Symbols Nerd Font" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return Config
|
||||
57
wezterm/.config/config/general.lua
Normal file
57
wezterm/.config/config/general.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
local Icons = require "utils.class.icon"
|
||||
local fs = require("utils.fn").fs
|
||||
|
||||
local Config = {}
|
||||
|
||||
if fs.platform().is_win then
|
||||
Config.default_prog =
|
||||
{ "pwsh", "-NoLogo", "-ExecutionPolicy", "RemoteSigned", "-NoProfileLoadTime" }
|
||||
|
||||
Config.launch_menu = {
|
||||
{
|
||||
label = Icons.Progs["pwsh.exe"] .. " PowerShell V7",
|
||||
args = {
|
||||
"pwsh",
|
||||
"-NoLogo",
|
||||
"-ExecutionPolicy",
|
||||
"RemoteSigned",
|
||||
"-NoProfileLoadTime",
|
||||
},
|
||||
cwd = "~",
|
||||
},
|
||||
{
|
||||
label = Icons.Progs["pwsh.exe"] .. " PowerShell V5",
|
||||
args = { "powershell" },
|
||||
cwd = "~",
|
||||
},
|
||||
{ label = "Command Prompt", args = { "cmd.exe" }, cwd = "~" },
|
||||
{ label = Icons.Progs["git"] .. " Git bash", args = { "sh", "-l" }, cwd = "~" },
|
||||
}
|
||||
|
||||
-- ref: https://wezfurlong.org/wezterm/config/lua/WslDomain.html
|
||||
Config.wsl_domains = {
|
||||
{
|
||||
name = "WSL:Ubuntu",
|
||||
distribution = "Ubuntu",
|
||||
username = "sravioli",
|
||||
default_cwd = "~",
|
||||
default_prog = { "bash", "-i", "-l" },
|
||||
},
|
||||
{
|
||||
name = "WSL:Alpine",
|
||||
distribution = "Alpine",
|
||||
username = "sravioli",
|
||||
default_cwd = "/home/sravioli",
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
Config.default_cwd = fs.home()
|
||||
|
||||
-- ref: https://wezfurlong.org/wezterm/config/lua/SshDomain.html
|
||||
Config.ssh_domains = {}
|
||||
|
||||
-- ref: https://wezfurlong.org/wezterm/multiplexing.html#unix-domains
|
||||
Config.unix_domains = {}
|
||||
|
||||
return Config
|
||||
15
wezterm/.config/config/gpu.lua
Normal file
15
wezterm/.config/config/gpu.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local Config = {}
|
||||
|
||||
Config.front_end = "WebGpu"
|
||||
Config.webgpu_force_fallback_adapter = false
|
||||
|
||||
---switch to low power mode when battery is low
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
local battery = require("wezterm").battery_info()[1]
|
||||
Config.webgpu_power_preference = (battery and battery.state_of_charge < 0.35)
|
||||
and "LowPower"
|
||||
or "HighPerformance"
|
||||
|
||||
Config.webgpu_preferred_adapter = require("utils.gpu"):pick_best()
|
||||
|
||||
return Config
|
||||
7
wezterm/.config/config/init.lua
Normal file
7
wezterm/.config/config/init.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return require("utils.fn").tbl.merge(
|
||||
(require "config.appearance"),
|
||||
(require "config.font"),
|
||||
(require "config.tab-bar"),
|
||||
(require "config.general"),
|
||||
(require "config.gpu")
|
||||
)
|
||||
14
wezterm/.config/config/tab-bar.lua
Normal file
14
wezterm/.config/config/tab-bar.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
local Config = {}
|
||||
|
||||
Config.enable_tab_bar = true
|
||||
Config.hide_tab_bar_if_only_one_tab = false
|
||||
Config.show_new_tab_button_in_tab_bar = true
|
||||
Config.show_tab_index_in_tab_bar = false
|
||||
Config.show_tabs_in_tab_bar = true
|
||||
Config.switch_to_last_active_tab_when_closing_tab = false
|
||||
Config.tab_and_split_indices_are_zero_based = false
|
||||
Config.tab_bar_at_bottom = true
|
||||
Config.tab_max_width = 25
|
||||
Config.use_fancy_tab_bar = false
|
||||
|
||||
return Config
|
||||
Reference in New Issue
Block a user