style(wezterm): use double quotes
This commit is contained in:
parent
25b07797c4
commit
d185b04c98
@ -1,3 +1,3 @@
|
|||||||
column_width = 120
|
column_width = 120
|
||||||
indent_type = 'Spaces'
|
indent_type = "Spaces"
|
||||||
quote_style = 'AutoPreferSingle'
|
quote_style = "AutoPreferDouble"
|
||||||
|
17
.config/wezterm/config/events.lua
Normal file
17
.config/wezterm/config/events.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
local wezterm = require("wezterm")
|
||||||
|
|
||||||
|
wezterm.on("trigger-nvim-with-scrollback", function(window, pane)
|
||||||
|
local scrollback_lines = require("config.misc").scrollback_lines
|
||||||
|
local scrollback = pane:get_lines_as_text(scrollback_lines)
|
||||||
|
local name = os.tmpname()
|
||||||
|
local f = io.open(name, "w+")
|
||||||
|
f:write(scrollback)
|
||||||
|
f:flush()
|
||||||
|
f:close()
|
||||||
|
window:perform_action(wezterm.action({ SpawnCommandInNewTab = { args = { "nvim", name } } }), pane)
|
||||||
|
|
||||||
|
wezterm.sleep_ms(1000)
|
||||||
|
os.remove(name)
|
||||||
|
end)
|
||||||
|
|
||||||
|
return {}
|
@ -1,26 +1,26 @@
|
|||||||
local wezterm = require('wezterm')
|
local wezterm = require("wezterm")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- use_cap_height_to_scale_fallback_fonts = true,
|
-- use_cap_height_to_scale_fallback_fonts = true,
|
||||||
font = wezterm.font_with_fallback({
|
font = wezterm.font_with_fallback({
|
||||||
{
|
{
|
||||||
family = 'JetBrains Mono',
|
family = "JetBrains Mono",
|
||||||
weight = 'DemiBold',
|
weight = "DemiBold",
|
||||||
},
|
},
|
||||||
-- NOTE: Attempt to resolve missing symbols etc.
|
-- NOTE: Attempt to resolve missing symbols etc.
|
||||||
-- <built-in>, BuiltIn
|
-- <built-in>, BuiltIn
|
||||||
{ family = 'Symbols Nerd Font Mono', scale = 0.8 },
|
{ family = "Symbols Nerd Font Mono", scale = 0.8 },
|
||||||
'Noto Sans Symbols2',
|
"Noto Sans Symbols2",
|
||||||
'PowerlineExtraSymbols',
|
"PowerlineExtraSymbols",
|
||||||
{ family = 'FiraCode NF', weight = 'DemiBold', scale = 1.2 },
|
{ family = "FiraCode NF", weight = "DemiBold", scale = 1.2 },
|
||||||
|
|
||||||
-- <built-in>, BuiltIn
|
-- <built-in>, BuiltIn
|
||||||
-- Assumed to have Emoji Presentation
|
-- Assumed to have Emoji Presentation
|
||||||
-- Pixel sizes: [128]
|
-- Pixel sizes: [128]
|
||||||
'Noto Color Emoji',
|
"Noto Color Emoji",
|
||||||
|
|
||||||
-- <built-in>, BuiltIn
|
-- <built-in>, BuiltIn
|
||||||
'Last Resort High-Efficiency',
|
"Last Resort High-Efficiency",
|
||||||
}),
|
}),
|
||||||
font_size = 14,
|
font_size = 14,
|
||||||
}
|
}
|
||||||
|
@ -1,62 +1,63 @@
|
|||||||
local wezterm = require('wezterm')
|
local wezterm = require("wezterm")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
disable_default_key_bindings = true,
|
-- disable_default_key_bindings = true,
|
||||||
leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 100000 },
|
leader = { key = "a", mods = "CTRL", timeout_milliseconds = 100000 },
|
||||||
keys = {
|
keys = {
|
||||||
{ key = 'r', mods = 'SUPER', action = 'ReloadConfiguration' },
|
{ key = "r", mods = "SUPER", action = "ReloadConfiguration" },
|
||||||
{ key = 'z', mods = 'SUPER', action = wezterm.action({ ActivateTabRelative = -1 }) },
|
{ key = "z", mods = "SUPER", action = wezterm.action({ ActivateTabRelative = -1 }) },
|
||||||
{ key = 'x', mods = 'SUPER', action = wezterm.action({ ActivateTabRelative = 1 }) },
|
{ key = "x", mods = "SUPER", action = wezterm.action({ ActivateTabRelative = 1 }) },
|
||||||
{ key = 't', mods = 'SUPER', action = wezterm.action({ SpawnTab = 'CurrentPaneDomain' }) },
|
{ key = "t", mods = "SUPER", action = wezterm.action({ SpawnTab = "CurrentPaneDomain" }) },
|
||||||
{ key = 'w', mods = 'ALT', action = wezterm.action({ CloseCurrentPane = { confirm = false } }) },
|
{ key = "w", mods = "ALT", action = wezterm.action({ CloseCurrentPane = { confirm = false } }) },
|
||||||
{ key = 'w', mods = 'SUPER', action = wezterm.action({ CloseCurrentTab = { confirm = false } }) },
|
{ key = "w", mods = "SUPER", action = wezterm.action({ CloseCurrentTab = { confirm = false } }) },
|
||||||
{ key = 'c', mods = 'SUPER', action = wezterm.action({ CopyTo = 'Clipboard' }) },
|
{ key = "c", mods = "SUPER", action = wezterm.action({ CopyTo = "Clipboard" }) },
|
||||||
{ key = 'v', mods = 'SUPER', action = wezterm.action({ PasteFrom = 'Clipboard' }) },
|
{ key = "v", mods = "SUPER", action = wezterm.action({ PasteFrom = "Clipboard" }) },
|
||||||
-- NOTE: Pane Splitting
|
-- NOTE: Pane Splitting
|
||||||
{
|
{
|
||||||
key = 'RightArrow',
|
key = "RightArrow",
|
||||||
mods = 'SHIFT',
|
mods = "SHIFT",
|
||||||
action = wezterm.action({ SplitPane = { direction = 'Right' } }),
|
action = wezterm.action({ SplitPane = { direction = "Right" } }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = 'LeftArrow',
|
key = "LeftArrow",
|
||||||
mods = 'SHIFT',
|
mods = "SHIFT",
|
||||||
action = wezterm.action({ SplitPane = { direction = 'Left' } }),
|
action = wezterm.action({ SplitPane = { direction = "Left" } }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = 'UpArrow',
|
key = "UpArrow",
|
||||||
mods = 'SHIFT',
|
mods = "SHIFT",
|
||||||
action = wezterm.action({ SplitPane = { direction = 'Up' } }),
|
action = wezterm.action({ SplitPane = { direction = "Up" } }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = 'DownArrow',
|
key = "DownArrow",
|
||||||
mods = 'SHIFT',
|
mods = "SHIFT",
|
||||||
action = wezterm.action({ SplitPane = { direction = 'Down' } }),
|
action = wezterm.action({ SplitPane = { direction = "Down" } }),
|
||||||
},
|
},
|
||||||
-- NOTE: Pane Selecting
|
-- NOTE: Pane Selecting
|
||||||
{
|
{
|
||||||
key = 'RightArrow',
|
key = "RightArrow",
|
||||||
mods = 'CTRL',
|
mods = "CTRL",
|
||||||
action = wezterm.action({ ActivatePaneDirection = 'Right' }),
|
action = wezterm.action({ ActivatePaneDirection = "Right" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = 'LeftArrow',
|
key = "LeftArrow",
|
||||||
mods = 'CTRL',
|
mods = "CTRL",
|
||||||
action = wezterm.action({ ActivatePaneDirection = 'Left' }),
|
action = wezterm.action({ ActivatePaneDirection = "Left" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = 'UpArrow',
|
key = "UpArrow",
|
||||||
mods = 'CTRL',
|
mods = "CTRL",
|
||||||
action = wezterm.action({ ActivatePaneDirection = 'Up' }),
|
action = wezterm.action({ ActivatePaneDirection = "Up" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = 'DownArrow',
|
key = "DownArrow",
|
||||||
mods = 'CTRL',
|
mods = "CTRL",
|
||||||
action = wezterm.action({ ActivatePaneDirection = 'Down' }),
|
action = wezterm.action({ ActivatePaneDirection = "Down" }),
|
||||||
},
|
},
|
||||||
{ key = '=', mods = 'CTRL', action = 'IncreaseFontSize' },
|
{ key = "=", mods = "CTRL", action = "IncreaseFontSize" },
|
||||||
{ key = '-', mods = 'CTRL', action = 'DecreaseFontSize' },
|
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" },
|
||||||
{ key = '0', mods = 'CTRL', action = 'ResetFontAndWindowSize' },
|
{ key = "0", mods = "CTRL", action = "ResetFontAndWindowSize" },
|
||||||
|
{ key = "h", mods = "CTRL", action = wezterm.action({ EmitEvent = "trigger-nvim-with-scrollback" }) },
|
||||||
},
|
},
|
||||||
key_tables = {},
|
key_tables = {},
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
automatically_reload_config = true,
|
automatically_reload_config = true,
|
||||||
window_close_confirmation = 'NeverPrompt',
|
window_close_confirmation = "NeverPrompt",
|
||||||
exit_behavior = 'Close',
|
exit_behavior = "Close",
|
||||||
|
scrollback_lines = 20000,
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
freetype_load_target = 'Normal',
|
freetype_load_target = "Normal",
|
||||||
window_padding = {
|
window_padding = {
|
||||||
left = 0,
|
left = 0,
|
||||||
right = 0,
|
right = 0,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local wezterm = require('wezterm')
|
local wezterm = require("wezterm")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
hide_tab_bar_if_only_one_tab = true,
|
hide_tab_bar_if_only_one_tab = true,
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
M.colors = {
|
M.colors = {
|
||||||
tokyonight_night = {
|
tokyonight_night = {
|
||||||
foreground = '#c0caf5',
|
foreground = "#c0caf5",
|
||||||
background = '#0f111d',
|
background = "#0f111d",
|
||||||
cursor_bg = '#c0caf5',
|
cursor_bg = "#c0caf5",
|
||||||
cursor_border = '#c0caf5',
|
cursor_border = "#c0caf5",
|
||||||
cursor_fg = '#1a1b26',
|
cursor_fg = "#1a1b26",
|
||||||
selection_bg = '#33467C',
|
selection_bg = "#33467C",
|
||||||
selection_fg = '#c0caf5',
|
selection_fg = "#c0caf5",
|
||||||
ansi = { '#15161E', '#f7768e', '#9ece6a', '#e0af68', '#7aa2f7', '#bb9af7', '#7dcfff', '#a9b1d6' },
|
ansi = { "#15161E", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#a9b1d6" },
|
||||||
brights = { '#414868', '#f7768e', '#9ece6a', '#e0af68', '#7aa2f7', '#bb9af7', '#7dcfff', '#c0caf5' },
|
brights = { "#414868", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#c0caf5" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
local colors = require('config.theme.colors')
|
local colors = require("config.theme.colors")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
enable_scroll_bar = true,
|
enable_scroll_bar = true,
|
||||||
window_decorations = 'RESIZE',
|
window_decorations = "RESIZE",
|
||||||
window_background_opacity = 0.97,
|
window_background_opacity = 0.97,
|
||||||
text_background_opacity = 1.0,
|
text_background_opacity = 1.0,
|
||||||
colors = colors.theme,
|
colors = colors.theme,
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
local mergeable_table = require('lib').mergeable_table
|
local mergeable_table = require("lib").mergeable_table
|
||||||
|
|
||||||
-- NOTE: Should be merged
|
-- NOTE: Should be merged
|
||||||
local fonts = require('config.fonts')
|
local events = require("config.events")
|
||||||
local theme = require('config.theme.theme')
|
local fonts = require("config.fonts")
|
||||||
local tabbar = require('config.tabbar')
|
local theme = require("config.theme.theme")
|
||||||
local rendering = require('config.rendering')
|
local tabbar = require("config.tabbar")
|
||||||
local keybinds = require('config.keybinds')
|
local rendering = require("config.rendering")
|
||||||
local misc = require('config.misc')
|
local keybinds = require("config.keybinds")
|
||||||
|
local misc = require("config.misc")
|
||||||
|
|
||||||
local config = mergeable_table.merge(fonts, theme, tabbar, misc, rendering, keybinds)
|
local config = mergeable_table.merge(events, fonts, theme, tabbar, misc, rendering, keybinds)
|
||||||
return config
|
return config
|
||||||
|
Loading…
Reference in New Issue
Block a user