Compare commits
2 Commits
b129a0e308
...
5abb4c4268
Author | SHA1 | Date | |
---|---|---|---|
5abb4c4268 | |||
e5a9f09709 |
19
install.ps1
Normal file
19
install.ps1
Normal 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
11
layout.ps1
Normal 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
|
||||
}
|
||||
}
|
1
layouts/window-wide-left.ps1
Normal file
1
layouts/window-wide-left.ps1
Normal file
@ -0,0 +1 @@
|
||||
wezterm.exe cli split-pane --horizontal --percent 43 --cwd (get-location).path
|
1
layouts/window-wide-right.ps1
Normal file
1
layouts/window-wide-right.ps1
Normal file
@ -0,0 +1 @@
|
||||
wezterm.exe cli split-pane --horizontal --percent 57 --cwd (get-location).path
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user