Skip to content

Commit

Permalink
fear(terminal): add wezterm terminal emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
borjapazr committed Oct 18, 2024
1 parent b2a506d commit 94a10ab
Show file tree
Hide file tree
Showing 10 changed files with 966 additions and 115 deletions.
36 changes: 10 additions & 26 deletions editors/vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
".clang-tidy": ".clang-format, .clangd, compile_commands.json",
".env": "*.env, .env.*, .envrc, env.d.ts",
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
".project": ".classpath",
"*.asax": "$(capture).*.cs, $(capture).*.vb",
"*.ascx": "$(capture).*.cs, $(capture).*.vb",
"*.ashx": "$(capture).*.cs, $(capture).*.vb",
Expand Down Expand Up @@ -210,11 +206,15 @@
"*.vbproj": "*.config, *proj.user, appsettings.*, bundleconfig.json",
"*.vue": "$(capture).*.ts, $(capture).*.js, $(capture).story.vue",
"*.xaml": "$(capture).xaml.cs",
".clang-tidy": ".clang-format, .clangd, compile_commands.json",
".env": "*.env, .env.*, .envrc, env.d.ts",
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
".project": ".classpath",
"BUILD.bazel": "*.bzl, *.bazel, *.bazelrc, bazel.rc, .bazelignore, .bazelproject, WORKSPACE",
"CMakeLists.txt": "*.cmake, *.cmake.in, .cmake-format.yaml, CMakePresets.json",
"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.*",
"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.*",
"BUILD.bazel": "*.bzl, *.bazel, *.bazelrc, bazel.rc, .bazelignore, .bazelproject, WORKSPACE",
"cargo.toml": ".clippy.toml, .rustfmt.toml, cargo.lock, clippy.toml, cross.toml, rust-toolchain.toml, rustfmt.toml",
"CMakeLists.txt": "*.cmake, *.cmake.in, .cmake-format.yaml, CMakePresets.json",
"composer.json": ".php*.cache, composer.lock, phpunit.xml*, psalm*.xml",
"default.nix": "shell.nix",
"deno.json*": "*.env, .env.*, .envrc, api-extractor.json, env.d.ts, import-map.json, import_map.json, jsconfig.*, tsconfig.*, tsdoc.*",
Expand Down Expand Up @@ -326,29 +326,11 @@
"where-am-i.colorful": false,
"window.nativeFullScreen": true,
"window.titleBarStyle": "custom",
"workbench.colorCustomizations": {
"terminal.ansiBlack": "#3b4252",
"terminal.ansiBlue": "#81a1c1",
"terminal.ansiBrightBlack": "#4c566a",
"terminal.ansiBrightBlue": "#81a1c1",
"terminal.ansiBrightCyan": "#8fbcbb",
"terminal.ansiBrightGreen": "#a3be8c",
"terminal.ansiBrightMagenta": "#b48ead",
"terminal.ansiBrightRed": "#bf616a",
"terminal.ansiBrightWhite": "#eceff4",
"terminal.ansiBrightYellow": "#ebcb8b",
"terminal.ansiCyan": "#88c0d0",
"terminal.ansiGreen": "#a3be8c",
"terminal.ansiMagenta": "#b48ead",
"terminal.ansiRed": "#bf616a",
"terminal.ansiWhite": "#e5e9f0",
"terminal.ansiYellow": "#ebcb8b",
"terminal.foreground": "#d8dee9"
},
"workbench.colorTheme": "Gruvbox Dark Medium",
"workbench.editor.labelFormat": "short",
"workbench.editor.languageDetection": true,
"workbench.editor.pinnedTabsOnSeparateRow": true,
"workbench.iconTheme": "catppuccin-mocha",
"workbench.list.horizontalScrolling": true,
"workbench.list.smoothScrolling": true,
"workbench.productIconTheme": "fluent-icons",
Expand All @@ -358,5 +340,7 @@
"workbench.statusBar.visible": true,
"workbench.tree.enableStickyScroll": true,
"workbench.tree.indent": 20,
"workbench.iconTheme": "catppuccin-mocha"
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
115 changes: 115 additions & 0 deletions os/common/wezterm/.wezterm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
-- Import the WezTerm API
local wezterm = require 'wezterm'

-- Create a function to merge tables
local function merge_tables(original, updates)
for k, v in pairs(updates) do
original[k] = v
end
return original
end

-- Create the base configuration
local config = wezterm.config_builder()

-- New configurations that will overwrite the base settings
local new_config = {
-- Color scheme setting
color_scheme = 'GruvboxDark',

-- Font configuration
font = wezterm.font("Delugia"),
bold_brightens_ansi_colors = true,
font_size = 18,
harfbuzz_features = { 'calt=1', 'clig=1', 'liga=1', 'dlig=1', 'hlig=1', 'salt=1', 'rlig=1' },

-- Tab bar settings
enable_tab_bar = false,
show_new_tab_button_in_tab_bar = true,
show_tab_index_in_tab_bar = false,
use_fancy_tab_bar = true,

-- Window decorations and padding
window_decorations = "RESIZE|MACOS_FORCE_ENABLE_SHADOW",
window_padding = {
left = '30pt',
right = '30pt',
top = '30pt',
bottom = '30pt',
},

-- Window frame styling
window_frame = {
border_left_width = '15px',
border_right_width = '15px',
border_bottom_height = '15px',
border_top_height = '15px',
border_left_color = '#343434',
border_right_color = '#343434',
border_bottom_color = '#343434',
border_top_color = '#343434',
inactive_titlebar_bg = '#353535',
active_titlebar_bg = '#2b2042',
inactive_titlebar_fg = '#cccccc',
active_titlebar_fg = '#ffffff',
inactive_titlebar_border_bottom = '#2b2042',
active_titlebar_border_bottom = '#2b2042',
button_fg = '#cccccc',
button_bg = '#2b2042',
button_hover_fg = '#ffffff',
button_hover_bg = '#3b3052',
font = wezterm.font 'Delugia',
font_size = 12,
},

-- Transparency and visual effects
window_background_opacity = 0.95,
macos_window_background_blur = 10,

-- Window close confirmation settings
window_close_confirmation = 'NeverPrompt',
skip_close_confirmation_for_processes_named = {
'bash', 'sh', 'zsh', 'fish', 'tmux', 'nu', 'cmd.exe', 'pwsh.exe', 'powershell.exe',
},

-- Keybinding for closing tabs
keys = {
{
key = 'w',
mods = 'CMD',
action = wezterm.action.CloseCurrentTab { confirm = true },
},
},

-- Scrollbar and scrollback settings
enable_scroll_bar = false,
scrollback_lines = 3500,

-- Hyperlink rules
hyperlink_rules = wezterm.default_hyperlink_rules(),

-- Cursor configuration
default_cursor_style = "BlinkingBar",
cursor_blink_rate = 800,
cursor_blink_ease_in = 'Linear',
cursor_blink_ease_out = 'Linear',
cursor_thickness = 3,
custom_block_glyphs = true,

-- Miscellaneous settings
adjust_window_size_when_changing_font_size = true,
display_pixel_geometry = "RGB",
enable_wayland = true,
exit_behavior_messaging = "Verbose",
exit_behavior = "CloseOnCleanExit",
font_shaper = "Harfbuzz",
hide_mouse_cursor_when_typing = true,
initial_cols = 80,
initial_rows = 24,
}

-- Merge the base configuration with the new settings
config = merge_tables(config, new_config)

-- Return the final configuration to WezTerm
return config
1 change: 1 addition & 0 deletions os/mac/brew/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,4 @@ cask "mos"
cask "appcleaner"
cask "fig"
cask "visual-studio-code"
cask "wezterm"
Loading

0 comments on commit 94a10ab

Please sign in to comment.