Skip to content

Commit e13a15d

Browse files
committed
fear(terminal): add wezterm terminal emulator
1 parent b2a506d commit e13a15d

File tree

10 files changed

+965
-114
lines changed

10 files changed

+965
-114
lines changed

editors/vscode/settings.json

+10-26
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,6 @@
178178
"explorer.fileNesting.enabled": true,
179179
"explorer.fileNesting.expand": false,
180180
"explorer.fileNesting.patterns": {
181-
".clang-tidy": ".clang-format, .clangd, compile_commands.json",
182-
".env": "*.env, .env.*, .envrc, env.d.ts",
183-
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
184-
".project": ".classpath",
185181
"*.asax": "$(capture).*.cs, $(capture).*.vb",
186182
"*.ascx": "$(capture).*.cs, $(capture).*.vb",
187183
"*.ashx": "$(capture).*.cs, $(capture).*.vb",
@@ -210,11 +206,15 @@
210206
"*.vbproj": "*.config, *proj.user, appsettings.*, bundleconfig.json",
211207
"*.vue": "$(capture).*.ts, $(capture).*.js, $(capture).story.vue",
212208
"*.xaml": "$(capture).xaml.cs",
209+
".clang-tidy": ".clang-format, .clangd, compile_commands.json",
210+
".env": "*.env, .env.*, .envrc, env.d.ts",
211+
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
212+
".project": ".classpath",
213+
"BUILD.bazel": "*.bzl, *.bazel, *.bazelrc, bazel.rc, .bazelignore, .bazelproject, WORKSPACE",
214+
"CMakeLists.txt": "*.cmake, *.cmake.in, .cmake-format.yaml, CMakePresets.json",
213215
"artisan": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, server.php, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, webpack.mix.js, windi.config.*",
214216
"astro.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
215-
"BUILD.bazel": "*.bzl, *.bazel, *.bazelrc, bazel.rc, .bazelignore, .bazelproject, WORKSPACE",
216217
"cargo.toml": ".clippy.toml, .rustfmt.toml, cargo.lock, clippy.toml, cross.toml, rust-toolchain.toml, rustfmt.toml",
217-
"CMakeLists.txt": "*.cmake, *.cmake.in, .cmake-format.yaml, CMakePresets.json",
218218
"composer.json": ".php*.cache, composer.lock, phpunit.xml*, psalm*.xml",
219219
"default.nix": "shell.nix",
220220
"deno.json*": "*.env, .env.*, .envrc, api-extractor.json, env.d.ts, import-map.json, import_map.json, jsconfig.*, tsconfig.*, tsdoc.*",
@@ -326,29 +326,11 @@
326326
"where-am-i.colorful": false,
327327
"window.nativeFullScreen": true,
328328
"window.titleBarStyle": "custom",
329-
"workbench.colorCustomizations": {
330-
"terminal.ansiBlack": "#3b4252",
331-
"terminal.ansiBlue": "#81a1c1",
332-
"terminal.ansiBrightBlack": "#4c566a",
333-
"terminal.ansiBrightBlue": "#81a1c1",
334-
"terminal.ansiBrightCyan": "#8fbcbb",
335-
"terminal.ansiBrightGreen": "#a3be8c",
336-
"terminal.ansiBrightMagenta": "#b48ead",
337-
"terminal.ansiBrightRed": "#bf616a",
338-
"terminal.ansiBrightWhite": "#eceff4",
339-
"terminal.ansiBrightYellow": "#ebcb8b",
340-
"terminal.ansiCyan": "#88c0d0",
341-
"terminal.ansiGreen": "#a3be8c",
342-
"terminal.ansiMagenta": "#b48ead",
343-
"terminal.ansiRed": "#bf616a",
344-
"terminal.ansiWhite": "#e5e9f0",
345-
"terminal.ansiYellow": "#ebcb8b",
346-
"terminal.foreground": "#d8dee9"
347-
},
348329
"workbench.colorTheme": "Gruvbox Dark Medium",
349330
"workbench.editor.labelFormat": "short",
350331
"workbench.editor.languageDetection": true,
351332
"workbench.editor.pinnedTabsOnSeparateRow": true,
333+
"workbench.iconTheme": "catppuccin-mocha",
352334
"workbench.list.horizontalScrolling": true,
353335
"workbench.list.smoothScrolling": true,
354336
"workbench.productIconTheme": "fluent-icons",
@@ -358,5 +340,7 @@
358340
"workbench.statusBar.visible": true,
359341
"workbench.tree.enableStickyScroll": true,
360342
"workbench.tree.indent": 20,
361-
"workbench.iconTheme": "catppuccin-mocha"
343+
"[shellscript]": {
344+
"editor.defaultFormatter": "foxundermoon.shell-format"
345+
}
362346
}

os/common/wezterm/.wezterm.lua

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
-- Import the WezTerm API
2+
local wezterm = require 'wezterm'
3+
4+
-- Create a function to merge tables
5+
local function merge_tables(original, updates)
6+
for k, v in pairs(updates) do
7+
original[k] = v
8+
end
9+
return original
10+
end
11+
12+
-- Create the base configuration
13+
local config = wezterm.config_builder()
14+
15+
-- New configurations that will overwrite the base settings
16+
local new_config = {
17+
-- Color scheme setting
18+
color_scheme = 'GruvboxDark',
19+
20+
-- Font configuration
21+
font = wezterm.font("Delugia"),
22+
bold_brightens_ansi_colors = true,
23+
font_size = 18,
24+
harfbuzz_features = { 'calt=1', 'clig=1', 'liga=1', 'dlig=1', 'hlig=1', 'salt=1', 'rlig=1' },
25+
26+
-- Tab bar settings
27+
enable_tab_bar = false,
28+
show_new_tab_button_in_tab_bar = true,
29+
show_tab_index_in_tab_bar = false,
30+
use_fancy_tab_bar = true,
31+
32+
-- Window decorations and padding
33+
window_decorations = "RESIZE|MACOS_FORCE_ENABLE_SHADOW",
34+
window_padding = {
35+
left = '30pt',
36+
right = '30pt',
37+
top = '30pt',
38+
bottom = '30pt',
39+
},
40+
41+
-- Window frame styling
42+
window_frame = {
43+
border_left_width = '15px',
44+
border_right_width = '15px',
45+
border_bottom_height = '15px',
46+
border_top_height = '15px',
47+
border_left_color = '#343434',
48+
border_right_color = '#343434',
49+
border_bottom_color = '#343434',
50+
border_top_color = '#343434',
51+
inactive_titlebar_bg = '#353535',
52+
active_titlebar_bg = '#2b2042',
53+
inactive_titlebar_fg = '#cccccc',
54+
active_titlebar_fg = '#ffffff',
55+
inactive_titlebar_border_bottom = '#2b2042',
56+
active_titlebar_border_bottom = '#2b2042',
57+
button_fg = '#cccccc',
58+
button_bg = '#2b2042',
59+
button_hover_fg = '#ffffff',
60+
button_hover_bg = '#3b3052',
61+
font = wezterm.font 'Delugia',
62+
font_size = 12,
63+
},
64+
65+
-- Transparency and visual effects
66+
window_background_opacity = 0.95,
67+
macos_window_background_blur = 10,
68+
69+
-- Window close confirmation settings
70+
window_close_confirmation = 'NeverPrompt',
71+
skip_close_confirmation_for_processes_named = {
72+
'bash', 'sh', 'zsh', 'fish', 'tmux', 'nu', 'cmd.exe', 'pwsh.exe', 'powershell.exe',
73+
},
74+
75+
-- Keybinding for closing tabs
76+
keys = {
77+
{
78+
key = 'w',
79+
mods = 'CMD',
80+
action = wezterm.action.CloseCurrentTab { confirm = true },
81+
},
82+
},
83+
84+
-- Scrollbar and scrollback settings
85+
enable_scroll_bar = false,
86+
scrollback_lines = 3500,
87+
88+
-- Hyperlink rules
89+
hyperlink_rules = wezterm.default_hyperlink_rules(),
90+
91+
-- Cursor configuration
92+
default_cursor_style = "BlinkingBar",
93+
cursor_blink_rate = 800,
94+
cursor_blink_ease_in = 'Linear',
95+
cursor_blink_ease_out = 'Linear',
96+
cursor_thickness = 3,
97+
custom_block_glyphs = true,
98+
99+
-- Miscellaneous settings
100+
adjust_window_size_when_changing_font_size = true,
101+
display_pixel_geometry = "RGB",
102+
enable_wayland = true,
103+
exit_behavior_messaging = "Verbose",
104+
exit_behavior = "CloseOnCleanExit",
105+
font_shaper = "Harfbuzz",
106+
hide_mouse_cursor_when_typing = true,
107+
initial_cols = 80,
108+
initial_rows = 24,
109+
}
110+
111+
-- Merge the base configuration with the new settings
112+
config = merge_tables(config, new_config)
113+
114+
-- Return the final configuration to WezTerm
115+
return config

os/mac/brew/Brewfile

+1
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,4 @@ cask "mos"
9292
cask "appcleaner"
9393
cask "fig"
9494
cask "visual-studio-code"
95+
cask "wezterm"

0 commit comments

Comments
 (0)