-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
weight: 1 | ||
bookCollapseSection: true | ||
title: "10" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
author: "jdlau" | ||
date: 2023-10-17 | ||
linktitle: `Wezterm`极简配置文件 | ||
menu: | ||
next: | ||
prev: | ||
title: `Wezterm`极简配置文件 | ||
weight: 10 | ||
categories: ['Rust', 'Wezterm'] | ||
tags: ['mark'] | ||
--- | ||
|
||
`Wezterm`极简配置文件 | ||
|
||
```lua | ||
-- Pull in the wezterm API | ||
local wezterm = require 'wezterm' | ||
|
||
-- This table will hold the configuration. | ||
local config = {} | ||
|
||
-- In newer versions of wezterm, use the config_builder which will | ||
-- help provide clearer error messages | ||
if wezterm.config_builder then | ||
config = wezterm.config_builder() | ||
end | ||
|
||
-- This is where you actually apply your config choices | ||
|
||
-- For example, changing the color scheme: | ||
config.color_scheme = 'AdventureTime' | ||
-- config.color_scheme = 'Batman' | ||
|
||
config.enable_tab_bar = true | ||
config.hide_tab_bar_if_only_one_tab = false | ||
config.show_tab_index_in_tab_bar = false | ||
config.tab_bar_at_bottom = true | ||
config.tab_max_width = 25 | ||
|
||
-- Font | ||
-- config.font = wezterm.font_with_fallback { 'JetBrains Mono' } | ||
config.font_size = 14 | ||
config.freetype_load_target = "Light" -- Possible alternatives are `HorizontalLcd`, `Light`, `Mono`, `Normal`, `VerticalLcd`. | ||
|
||
config.mouse_bindings = { -- Paste on right-click | ||
{ | ||
event = { | ||
Down = { | ||
streak = 1, | ||
button = 'Right' | ||
} | ||
}, | ||
mods = 'NONE', | ||
action = wezterm.action { | ||
PasteFrom = 'Clipboard' | ||
} | ||
}, -- Change the default click behavior so that it only selects | ||
{ | ||
event = { | ||
Up = { | ||
streak = 1, | ||
button = 'Left' | ||
} | ||
}, | ||
mods = 'NONE', | ||
action = wezterm.action { | ||
CompleteSelection = 'PrimarySelection' | ||
} | ||
}, -- CTRL-Click open hyperlinks | ||
{ | ||
event = { | ||
Up = { | ||
streak = 1, | ||
button = 'Left' | ||
} | ||
}, | ||
mods = 'CTRL', | ||
action = 'OpenLinkAtMouseCursor' | ||
} | ||
} | ||
|
||
-- and finally, return the configuration to wezterm | ||
return config | ||
|
||
``` |