2023-07-31 06:54:18 +02:00
|
|
|
(local wezterm (require :wezterm))
|
2024-05-04 21:48:35 +02:00
|
|
|
(local config (if wezterm.config_builder
|
|
|
|
(wezterm.config_builder)
|
2023-07-31 06:54:18 +02:00
|
|
|
{}))
|
|
|
|
|
2024-09-15 16:10:39 +02:00
|
|
|
;; https://github.com/NixOS/nixpkgs/issues/336069
|
|
|
|
(set config.front_end "WebGpu")
|
|
|
|
|
2023-07-31 06:54:18 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;;; Font Options ;;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
(set config.font
|
|
|
|
(wezterm.font "FiraCode Nerd Font Mono"))
|
|
|
|
|
|
|
|
(set config.harfbuzz_features
|
2024-05-04 21:48:35 +02:00
|
|
|
[:liga
|
|
|
|
:cv02 :cv19 :cv25 :cv26 :cv28 :cv30 :cv32
|
|
|
|
:ss02 :ss03 :ss05 :ss07 :ss09
|
|
|
|
:zero])
|
2023-07-31 06:54:18 +02:00
|
|
|
|
2024-07-21 16:47:55 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;;; Window Options ;;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2024-05-04 21:48:35 +02:00
|
|
|
(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))
|
2023-07-31 06:54:18 +02:00
|
|
|
|
2024-07-21 16:47:55 +02:00
|
|
|
;;;;;;;;;;;;
|
|
|
|
;;; Bell ;;;
|
|
|
|
;;;;;;;;;;;;
|
|
|
|
|
|
|
|
(doto config
|
|
|
|
(tset :audible_bell :Disabled)
|
|
|
|
(tset :visual_bell {}))
|
|
|
|
|
2023-07-31 06:54:18 +02:00
|
|
|
;;;;;;;;;;;;;;;;
|
|
|
|
;;; Keybinds ;;;
|
|
|
|
;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
(fn keybind [mods key action]
|
2024-05-04 21:48:35 +02:00
|
|
|
(local action (if (= (type action) :table)
|
|
|
|
(wezterm.action action)
|
|
|
|
;; else
|
|
|
|
action))
|
2023-07-31 06:54:18 +02:00
|
|
|
{: 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
|