diff --git a/modules/home-manager/reo101-wezterm/default.nix b/modules/home-manager/reo101-wezterm/default.nix index f01b9a7..260ac78 100644 --- a/modules/home-manager/reo101-wezterm/default.nix +++ b/modules/home-manager/reo101-wezterm/default.nix @@ -15,7 +15,7 @@ in enable = mkEnableOption "reo101 wezterm setup"; extraConfig = mkOption { type = types.str; - description = "Extra zsh config"; + description = "Extra wezterm config"; default = '' ''; }; diff --git a/modules/home-manager/reo101-wezterm/wezterm.fnl b/modules/home-manager/reo101-wezterm/wezterm.fnl new file mode 100644 index 0000000..c6f3670 --- /dev/null +++ b/modules/home-manager/reo101-wezterm/wezterm.fnl @@ -0,0 +1,86 @@ +(local wezterm (require :wezterm)) +(local config (or (and wezterm.config_builder + (wezterm.config_builder)) + {})) + +;;;;;;;;;;;;;;;;;;;; +;;; Font Options ;;; +;;;;;;;;;;;;;;;;;;;; + +(set config.font + (wezterm.font "FiraCode Nerd Font Mono")) + +(set config.harfbuzz_features + [: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}) + +;;;;;;;;;;;;;;;; +;;; Keybinds ;;; +;;;;;;;;;;;;;;;; + +(fn keybind [mods key action] + (when (= (type action) :table) + (set action (wezterm.action action))) + {: mods + : key + : action}) + +(set config.disable_default_key_bindings true) +(set config.keys + [;;;;;;;;;;;;;;;;; + ;;; Clipboard ;;; + ;;;;;;;;;;;;;;;;; + (keybind :ALT :c {:CopyTo :Clipboard}) + (keybind :ALT :v {:PasteFrom :Clipboard}) + + ;;;;;;;;;;;;;;;;; + ;;; Font Size ;;; + ;;;;;;;;;;;;;;;;; + (keybind :ALT|SHIFT :UpArrow :IncreaseFontSize) + (keybind :ALT|SHIFT :DownArrow :DecreaseFontSize) + + ;;;;;;;;;;;;;; + ;;; Scroll ;;; + ;;;;;;;;;;;;;; + (keybind :ALT :u {:ScrollByPage -1}) + (keybind :ALT :d {:ScrollByPage 1}) + + ;;;;;;;;;;;;;; + ;;; Reload ;;; + ;;;;;;;;;;;;;; + (keybind :CTRL|SHIFT :r :ReloadConfiguration)]) + +;;;;;;;;;;;;; +;;; Links ;;; +;;;;;;;;;;;;; + +(set config.hyperlink_rules + [;;; Linkify things that look like URLs + {:regex "\\b\\w+://(?:www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_\\+.~#?&/=]*)" + :format "$0"} + + ;;; Linkify things that look like emails + {:regex "\\b\\w+@[\\w-]+(\\.[\\w-]+)+\\b" + :format "mailto:$0"} + + ;;; file:// URI + {:regex "\\bfile://\\S*\\b" + :format "$0"}]) + +config diff --git a/modules/home-manager/reo101-wezterm/wezterm.lua b/modules/home-manager/reo101-wezterm/wezterm.lua index 5e59d58..1729e39 100644 --- a/modules/home-manager/reo101-wezterm/wezterm.lua +++ b/modules/home-manager/reo101-wezterm/wezterm.lua @@ -42,8 +42,8 @@ M.freetype_render_target = "Light" -------------------- M.window_background_opacity = 0.8 M.text_background_opacity = 1.0 --- M.window_background_image = "/home/reo101/.local/share/bg/ide_bg.jpeg" --- M.window_decorations = "NONE" +-- M.window_background_image = "" +M.window_decorations = "RESIZE" M.window_close_confirmation = "NeverPrompt" M.use_resize_increments = false M.enable_scroll_bar = false