diff --git a/Profile.ps1 b/Profile.ps1 index 961307a..37735cd 100644 --- a/Profile.ps1 +++ b/Profile.ps1 @@ -104,7 +104,7 @@ function Start-AdminSession { .SYNOPSIS Starts a new PowerShell session with elevated rights. Alias: su #> - Start-Process wt -Verb runAs -ArgumentList "pwsh.exe -NoExit -Command &{Set-Location $PWD}" + Start-Process wezterm -Verb runAs -WindowStyle Hidden -ArgumentList "start --cwd $PWD" } function Update-Profile { @@ -121,7 +121,7 @@ function Update-Profile { git pull | Out-Null Write-Verbose "Rerunning setup script to capture any new dependencies." - Start-Process pwsh -Verb runAs -WorkingDirectory $PWD -ArgumentList "-Command .\Setup.ps1" + Start-Process wezterm -Verb runAs -WindowStyle Hidden -ArgumentList "start --cwd $PWD pwsh -Command .\Setup.ps1" Write-Verbose "Reverting to previous working directory" Set-Location $currentWorkingDirectory @@ -136,7 +136,7 @@ function Update-Software { Updates all software installed via Winget & Chocolatey. Alias: us #> Write-Verbose "Updating software installed via Winget & Chocolatey" - Start-Process wt -Verb runAs -ArgumentList "pwsh.exe -Command &{winget upgrade --all && choco upgrade all -y}" + Start-Process wezterm -Verb runAs -WindowStyle Hidden -ArgumentList "start -- pwsh -Command &{winget upgrade --all && choco upgrade all -y}" $ENV:UpdatesPending = '' } diff --git a/Setup.ps1 b/Setup.ps1 index 1b2fe59..2540690 100644 --- a/Setup.ps1 +++ b/Setup.ps1 @@ -9,6 +9,7 @@ $symlinks = @{ "$HOME\.gitconfig" = ".\.gitconfig" "$HOME\AppData\Roaming\lazygit" = ".\lazygit" "$HOME\AppData\Roaming\AltSnap\AltSnap.ini" = ".\altsnap\AltSnap.ini" + "$ENV:PROGRAMFILES\WezTerm\wezterm_modules" = ".\wezterm\" } # Winget & choco dependencies @@ -74,6 +75,9 @@ if (Test-Path "$env:USERPROFILE\AppData\Roaming\Microsoft\Windows\Start Menu\Pro Remove-Item "$env:USERPROFILE\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Neovim\" -Recurse -Force } +# Persist Environment Variables +[System.Environment]::SetEnvironmentVariable('WEZTERM_CONFIG_FILE', "$PSScriptRoot\wezterm\wezterm.lua", [System.EnvironmentVariableTarget]::User) + $currentGitEmail = (git config --global user.email) $currentGitName = (git config --global user.name) diff --git a/wezterm/cyberdream.lua b/wezterm/cyberdream.lua new file mode 100644 index 0000000..db6c1f1 --- /dev/null +++ b/wezterm/cyberdream.lua @@ -0,0 +1,18 @@ +return { + foreground = "#ffffff", + background = "#16181a", + + cursor_bg = "#ffffff", + cursor_fg = "#ffffff", + cursor_border = "#ffffff", + + selection_fg = "#ffffff", + selection_bg = "#3c4048", + + scrollbar_thumb = "#16181a", + split = "#16181a", + + ansi = { "#16181a", "#ff6e5e", "#5eff6c", "#f1ff5e", "#5ea1ff", "#bd5eff", "#5ef1ff", "#ffffff" }, + brights = { "#3c4048", "#ff6e5e", "#5eff6c", "#f1ff5e", "#5ea1ff", "#bd5eff", "#5ef1ff", "#ffffff" }, + indexed = { [16] = "#ffbd5e", [17] = "#ff6e5e" }, +} diff --git a/wezterm/wezterm.lua b/wezterm/wezterm.lua new file mode 100644 index 0000000..88fb2ed --- /dev/null +++ b/wezterm/wezterm.lua @@ -0,0 +1,32 @@ +-- Initialize Configuration +local wezterm = require("wezterm") +local config = wezterm.config_builder() + +-- Font +config.font = wezterm.font("JetBrainsMono Nerd Font") +config.font_size = 10 + +-- Window +config.initial_rows = 38 +config.initial_cols = 150 +config.enable_tab_bar = false +config.window_decorations = "RESIZE" +config.window_background_opacity = 0.75 +config.win32_system_backdrop = "Acrylic" +config.max_fps = 144 +config.animation_fps = 60 +config.cursor_blink_rate = 250 + +-- Colors +config.colors = require("cyberdream") + +-- Shell +config.default_prog = { "pwsh", "-NoLogo" } + +-- Keybindings +config.keys = { + -- Remap paste for clipboard history compatibility + { key = "v", mods = "CTRL", action = wezterm.action({ PasteFrom = "Clipboard" }) }, +} + +return config