Skip to content

Commit

Permalink
style(wezterm): reformat config (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillmorozov authored Dec 14, 2024
1 parent 3bc2d19 commit e31a4a8
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions wezterm/.wezterm.lua
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
local wezterm = require 'wezterm'
local wezterm = require("wezterm")

--- Returns the appearance of the window environment.
-- If gui is not available returns 'Dark'.
local function get_appearance()
-- NOTE(kirillmorozov): wezterm.gui is not available to the mux server, so
-- take care to do something reasonable when this config is evaluated by the
-- mux
if wezterm.gui then
return wezterm.gui.get_appearance()
end
return 'Dark'
-- NOTE(kirillmorozov): wezterm.gui is not available to the mux server, so
-- take care to do something reasonable when this config is evaluated by the
-- mux
if wezterm.gui then
return wezterm.gui.get_appearance()
end
return "Dark"
end

--- Returns prefered theme for appearance.
local function scheme_for_appearance(appearance)
if appearance:find 'Dark' then
return 'Rosé Pine (Gogh)'
else
return 'Rosé Pine Dawn (Gogh)'
end
if appearance:find("Dark") then
return "Rosé Pine (Gogh)"
else
return "Rosé Pine Dawn (Gogh)"
end
end

local config = {}
-- NOTE(kirillmorozov): In newer versions of wezterm, use the config_builder
-- which will help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
config = wezterm.config_builder()
end

config.window_padding = {
Expand All @@ -39,7 +39,7 @@ config.hide_tab_bar_if_only_one_tab = true

config.color_scheme = scheme_for_appearance(get_appearance())

config.font = wezterm.font_with_fallback { 'FiraCode Nerd Font', 'Fira Code' }
config.font = wezterm.font_with_fallback({ "FiraCode Nerd Font", "Fira Code" })
config.font_size = 14.0

config.animation_fps = 120
Expand Down

0 comments on commit e31a4a8

Please sign in to comment.