From 1776431477a6402a0e64e596ba3ab86bc28df093 Mon Sep 17 00:00:00 2001 From: ayamir Date: Sat, 2 Sep 2023 15:03:42 +0800 Subject: [PATCH] update for wezterm Signed-off-by: ayamir --- .../.config/wezterm/colors/Catppuccin.toml | 12 --- catppuccin/.config/wezterm/wezterm.lua | 101 ++++++++++-------- 2 files changed, 55 insertions(+), 58 deletions(-) delete mode 100644 catppuccin/.config/wezterm/colors/Catppuccin.toml diff --git a/catppuccin/.config/wezterm/colors/Catppuccin.toml b/catppuccin/.config/wezterm/colors/Catppuccin.toml deleted file mode 100644 index 747eecff..00000000 --- a/catppuccin/.config/wezterm/colors/Catppuccin.toml +++ /dev/null @@ -1,12 +0,0 @@ -# Catppuccin -[colors] -foreground = "#D9E0EE" -background = "#1E1E2E" -cursor_bg = "#F5E0DC" -cursor_border = "#F5E0DC" -cursor_fg = "#1E1E2E" -selection_bg = "#575268" -selection_fg = "#D9E0EE" - -ansi = [ "#6E6C7E", "#F28FAD", "#ABE9B3", "#FAE3B0", "#96CDFB", "#F5C2E7","#89DCEB", "#C3BAC6", ] -brights = [ "#988BA2", "#F28FAD", "#ABE9B3", "#FAE3B0", "#96CDFB", "#F5C2E7", "#89DCEB", "#D9E0EE", ] diff --git a/catppuccin/.config/wezterm/wezterm.lua b/catppuccin/.config/wezterm/wezterm.lua index 1c61db51..e683fedd 100644 --- a/catppuccin/.config/wezterm/wezterm.lua +++ b/catppuccin/.config/wezterm/wezterm.lua @@ -1,4 +1,5 @@ local wezterm = require("wezterm") +local c = wezterm.config_builder() local mykeys = { { key = "t", @@ -13,8 +14,9 @@ local mykeys = { { key = "=", mods = "CTRL", action = "IncreaseFontSize" }, { key = "-", mods = "CTRL", action = "DecreaseFontSize" }, { key = "0", mods = "CTRL", action = "ResetFontSize" }, - { key = "C", mods = "CTRL|SHIFT", action = "Copy" }, - { key = "V", mods = "CTRL|SHIFT", action = "Paste" }, + { key = "C", mods = "CTRL", action = wezterm.action.CopyTo("ClipboardAndPrimarySelection") }, + { key = "V", mods = "CTRL", action = wezterm.action.PasteFrom("Clipboard") }, + { key = "V", mods = "CTRL", action = wezterm.action.PasteFrom("PrimarySelection") }, { key = "Z", mods = "CTRL", action = "TogglePaneZoomState" }, { key = "J", @@ -37,50 +39,57 @@ for i = 1, 8 do }) end -return { - use_ime = true, - default_prog = { "/usr/bin/fish", "-l" }, - font = wezterm.font_with_fallback({ - "Sarasa Mono SC Nerd", - "JetBrainsMono Nerd Font", - "Consolas NF", - "FiraCode Nerd Font", - "CamingoCode Nerd Font", - "Hack Nerd Font", - "PlexCodePro Nerd Font Mono", - "CodeNewRoman Nerd Font", - "Operator Mono Lig", - }), - front_end = "OpenGL", - font_size = 14, - color_scheme = "Catppuccin", - enable_tab_bar = true, - tab_max_width = 20, - tab_bar_at_bottom = true, - hide_tab_bar_if_only_one_tab = true, - text_background_opacity = 1.0, - disable_default_key_bindings = true, - mouse_bindings = { - { +wezterm.plugin.require("https://github.com/nekowinston/wezterm-bar").apply_to_config(c) - event = { Up = { streak = 1, button = "Left" } }, - mods = "NONE", - action = wezterm.action({ - CompleteSelectionOrOpenLinkAtMouseCursor = "Clipboard", - }), - }, - { - event = { Up = { streak = 1, button = "Left" } }, - mods = "CTRL", - action = "OpenLinkAtMouseCursor", - }, +c.use_ime = true +c.default_prog = { "/bin/zsh", "-l" } +c.window_decorations = "RESIZE" +c.window_padding = { + left = 0, + right = 0, + top = 0, + bottom = 0, +} +c.font = wezterm.font_with_fallback({ + "JetBrainsMono Nerd Font", + "Sarasa Mono SC Nerd", + "Consolas NF", + "FiraCode Nerd Font", + "CamingoCode Nerd Font", + "Hack Nerd Font", + "PlexCodePro Nerd Font Mono", + "CodeNewRoman Nerd Font", + "Operator Mono Lig", +}) +c.adjust_window_size_when_changing_font_size = false +c.audible_bell = "Disabled" +c.clean_exit_codes = { 130 } +c.default_cursor_style = "BlinkingBar" +c.command_palette_font_size = 13.0 +c.window_frame = { font_size = 13.0 } +c.window_background_opacity = 0.95 +c.front_end = "OpenGL" +c.font_size = 13 +c.mouse_bindings = { + { + + event = { Up = { streak = 1, button = "Left" } }, + mods = "NONE", + action = wezterm.action({ + CompleteSelectionOrOpenLinkAtMouseCursor = "Clipboard", + }), + }, + { + event = { Up = { streak = 1, button = "Left" } }, + mods = "CTRL", + action = "OpenLinkAtMouseCursor", }, - keys = mykeys, - window_background_opacity = 1.0, - -- window_background_image = "/home/ayamir/Pictures/wezterm/nord.jpg", - -- window_background_image_hsb = { - -- brightness = 2.0, - -- hue = 1.0, - -- saturation = 1.0 - -- } } +c.keys = mykeys + +wezterm.plugin.require("https://github.com/catppuccin/wezterm").apply_to_config(c, { + sync = false, + sync_flavors = { light = "latte", dark = "mocha" }, +}) + +return c