Format all files

This commit is contained in:
Manuel Thalmann 2024-10-06 21:25:34 +02:00
commit 59708b8f04
110 changed files with 1439 additions and 1484 deletions
scripts/Windows/Software
Firefox
LGHub
MSEdgeRedirect
Nextcloud
Oh My Posh
Thunderbird
TrackMania United Forever
Ubiquiti UniFi Controller
VisualStudio
Windows
aliae
discord
git
osu!
vscode

View file

@ -3,7 +3,7 @@
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @args `
-Installer {
-Installer {
Install-ChocoPackage firefox;
} `
-Configurator {

View file

@ -13,19 +13,19 @@
param()
$hubName = "lghub_system_tray.exe";
$candidates = Get-Process | Where-Object { $_.Path -and ((Split-Path -Leaf $_.Path) -eq $hubName) };
if ($candidates.Count -gt 0) {
$lghubPath = $candidates[0].Path;
} else {
}
else {
$lghubPath = $null;
}
$mainProcesses = Get-Process | Where-Object {
$_.Path -and
(@("lghub.exe", "lghub_agent.exe", "lghub_updater.exe", $hubName) -contains (Split-Path -Leaf $_.Path)) -and
(($_.Parent.ProcessName -eq "explorer") -or ($null -eq $_.Parent))
(($_.Parent.ProcessName -eq "explorer") -or ($null -eq $_.Parent));
};
$null = $mainProcesses | ForEach-Object { $_.Kill($true) };
@ -64,7 +64,7 @@
Edit-LGHubConfig {
Add-BackupArtifacts -User $Arguments.Name -Source $configPath -Path "$Name" `
-Include @("settings.db", "icon_cache")
-Include @("settings.db", "icon_cache");
};
} `
-UserConfigurator {

View file

@ -9,15 +9,15 @@ Start-SoftwareInstaller @args `
$configPath = "HKLM:\SOFTWARE\Robert Maehl Software\MSEdgeRedirect";
[hashtable] $options = @{
NoBing = 1;
NoImgs = 1;
NoNews = 1;
NoPDFs = 1;
Search = "StartPage";
Images = "Custom";
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";
News = "Google";
PDFApp = "C:\Program Files\Mozilla Firefox\firefox.exe";
};
foreach ($key in $options.Keys) {

View file

@ -34,7 +34,7 @@
$folderID = (
$oldContent | `
Where-Object { $_ -match "$pattern" } | `
ForEach-Object { $_ -replace "$pattern.*$","`$1" } | `
ForEach-Object { $_ -replace "$pattern.*$", "`$1" } | `
Sort-Object -Unique | `
Measure-Object -Maximum).Maximum + 1;
@ -80,7 +80,7 @@
Start-SoftwareInstaller @args `
-Installer {
Install-ChocoPackage nextcloud-client -ArgumentList "-y","--params='/KeepUpdateCheck'";
Install-ChocoPackage nextcloud-client -ArgumentList "-y", "--params='/KeepUpdateCheck'";
} `
-UserConfigurator {
param($Arguments)

View file

@ -7,7 +7,7 @@
Start-SoftwareInstaller @args `
-Installer {
Install-WingetPackage JanDeDobbeleer.OhMyPosh -ArgumentList "--scope","machine";
Install-WingetPackage JanDeDobbeleer.OhMyPosh -ArgumentList "--scope", "machine";
} `
-Configurator {
. $base -Action ([InstallerAction]::Configure) @args;

View file

@ -6,7 +6,7 @@ using namespace Microsoft.Win32;
Start-SoftwareInstaller @args `
-Installer {
Install-ChocoPackage thunderbird -ArgumentList "--params",'"/NoTaskbarShortcut /NoDesktopShortcut"'
Install-ChocoPackage thunderbird -ArgumentList "--params", '"/NoTaskbarShortcut /NoDesktopShortcut"';
} `
-Configurator {
Write-Host "Making Thunderbird the default mail program…";

View file

@ -19,12 +19,12 @@ function Get-TMForeverInstallerComponents {
)
@{
context = @{
iconName = $IconName;
context = @{
iconName = $IconName;
userDirectory = $UserDirectory;
installer = $Installer;
installer = $Installer;
};
installer = {
installer = {
param([hashtable] $Context)
$iconName = $Context.IconName;
@ -38,7 +38,7 @@ function Get-TMForeverInstallerComponents {
& $Context.Installer;
Remove-DesktopIcon "*$iconName*";
};
userBackup = {
userBackup = {
param(
[string] $Name,
[hashtable] $Context

View file

@ -6,9 +6,9 @@ Start-SoftwareInstaller @args `
-Installer {
Write-Information "Downgrading AutoHotkey…";
$id = "AutoHotkey.AutoHotkey";
$uninstall = { winget uninstall --accept-source-agreements -e --id "$id"; };
$uninstall = { winget uninstall --accept-source-agreements -e --id "$id" };
& $uninstall;
Install-WingetPackage $id -ArgumentList "--version","1.1.37.00";
Install-WingetPackage $id -ArgumentList "--version", "1.1.37.00";
Install-ChocoPackage temurin11jre;
Write-Host "Installing UniFi Controller…";

View file

@ -74,7 +74,7 @@
if (Test-Path $file) {
Write-Host "Restoring ``$packageName``";
Install-ChocoPackage $packageName -ArgumentList "--params","--config `"$file`"";
Install-ChocoPackage $packageName -ArgumentList "--params", "--config `"$file`"";
}
}

View file

@ -124,7 +124,7 @@ using namespace Microsoft.Win32;
"*ChipChamp*",
"*Facebook*",
"*LinkedIn*"),
[System.Func[System.Object,bool]]{
[System.Func[System.Object, bool]] {
param($pattern)
$_.packagedAppId -like "$pattern";
}));

View file

@ -7,7 +7,7 @@
Start-SoftwareInstaller @args `
-Installer {
Install-WingetPackage JanDeDobbeleer.Aliae -ArgumentList "--scope","machine";
Install-WingetPackage JanDeDobbeleer.Aliae -ArgumentList "--scope", "machine";
} `
-Configurator {
. $base -Action ([InstallerAction]::Configure) @args;

View file

@ -4,7 +4,7 @@
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
Start-SoftwareInstaller @args `
-UserConfigurator {
Install-WingetPackage Vencord.Vesktop;
Remove-DesktopIcon "Vesktop*";
};
-UserConfigurator {
Install-WingetPackage Vencord.Vesktop;
Remove-DesktopIcon "Vesktop*";
};

View file

@ -16,7 +16,7 @@
$params += " /DefaultBranchName:`"$defaultBranch`"";
}
Install-ChocoPackage git -ArgumentList "--params",$params;
Install-ChocoPackage git -ArgumentList "--params", $params;
} `
-Configurator {
& $base ([InstallerAction]::Configure) @args;

View file

@ -7,7 +7,7 @@
$getInstallPath = {
return "$((Get-KnownFolder -SpecialFolder ProgramFilesX86).Path)/osu!";
}
};
Start-SoftwareInstaller @args `
-Installer {

View file

@ -6,8 +6,8 @@
Start-SoftwareInstaller @args `
-Installer {
Install-ChocoPackage vscode -ArgumentList "--params","/NoDesktopIcon";
Install-ChocoPackage vscodium -ArgumentList "--params","/NoDesktopIcon /AssociateWithFiles";
Install-ChocoPackage vscode -ArgumentList "--params", "/NoDesktopIcon";
Install-ChocoPackage vscodium -ArgumentList "--params", "/NoDesktopIcon /AssociateWithFiles";
refreshenv;
} `
-UserConfigurator {