From 43cefa39956d8f2686a8e36032d3c4d77f34548b Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 16 May 2023 13:05:26 +0100 Subject: [PATCH] Setup wezterm config using nix + recursive linking like others --- home/gui/config/wezterm/wezterm.lua | 32 --------------------- home/gui/wezterm.nix | 43 +++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 38 deletions(-) delete mode 100644 home/gui/config/wezterm/wezterm.lua diff --git a/home/gui/config/wezterm/wezterm.lua b/home/gui/config/wezterm/wezterm.lua deleted file mode 100644 index 37f24ab8..00000000 --- a/home/gui/config/wezterm/wezterm.lua +++ /dev/null @@ -1,32 +0,0 @@ -local wezterm = require "wezterm" -local tab_bar_style = require "tab_bar_style" -local scheme_name = "Catppuccin Macchiato" -local scheme = wezterm.color.get_builtin_schemes()[scheme_name] -tab_bar_style.setup(scheme) --- require("status").setup(scheme) -require "navigator" - -return { - audible_bell = "Disabled", - font_size = 14, - window_background_opacity = 0.85, - macos_window_background_blur = 20, - color_scheme = scheme_name, - use_fancy_tab_bar = false, - tab_max_width = 79, - tab_bar_style = { new_tab = tab_bar_style.new_tab(scheme), new_tab_hover = tab_bar_style.new_tab_hover(scheme) }, - hide_tab_bar_if_only_one_tab = true, - hide_mouse_cursor_when_typing = false, - disable_default_key_bindings = true, - keys = require "keys", - key_tables = require "key_tables", - use_dead_keys = false, - enable_scroll_bar = false, - enable_wayland = true, - window_padding = { - left = 2, - right = 2, - top = 2, - bottom = 2, - }, -} diff --git a/home/gui/wezterm.nix b/home/gui/wezterm.nix index 209c65b1..ecdea49f 100644 --- a/home/gui/wezterm.nix +++ b/home/gui/wezterm.nix @@ -2,12 +2,43 @@ { programs.wezterm = { enable = true; - extraConfig = builtins.readFile ./config/wezterm/wezterm.lua; + extraConfig = '' + local wezterm = require "wezterm" + local tab_bar_style = require "tab_bar_style" + local scheme_name = "Catppuccin Macchiato" + local scheme = wezterm.color.get_builtin_schemes()[scheme_name] + tab_bar_style.setup(scheme) + -- require("status").setup(scheme) + require "navigator" + + return { + audible_bell = "Disabled", + font_size = 14, + window_background_opacity = 0.85, + macos_window_background_blur = 20, + color_scheme = scheme_name, + use_fancy_tab_bar = false, + tab_max_width = 79, + tab_bar_style = { new_tab = tab_bar_style.new_tab(scheme), new_tab_hover = tab_bar_style.new_tab_hover(scheme) }, + hide_tab_bar_if_only_one_tab = true, + hide_mouse_cursor_when_typing = false, + disable_default_key_bindings = true, + keys = require "keys", + key_tables = require "key_tables", + use_dead_keys = false, + enable_scroll_bar = false, + enable_wayland = true, + window_padding = { + left = 2, + right = 2, + top = 2, + bottom = 2, + }, + } + ''; }; - xdg.configFile = { - "wezterm/tab_bar_style.lua".source = ./config/wezterm/tab_bar_style.lua; - "wezterm/navigator.lua".source = ./config/wezterm/navigator.lua; - "wezterm/keys.lua".source = ./config/wezterm/keys.lua; - "wezterm/key_tables.lua".source = ./config/wezterm/key_tables.lua; + xdg.configFile."wezterm" = { + source = ./config/wezterm; + recursive = true; }; }