From a73cd43bbf6bc452e170ed4b77de8aa3dbf137bf Mon Sep 17 00:00:00 2001 From: reo101 Date: Sat, 4 May 2024 22:48:35 +0300 Subject: [PATCH] feat(wezterm): update `wezterm.fnl` Realign Use more macros --- .../home-manager/reo101-wezterm/wezterm.fnl | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/modules/home-manager/reo101-wezterm/wezterm.fnl b/modules/home-manager/reo101-wezterm/wezterm.fnl index c6f3670..0be91c6 100644 --- a/modules/home-manager/reo101-wezterm/wezterm.fnl +++ b/modules/home-manager/reo101-wezterm/wezterm.fnl @@ -1,6 +1,6 @@ (local wezterm (require :wezterm)) -(local config (or (and wezterm.config_builder - (wezterm.config_builder)) +(local config (if wezterm.config_builder + (wezterm.config_builder) {})) ;;;;;;;;;;;;;;;;;;;; @@ -11,32 +11,35 @@ (wezterm.font "FiraCode Nerd Font Mono")) (set config.harfbuzz_features - [:liga - :cv02 :cv19 :cv25 :cv26 :cv28 :cv30 :cv32 - :ss02 :ss03 :ss05 :ss07 :ss09 - :zero]) + [:liga + :cv02 :cv19 :cv25 :cv26 :cv28 :cv30 :cv32 + :ss02 :ss03 :ss05 :ss07 :ss09 + :zero]) -(set config.freetype_render_target :Light) -(set config.window_background_opacity 0.8) -(set config.window_background_image "") -(set config.window_decorations :RESIZE) -(set config.window_close_confirmation :NeverPrompt) -(set config.use_resize_increments false) -(set config.enable_scroll_bar false) -(set config.enable_tab_bar false) -(set config.adjust_window_size_when_changing_font_size false) -(set config.window_padding {:left 0 - :right 0 - :top 0 - :bottom 0}) +(doto config + (tset :freetype_render_target :Light) + (tset :window_background_opacity 0.8) + (tset :window_background_image "") + (tset :window_decorations :RESIZE) + (tset :window_close_confirmation :NeverPrompt) + (tset :use_resize_increments false) + (tset :enable_scroll_bar false) + (tset :enable_tab_bar false) + (tset :window_padding {:left 0 + :right 0 + :top 0 + :bottom 0}) + (tset :adjust_window_size_when_changing_font_size false)) ;;;;;;;;;;;;;;;; ;;; Keybinds ;;; ;;;;;;;;;;;;;;;; (fn keybind [mods key action] - (when (= (type action) :table) - (set action (wezterm.action action))) + (local action (if (= (type action) :table) + (wezterm.action action) + ;; else + action)) {: mods : key : action})