Add layout command and two wide window layouts
This commit is contained in:
parent
e5a9f09709
commit
5abb4c4268
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
|
@ -99,3 +99,6 @@ if ((Get-Command cmake.exe -ErrorAction SilentlyContinue).Source) {
|
|||||||
$env:CMAKE_C_COMPILER_LAUNCHER = 'cmake.exe'
|
$env:CMAKE_C_COMPILER_LAUNCHER = 'cmake.exe'
|
||||||
$env:CMAKE_CXX_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