Skip to content

Commit

Permalink
working on config
Browse files Browse the repository at this point in the history
JustBarnt committed Aug 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent a271dcf commit 39bcc0a
Showing 2 changed files with 35 additions and 15 deletions.
18 changes: 18 additions & 0 deletions wezterm/utils/utils.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
local M = {}

local wezterm = require("wezterm") --[[@as Wezterm]]
-- local lfs = require("lfs")

---@param path string
---@return integer
function M.checkDir(path)
local isWin = wezterm.target_triple:find("windows")
local response = false
if isWin then
return os.execute('cd "' .. path .. '" >nul 2>nul')
else
return os.execute('cd "' .. path .. '" 2>/dev/null')
end
end

return M
32 changes: 17 additions & 15 deletions wezterm/wezterm.lua
Original file line number Diff line number Diff line change
@@ -2,16 +2,20 @@ local wezterm = require("wezterm") --[[@as Wezterm]]
local action = wezterm.action
local config = wezterm.config_builder()
local picture_path = "C:\\Users\\bwilliams\\Pictures\\"
local utils = require("utils.utils")

-- Other modules for wezterm
require("tabs").setup(config)
require("mouse").setup(config)
require("links").setup(config)
require("keys").setup(config)

-- Performance and configuration
config.webgpu_power_preference = "HighPerformance"
config.automatically_reload_config = true

local function file_exists(file)
-- Theme / Background
local f = io.open(file, "rb")
if f then
f:close()
@@ -40,7 +44,15 @@ config.background = {
},
}

-- Default Shell / Theme
-- Watch for colorscheme changes
config.color_scheme_dirs = { wezterm.home_dir .. "/colors/Eldritch" }
config.color_scheme = "Eldritch"
wezterm.add_to_config_reload_watch_list(config.color_scheme_dirs[1] .. config.color_scheme .. ".toml")

config.underline_thickness = 3
config.underline_position = -6

-- Default "Item" Options
config.default_prog = { "nu.exe" }

if wezterm.target_triple:find("windows") then
@@ -55,33 +67,23 @@ if wezterm.target_triple:find("windows") then
end)
end

-- Watch for colorscheme changes
config.color_scheme_dirs = { wezterm.home_dir .. "/colors/Eldritch" }
config.color_scheme = "Eldritch"
wezterm.add_to_config_reload_watch_list(config.color_scheme_dirs[1] .. config.color_scheme .. ".toml")

config.underline_thickness = 3
config.underline_position = -6

-- Font Settings
config.font_size = 11.25
---@diagnostic disable-next-line: assign-type-mismatch, missing-fields
config.font = wezterm.font({ family = "MonoLisaCustom Nerd Font", scale = 1, weight = "Medium" })
config.bold_brightens_ansi_colors = "BrightAndBold"

-- Cursor
config.cursor_blink_ease_in = "EaseIn"
config.cursor_blink_ease_out = "EaseOut"
config.default_cursor_style = "BlinkingBar"
config.window_padding = { left = 0, right = 0, top = 0, bottom = 2 }
config.scrollback_lines = 10000

--- Command Pallete
config.command_palette_font_size = 13
config.command_palette_fg_color = "#394b70"
config.command_palette_fg_color = "#828bb8"
config.command_palette_rows = 15
config.command_palette_fg_color = "#ebfafa"
config.command_palette_bg_color = "#323449"

-- UI Settings
config.window_padding = { left = 0, right = 0, top = 0, bottom = 2 }
config.window_decorations = "RESIZE|TITLE"

return config

0 comments on commit 39bcc0a

Please sign in to comment.