From 97a2826f9ab99404b3505afc51e9cb19a68d15e4 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 8 Aug 2024 04:36:35 +0200 Subject: [PATCH] Add scripts for all remaining apps --- scripts/Common/Software/PinnedItem/Manage.ps1 | 15 ++ scripts/Windows/OS/Install.ps1 | 176 +++++++++++++++++- scripts/Windows/Scripts/AppAssociations.ps1 | 4 +- .../Software/MSEdgeRedirect/Manage.ps1 | 35 ++++ .../Windows/Software/ManiaPlanet/Manage.ps1 | 13 ++ scripts/Windows/Software/NVS/Manage.ps1 | 33 ++++ scripts/Windows/Software/PuTTY/Manage.ps1 | 15 ++ scripts/Windows/Software/RetroArch/Manage.ps1 | 15 ++ .../TrackMania Nations Forever/Manage.ps1 | 21 +++ .../TrackMania United Forever/Manage.ps1 | 33 ++++ .../Ubiquiti UniFi Controller/Manage.ps1 | 27 +++ .../Windows/Software/VisualStudio/Manage.ps1 | 30 +++ scripts/Windows/Software/osu!/Manage.ps1 | 14 ++ scripts/Windows/Software/osu!lazer/Manage.ps1 | 31 +++ scripts/Windows/Software/reWASD/Manage.ps1 | 22 +++ scripts/Windows/Software/zoxide/Manage.ps1 | 28 +++ 16 files changed, 509 insertions(+), 3 deletions(-) create mode 100644 scripts/Common/Software/PinnedItem/Manage.ps1 create mode 100644 scripts/Windows/Software/MSEdgeRedirect/Manage.ps1 create mode 100644 scripts/Windows/Software/ManiaPlanet/Manage.ps1 create mode 100644 scripts/Windows/Software/NVS/Manage.ps1 create mode 100644 scripts/Windows/Software/PuTTY/Manage.ps1 create mode 100644 scripts/Windows/Software/RetroArch/Manage.ps1 create mode 100644 scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 create mode 100644 scripts/Windows/Software/TrackMania United Forever/Manage.ps1 create mode 100644 scripts/Windows/Software/Ubiquiti UniFi Controller/Manage.ps1 create mode 100644 scripts/Windows/Software/VisualStudio/Manage.ps1 create mode 100644 scripts/Windows/Software/osu!/Manage.ps1 create mode 100644 scripts/Windows/Software/osu!lazer/Manage.ps1 create mode 100644 scripts/Windows/Software/reWASD/Manage.ps1 create mode 100644 scripts/Windows/Software/zoxide/Manage.ps1 diff --git a/scripts/Common/Software/PinnedItem/Manage.ps1 b/scripts/Common/Software/PinnedItem/Manage.ps1 new file mode 100644 index 00000000..5394743e --- /dev/null +++ b/scripts/Common/Software/PinnedItem/Manage.ps1 @@ -0,0 +1,15 @@ +param ( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../PowerShell/Module.ps1"; +. "$PSScriptRoot/../../Scripts/Software.ps1"; + +$parameters = Get-ModuleInstallerComponents "PinnedItem" -NativeOnly; + +foreach ($key in $PSBoundParameters.Keys) { + $parameters.Add($key, $PSBoundParameters.TryGetValue($key)); +} + +Start-SoftwareInstaller @parameters; diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index 7eef9623..4e46ed1f 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -118,10 +118,14 @@ $null = New-Module { [InstallerAction] $Action ) + [bool] $install = $null; $arguments = [hashtable]@{ }; if ($Action) { - $arguments.Add("action", $Action); + $install = $true; + $null = $arguments.Add("action", $Action); + } else { + $install = ($Action -eq ([InstallerAction]::Install)); } # Drivers @@ -145,7 +149,7 @@ $null = New-Module { } } - if (-not $Action -or ($Action -eq ([InstallerAction]::Install))) { + if ($install) { if (Get-Config "valhalla.hardware.amdCPU") { Install-ChocoPackage amd-ryzen-master; # ToDo: backup Ryzen energy saving plan @@ -181,30 +185,198 @@ $null = New-Module { $commonSoftware = "$PSScriptRoot/../../Common/Software"; . "$softwarePath/Windows/Manage.ps1" @arguments; + if (Get-Config "valhalla.hardware.logitechG") { + . "$softwarePath/LGHub/Manage.ps1" @arguments; + } + if (Test-Collection "essential") { # Essentials . "$softwarePath/OpenSSH/Manage.ps1" @arguments; . "$softwarePath/PowerShell/Manage.ps1" @arguments; . "$softwarePath/chocolatey/Manage.ps1" @arguments; + . "$softwarePath/zoxide/Manage.ps1" @arguments; . "$commonSoftware/posh-git/Manage.ps1" @arguments; . "$commonSoftware/Terminal-Icons/Manage.ps1" @arguments; . "$commonSoftware/Oh My Posh/Manage.ps1" @arguments; + + if ($install) { + Install-ChocoPackage ` + procexp ` + procmon ` + ; + + Install-WingetPackage ` + KDE.KDEConnect ` + ; + } } if (Test-Collection "common") { # Common Software . "$softwarePath/WinSCP/Manage.ps1" @arguments; . "$softwarePath/Thunderbird/Manage.ps1" @arguments; + . "$softwarePath/PuTTY/Manage.ps1" @arguments; + + if ($install) { + Install-ChocoPackage ` + 7zip ` + chocolateygui ` + DefaultProgramsEditor ` + bitwarden ` + keepass ` + ; + + Install-WingetPackage ` + SomePythonThings.WingetUIStore ` + ; + } } if (Test-Collection "desktopExperience") { + if ($install) { + # Fonts + Install-ChocoPackage nerd-fonts-CascadiaCode; + + # Internet Access + Install-WingetPackage Brave.Brave kamranahmedse.pennywise; + Remove-DesktopIcon "*Brave*"; + Remove-TaskbarItem "*Brave*"; + Remove-DesktopIcon "Pennywise*"; + + # Tools + Install-SetupPackage -Source "https://github.com/mRemoteNG/mRemoteNG/releases/download/2023.03.03-v1.77.3-nb/mRemoteNG-Installer-1.77.3.nb-1784.msi" -ArgumentList "/Quiet"; + Remove-DesktopIcon "mRemoteNG*"; + + Install-ChocoPackage ` + gimp ` + gpu-z ` + windirstat ` + winmerge ` + handbrake ` + hwmonitor ` + qbittorrent ` + imgburn ` + inkscape ` + krita ` + MetaX ` + obs-studio ` + ; + + Remove-DesktopIcon "GPU-Z*"; + Remove-DesktopIcon "WinDirStat*"; + Remove-DesktopIcon "*HWMonitor*"; + Remove-DesktopIcon "ImgBurn*"; + Remove-DesktopIcon "InkScape*"; + Remove-DesktopIcon "Krita*"; + Remove-DesktopIcon "MetaX*"; + Remove-DesktopIcon "OBS Studio*"; + + Install-WingetPackage ` + AntSoftware.AntRenamer ` + AppWork.JDownloader; + + Remove-DesktopIcon "JDownloader*"; + } + + # ToDo: Consider hiding behind own config? + . "$softwarePath/Ubiquiti UniFi Controller/Manage.ps1" @arguments; + # Internet Access . "$softwarePath/Firefox/Manage.ps1" @arguments; + . "$softwarePath/MSEdgeRedirect/Manage.ps1" @arguments; if (Test-Collection "fileSync") { . "$softwarePath/Nextcloud/Manage.ps1" @arguments; } } + + if (Test-Collection "socialMedia") { + if ($install) { + Install-ChocoPackage ` + signal ` + threema-desktop ` + element-desktop ` + teamspeak ` + ; + + Remove-DesktopIcon "*Element*"; + Remove-DesktopIcon "*TeamSpeak*"; + + Install-WingetPackage Discord.Discord; + Remove-DesktopIcon "*Discord*"; + } + } + + if (Test-Collection "media") { + if ($install) { + Install-ChocoPackage ` + k-litecodecpackmega ` + jellyfin-media-player ` + vlc ` + ; + + Remove-DesktopIcon "VLC*"; + Install-WingetPackage Ytmdesktop.Ytmdesktop; + Remove-DesktopIcon "Youtube Music*"; + } + } + + if (Test-Collection "coding") { + if ($install) { + Install-ChocoPackage vscode -ArgumentList "--params","/NoDesktopIcon"; + Install-ChocoPackage vscodium -ArgumentList "--params","/NoDesktopIcon /AssociateWithFiles"; + + Install-ChocoPackage ` + gh ` + github-desktop ` + ida-free ` + HxD ` + docker-desktop ` + imhex ` + dotpeek ` + ; + + Remove-DesktopIcon "IDA *"; + Remove-DesktopIcon "GitHub*"; + Remove-DesktopIcon "Docker*"; + } + + . "$softwarePath/VisualStudio/Manage.ps1" @arguments; + + # Node.js + . "$softwarePath/NVS/Manage.ps1" @arguments; + } + + if (Test-Collection "gaming") { + # Gaming + if ($install) { + Install-ChocoPackage ` + goggalaxy ` + epicgameslauncher ` + steam ` + rayman-controlpanel ` + ppsspp ` + ; + + Remove-DesktopIcon "*Epic Games*"; + Remove-DesktopIcon "*Steam*"; + Remove-DesktopIcon "*PPSSPP *-Bit*"; + + Install-ChocoPackage ubisoft-connect -ArgumentList "--ignore-checksums"; + Remove-DesktopIcon "*Ubisoft Connect*"; + + Install-WingetPackage ElectronicArts.EADesktop; + Remove-DesktopIcon "EA.*"; + } + + . "$softwarePath/TrackMania Nations Forever/Manage.ps1" @arguments; + . "$softwarePath/TrackMania United Forever/Manage.ps1" @arguments; + . "$softwarePath/ManiaPlanet/Manage.ps1" @arguments; + . "$softwarePath/osu!/Manage.ps1" @arguments; + . "$softwarePath/osu!lazer/Manage.ps1" @arguments; + . "$softwarePath/RetorArch/Manage.ps1" @arguments; + . "$softwarePath/reWASD/Manage.ps1" @arguments; + } }; } diff --git a/scripts/Windows/Scripts/AppAssociations.ps1 b/scripts/Windows/Scripts/AppAssociations.ps1 index c630292a..a4af3c1c 100644 --- a/scripts/Windows/Scripts/AppAssociations.ps1 +++ b/scripts/Windows/Scripts/AppAssociations.ps1 @@ -96,7 +96,9 @@ $null = New-Module { $writer = [XmlWriter]::Create($configFile.FullName, $writerSettings); $document.Save($writer); $writer.Dispose(); - DISM /Online "/Import-DefaultAppAssociations:$($configFile.FullName)"; + Write-Host "$configFile"; + Read-Host "press enter"; + # DISM /Online "/Import-DefaultAppAssociations:$($configFile.FullName)"; Remove-Item $configFile; } } diff --git a/scripts/Windows/Software/MSEdgeRedirect/Manage.ps1 b/scripts/Windows/Software/MSEdgeRedirect/Manage.ps1 new file mode 100644 index 00000000..f189a7dc --- /dev/null +++ b/scripts/Windows/Software/MSEdgeRedirect/Manage.ps1 @@ -0,0 +1,35 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + param( + [scriptblock] $Installer + ) + + Install-ChocoPackage MSEdgeRedirect; + & $Installer -Action ([InstallerAction]::Configure); + } ` + -Configurator { + $configPath = "HKLM:\SOFTWARE\Robert Maehl Software\MSEdgeRedirect"; + + [hashtable] $options = @{ + NoBing = 1; + NoImgs = 1; + NoNews = 1; + NoPDFs = 1; + Search = "StartPage"; + Images = "Custom"; + ImagePath = "https://startpage.com/sp/search?cat=images&query="; + News = "Google"; + PDFApp = "C:\Program Files\Mozilla Firefox\firefox.exe"; + }; + + foreach ($key in $options.Keys) { + Set-ItemProperty $configPath -Name $key -Value ($options[$key]); + } + }; diff --git a/scripts/Windows/Software/ManiaPlanet/Manage.ps1 b/scripts/Windows/Software/ManiaPlanet/Manage.ps1 new file mode 100644 index 00000000..d2cd2cd4 --- /dev/null +++ b/scripts/Windows/Software/ManiaPlanet/Manage.ps1 @@ -0,0 +1,13 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-WingetPackage Nadeo.ManiaPlanet; + }; + +# ToDo: Add restoration diff --git a/scripts/Windows/Software/NVS/Manage.ps1 b/scripts/Windows/Software/NVS/Manage.ps1 new file mode 100644 index 00000000..31d6e2db --- /dev/null +++ b/scripts/Windows/Software/NVS/Manage.ps1 @@ -0,0 +1,33 @@ +using namespace System.Security.AccessControl; +using namespace System.Security.Principal; + +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + $env:NVS_HOME = "$env:ProgramData\nvs"; + git clone "https://github.com/jasongin/nvs.git" $env:NVS_HOME; + & "$env:NVS_HOME\nvs.cmd" install; + + $acl = Get-Acl $env:NVS_HOME; + + $acl.AddAccessRule( + [FileSystemAccessRule]::new( + [SecurityIdentifier]::new([WellKnownSidType]::BuiltinUsersSid, $null), + [FileSystemRights]::FullControl, + [InheritanceFlags]::ObjectInherit -bor [InheritanceFlags]::ContainerInherit, + [PropagationFlags]::InheritOnly, + [AccessControlType]::Allow)); + + Set-Acl $env:NVS_HOME $acl; + refreshenv; + } ` + -Configurator { + nvs add latest; + nvs link latest; + }; diff --git a/scripts/Windows/Software/PuTTY/Manage.ps1 b/scripts/Windows/Software/PuTTY/Manage.ps1 new file mode 100644 index 00000000..e0152a81 --- /dev/null +++ b/scripts/Windows/Software/PuTTY/Manage.ps1 @@ -0,0 +1,15 @@ +using namespace Microsoft.Win32; + +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/AppAssociations.ps1"; +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-ChocoPackage putty; + }; +# ToDo: Add restoration diff --git a/scripts/Windows/Software/RetroArch/Manage.ps1 b/scripts/Windows/Software/RetroArch/Manage.ps1 new file mode 100644 index 00000000..2667782c --- /dev/null +++ b/scripts/Windows/Software/RetroArch/Manage.ps1 @@ -0,0 +1,15 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-ChocoPackage retroarch; + # ToDo: Add start menu shortcut + # ToDo: Add function for this purpose + }; + +# ToDo: Add restoration diff --git a/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 b/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 new file mode 100644 index 00000000..e2bddc0b --- /dev/null +++ b/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 @@ -0,0 +1,21 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + foreach ($feature in @("DirectPlay", "NetFx3")) { + if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") { + Write-Information "Enabling the ``$feature`` feature…"; + $null = Enable-WindowsOptionalFeature -Online -All -FeatureName $feature; + } + + Install-WingetPackage Nadeo.TrackManiaNationsForever; + Remove-DesktopIcon "*TmNationsForever*"; + } + }; + +# ToDo: Add restoration diff --git a/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 b/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 new file mode 100644 index 00000000..da083bbe --- /dev/null +++ b/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 @@ -0,0 +1,33 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; +. "$PSScriptRoot/../../../Common/Scripts/System.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + $file = "TmUnitedForever.exe"; + $dir = New-TemporaryDirectory; + + foreach ($feature in @("DirectPlay", "NetFx3")) { + if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") { + Write-Information "Enabling the ``$feature`` feature…"; + $null = Enable-WindowsOptionalFeature -Online -All -FeatureName $feature; + } + } + + $null = Push-Location $dir; + Write-Host "Downloading TrackMania United Forever…"; + Invoke-WebRequest "http://files.trackmaniaforever.com/tmunitedforever_setup.exe" -OutFile "$file"; + + Write-Host "Starting installation…"; + Start-Process -Wait -FilePath $file -ArgumentList "/Silent"; + Remove-DesktopIcon "*TmUnitedForever*"; + $null = Pop-Location; + + Remove-Item -Recurse $dir; + }; + +# ToDo: Add restoration diff --git a/scripts/Windows/Software/Ubiquiti UniFi Controller/Manage.ps1 b/scripts/Windows/Software/Ubiquiti UniFi Controller/Manage.ps1 new file mode 100644 index 00000000..e7ea3ce2 --- /dev/null +++ b/scripts/Windows/Software/Ubiquiti UniFi Controller/Manage.ps1 @@ -0,0 +1,27 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; +. "$PSScriptRoot/../../../Common/Scripts/System.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Write-Information "Downgrading AutoHotkey…"; + $id = "AutoHotkey.AutoHotkey"; + $uninstall = { winget uninstall --accept-source-agreements -e --id "$id"; }; + & $uninstall; + Install-WingetPackage $id -ArgumentList "--version","1.1.37.00"; + Install-ChocoPackage temurin11jre; + + Write-Host "Installing UniFi Controller…"; + Install-ChocoPackage ubiquiti-unifi-controller -ArgumentList "--ignore-dependencies"; + + Write-Information "Upgrading AutoHotkey…"; + & $uninstall; + Install-WingetPackage $id; + Remove-DesktopIcon "UniFi*"; + }; + +# ToDo: Add restoration diff --git a/scripts/Windows/Software/VisualStudio/Manage.ps1 b/scripts/Windows/Software/VisualStudio/Manage.ps1 new file mode 100644 index 00000000..f3b53d51 --- /dev/null +++ b/scripts/Windows/Software/VisualStudio/Manage.ps1 @@ -0,0 +1,30 @@ +param( + $Action, + [hashtable] $Arguments +) + +$null = New-Module { + . "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1"; + . "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + . "$PSScriptRoot/../../../Common/Scripts/System.ps1"; + + [System.Tuple[string, string, string][]] $versions = @( + [System.Tuple]::Create("visualstudio2019enterprise", "VisualStudio.16.Release", "Microsoft.VisualStudio.Product.Enterprise"), + [System.Tuple]::Create("visualstudio2019community", "VisualStudio.16.Release", "Microsoft.VisualStudio.Product.Community"), + [System.Tuple]::Create("visualstudio2022enterprise", "VisualStudio.17.Release", "Microsoft.VisualStudio.Product.Enterprise"), + [System.Tuple]::Create("visualstudio2022community", "VisualStudio.17.Release", "Microsoft.VisualStudio.Product.Community") + ); + + Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + foreach ($version in $versions) { + $packageName = $version[0]; + Write-Host "Installing ``$packageName``…"; + Install-ChocoPackage $packageName; + Remove-DesktopIcon "CocosCreator*"; + Remove-DesktopIcon "Unity Hub*"; + } + }; + + # ToDo: Add restoration +}; diff --git a/scripts/Windows/Software/osu!/Manage.ps1 b/scripts/Windows/Software/osu!/Manage.ps1 new file mode 100644 index 00000000..d3ad1af7 --- /dev/null +++ b/scripts/Windows/Software/osu!/Manage.ps1 @@ -0,0 +1,14 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-ChocoPackage osu; + Remove-DesktopIcon "*osu*"; + }; + +# ToDo: Add restoration diff --git a/scripts/Windows/Software/osu!lazer/Manage.ps1 b/scripts/Windows/Software/osu!lazer/Manage.ps1 new file mode 100644 index 00000000..e3f96bf5 --- /dev/null +++ b/scripts/Windows/Software/osu!lazer/Manage.ps1 @@ -0,0 +1,31 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; +. "$PSScriptRoot/../../../Common/Scripts/System.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + $file = "osu!lazer.exe"; + $processName = "osu!"; + $dir = New-TemporaryDirectory; + + Push-Location $dir; + Invoke-WebRequest "https://github.com/ppy/osu/releases/latest/download/install.exe" -OutFile $file; + Start-Process -FilePath $file; + + while (-not (Get-Process -ErrorAction SilentlyContinue $processName)) { + Start-Sleep 1; + } + + Start-Sleep 10; + Get-Process $processName | Stop-Process -Force; + Pop-Location; + Remove-Item -Recurse $dir, + + Remove-DesktopIcon "*osu*"; + }; + +# ToDo: Add restoration diff --git a/scripts/Windows/Software/reWASD/Manage.ps1 b/scripts/Windows/Software/reWASD/Manage.ps1 new file mode 100644 index 00000000..47998cd7 --- /dev/null +++ b/scripts/Windows/Software/reWASD/Manage.ps1 @@ -0,0 +1,22 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1"; +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; +. "$PSScriptRoot/../../../Common/Scripts/System.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Write-Host "Downloading reWASD…"; + $dir = New-TemporaryDirectory; + $file = Start-BrowserDownload -URL "https://rewasd.com/" -ButtonSelector 'a.btn-default[href="#"]' -OutDir $dir; + + Write-Host "Installing reWASD…"; + Start-Process -Wait -FilePath $($file.FullName) -ArgumentList "/S"; + Remove-Item -Recurse $dir; + Remove-DesktopIcon "*reWASD*"; + }; + +# ToDo: Add restoration diff --git a/scripts/Windows/Software/zoxide/Manage.ps1 b/scripts/Windows/Software/zoxide/Manage.ps1 new file mode 100644 index 00000000..a3720129 --- /dev/null +++ b/scripts/Windows/Software/zoxide/Manage.ps1 @@ -0,0 +1,28 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../PowerShell/Profile.ps1"; +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + param( + [scriptblock] $Installer + ) + + Install-ChocoPackage zoxide; + Install-WingetPackage junegunn.fzf; + & $Installer -Action ([InstallerAction]::Configure); + } ` + -Configurator { + Add-PowerShellProfileStatement ` + -System ` + -Category "zoxide" ` + -Script ( + @( + "# zoxide", + (Get-ScriptInitializer "zoxide init powershell | Out-String") + ) -join [System.Environment]::NewLine); + };