Introduction of BitWarden package + prep
+ BitWarden module for easy autologon (not very secure but convinent on personal machines) - Will think this over some more afterwards * Get-Path will always return without trailing directory separator (might want to make this 'always' for dirs, but unsure yet) + Added Edit-MountUnit scaffolding for later modifying it to import a template on new mount units, and easy edit of systemd mount and automount units.
This commit is contained in:
parent
40cb17d419
commit
c0131deba4
7 changed files with 64 additions and 21 deletions
|
@ -5,6 +5,10 @@
|
|||
|
||||
$local:pathChar = [IO.Path]::DirectorySeparatorChar
|
||||
$MountPath = Get-Path $MountPath
|
||||
$local:MountName = $MountPath -replace '-','\\x2d' -replace $pathChar,'-' -replace '^-','' -replace '-^',''
|
||||
$local:MountName = $($($(
|
||||
$MountPath -replace '-','\\x2d'
|
||||
).Replace( $pathChar, '-' )
|
||||
) -replace '^-',''
|
||||
)
|
||||
|
||||
$MountName
|
||||
|
|
|
@ -5,6 +5,10 @@ param(
|
|||
|
||||
$local:detectedDisistro = cat /etc/os-release | Select-String -Pattern "^ID=" | ForEach-Object { $_ -split '=' | Select-Object -Skip 1 }
|
||||
switch ($detectedDisistro) {
|
||||
'arch' { Update-ArchOSz -Mode:$Mode $args }
|
||||
'ubuntu' { Update-UbuntuOSz -Mode:$Mode $args }
|
||||
'arch' {
|
||||
Update-ArchOSz -Mode:$Mode $args
|
||||
}
|
||||
{$_ -in 'debian','ubuntu','zorin'} {
|
||||
Update-UbuntuOSz -Mode:$Mode $args
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,4 +6,18 @@ if( -not (Test-Path env:XDG_DATA_HOME) ) {
|
|||
}
|
||||
if( -not (Test-Path env:XDG_CONFIG_HOME) ) {
|
||||
$env:XDG_CONFIG_HOME="$HOME/.config"
|
||||
}
|
||||
}
|
||||
|
||||
if( -not (
|
||||
Test-Path env:SHELL_PARENT
|
||||
) -and -not (
|
||||
$env:SHELL -match 'p(wsh|owershell)$'
|
||||
) -and (
|
||||
Test-Path env:SHELL
|
||||
)
|
||||
) {
|
||||
$env:COMPLETION_SHELL_PREFERENCE = $env:SHELL
|
||||
$env:SHELL_PARENT = $env:SHELL
|
||||
}
|
||||
$env:SHELL = Get-Process -Id $PID | Select-Object -ExpandProperty Path
|
||||
Set-UnixCompleter -Shell $env:COMPLETION_SHELL_PREFERENCE
|
Loading…
Add table
Add a link
Reference in a new issue