feat: adds platform options

- Determines the OS/platform
- Configures OS-specific options
This commit is contained in:
2024-10-03 21:04:56 -04:00
parent 9019be8f14
commit 2ea0fe53c4
2 changed files with 51 additions and 4 deletions
+36
View File
@@ -0,0 +1,36 @@
-- ╭─────────────────────────────────────────────────────────╮
-- │ OS OPTIONS │
-- ╰─────────────────────────────────────────────────────────╯
-- Load WezTerm module
local wezterm = WEZTERM
-- Define the opts table
local opts = {}
-- Get the OS string
local os_string = wezterm.target_triple:lower()
local myos = ""
-- Determine the OS
if os_string:find("windows") then
myos = "win"
else
if os_string:find("darwin") then
myos = "mac"
else
myos = "linux"
end
end
-- Set OS-specific options
if myos == "win" then
opts.default_prog = { "pwsh.exe" }
opts.window_background_opacity = 0
opts.win32_system_backdrop = "Mica"
else
opts.default_prog = { "bash" }
end
-- Return the opts table
return opts