Skip to content

Commit

Permalink
post: add wezterm config
Browse files Browse the repository at this point in the history
  • Loading branch information
donnol committed Oct 17, 2023
1 parent 4da80fd commit ec9b4f1
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
5 changes: 5 additions & 0 deletions content/posts/2023/10/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
weight: 1
bookCollapseSection: true
title: "10"
---
86 changes: 86 additions & 0 deletions content/posts/2023/10/wezterm.md
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

```

0 comments on commit ec9b4f1

Please sign in to comment.