Compare commits

...

2 Commits

5 changed files with 39 additions and 0 deletions

19
install.ps1 Normal file
View File

@ -0,0 +1,19 @@
if (!(Test-Path -PathType Container $env:LOCALAPPDATA\layouts)) {
New-Item -ItemType Directory -Path $env:LOCALAPPDATA\layouts
Write-Output "changed: created directory $env:LOCALAPPDATA\layouts"
}
$layouts = (
'window-wide-right.ps1',
'window-wide-left.ps1'
)
foreach ($layout in $layouts) {
$source = "$env:USERPROFILE\Documents\WindowsPowerShell\layouts\$layout"
$dest = "$env:LOCALAPPDATA\layouts\$layout"
if (!(Test-Path -PathType Leaf $dest) {
New-Item -ItemType SymbolicLink -Path "$dest" -Target "$source"
Write-Output "changed: created symlink $dest"
}
}
}

11
layout.ps1 Normal file
View File

@ -0,0 +1,11 @@
function layout {
param (
[parameter(mandatory=$true)]
[string]$layoutName,
[string]$tabName
)
& $env:LOCALAPPDATA\layouts\$layoutName.ps1
if ($tabName -ne "") {
wezterm.exe cli set-tab-title $tabName
}
}

View File

@ -0,0 +1 @@
wezterm.exe cli split-pane --horizontal --percent 43 --cwd (get-location).path

View File

@ -0,0 +1 @@
wezterm.exe cli split-pane --horizontal --percent 57 --cwd (get-location).path

View File

@ -6,6 +6,10 @@ $GitPromptSettings.DefaultPromptPrefix.Text = ""
$GitPromptSettings.DefaultPromptSuffix.Text = ""
$GitPromptSettings.BeforeStatus = ""
$GitPromptSettings.AfterStatus = ""
# Enable Scoop completions.
if (Get-Command scoop.ps1 -ErrorAction SilentlyContinue) {
Import-Module "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion"
}
# Enable Chocolatey completions.
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
# Enable op completions.
@ -95,3 +99,6 @@ if ((Get-Command cmake.exe -ErrorAction SilentlyContinue).Source) {
$env:CMAKE_C_COMPILER_LAUNCHER = 'cmake.exe'
$env:CMAKE_CXX_COMPILER_LAUNCHER = 'cmake.exe'
}
# Load plugins
. $PSScriptRoot\layout.ps1