1
0
Fork 0

wezterm: detect different monitors
All checks were successful
Build / build-arm64-linux (push) Successful in 1h31m1s
Build / build-amd64-linux (push) Successful in 1h56m33s

This commit is contained in:
Daniel Kempkens 2023-10-23 14:30:34 +02:00
parent fc3d1832dd
commit baf66055e5
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -58,7 +58,7 @@
_ {: title :icon " " :color "#F8F8F2"}))
(wezterm.on :format-tab-title
(fn [tab tabs panes config hover max-width]
(fn [tab _tabs _panes _config _hover max-width]
(let [raw-title (extract-tab-title tab)
tab-info (extract-tab-info raw-title)
title (wezterm.truncate_right tab-info.title
@ -91,6 +91,7 @@
{:Text title}
; Right
{:Text " "}]))))
;; Event: Ligatures
(wezterm.on :update-status
(fn [window pane]
(local pane-id (pane:pane_id))
@ -121,6 +122,20 @@
disable-ligatures-flags)
(tset ligature-panes pane-id nil)
(window:set_config_overrides overrides))))))
;; Event: Screen options
(wezterm.on :window-resized
(fn [window _pane]
(let [overrides (or (window:get_config_overrides) {})
current-screen (. (wezterm.gui.screens) :active :name)]
(case current-screen
:S34J55x (do
(set overrides.line_height 1)
(set overrides.freetype_load_target :Normal)
(window:set_config_overrides overrides))
_ (do
(set overrides.line_height 0.95)
(set overrides.freetype_load_target :Light)
(window:set_config_overrides overrides))))))
;; Configuration
{:default_prog [_G.shells.fish :--interactive]
;; Appearance