Files
win11-scripts/vargscript.ps1
Kurtis da7ae7f854 Update
fixed onboarding script
added more to vargscript
2025-11-26 15:46:15 +10:00

305 lines
11 KiB
PowerShell

# Check if the script is running as administrator
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
# If not running as administrator, attempt to restart with elevation
Write-Host "This script needs to run with Administrator privileges. Please Run again" -ForegroundColor Red
Exit
}
function Install-Zen {
Write-Host "Installing Zen" -ForegroundColor Yellow
winget install Zen-Team.Zen-Browser
}
function Config-Zen {
Write-Host "Creating Directory" -ForegroundColor Yellow
$folderPath = "C:\Program Files\Zen Browser\distribution"
if (-not (Test-Path $folderPath -PathType Container)) {
New-Item -Path $folderPath -ItemType Directory -Force
Write-Host "Folder '$folderPath' created successfully."
} else {
Write-Host "Folder '$folderPath' already exists."
}
Write-Host "Downloading Policy" -ForegroundColor Yellow
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/zen-policy.json"
Invoke-WebRequest $download -Out "$folderPath\policies.json"
}
function Install-FlowLauncher {
Write-Host "Installing Flow Launcher" -ForegroundColor Yellow
winget install Flow-Launcher.Flow-Launcher
}
function Config-FlowLauncher {
$folderPath = "$ENV:APPDATA\FlowLauncher\Themes"
if (-not (Test-Path $folderPath -PathType Container)) {
New-Item -Path $folderPath -ItemType Directory -Force
Write-Host "Folder '$folderPath' created successfully."
} else {
Write-Host "Folder '$folderPath' already exists."
}
Write-Host "Downloading Theme" -ForegroundColor Yellow
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/flow-95theme.xaml"
Invoke-WebRequest $download -Out "$folderPath\Windows 95.xaml"
}
function Install-NextCloud {
Write-Host "Installing Nextcloud" -ForegroundColor Yellow
winget install Nextcloud.NextcloudDesktop
}
function Install-SteamLink {
Write-Host "Installing Steamlink" -ForegroundColor Yellow
winget install Valve.SteamLink
}
function Install-Clink {
Write-Host "Installing Clink" -ForegroundColor Yellow
winget install chrisant996.Clink
}
function Install-Starship {
Write-Host "running Nerdfont installer" -ForegroundColor Yellow
$process = Start-Process powershell.exe -ArgumentList "& ([scriptblock]::Create((iwr 'https://to.loredo.me/Install-NerdFont.ps1')))" -PassThru
$process.WaitForExit()
winget install Starship.Starship
Write-Host "Configuring CMD"
$folderPath = "$ENV:LOCALAPPDATA\clink"
if (-not (Test-Path $folderPath -PathType Container)) {
New-Item -Path $folderPath -ItemType Directory -Force
Write-Host "Folder '$folderPath' created successfully."
} else {
Write-Host "Folder '$folderPath' already exists."
}
Set-Content -Path "$folderPath\starship.lua" -Value "load(io.popen('starship init cmd'):read(`"*a`"))()"
Write-Host "Configuring PowerShell"
$folderPath = "$([Environment]::GetFolderPath("MyDocuments"))\WindowsPowerShell"
if (-not (Test-Path $folderPath -PathType Container)) {
New-Item -Path $folderPath -ItemType Directory -Force
Write-Host "Folder '$folderPath' created successfully."
} else {
Write-Host "Folder '$folderPath' already exists."
}
Add-Content -Path "$folderPath\Microsoft.PowerShell_profile.ps1" -Value "Invoke-Expression (&starship init powershell)"
}
function Install-JaxCore {
Write-Host "Installing Jaxcore" -ForegroundColor Yellow
$process = Start-Process powershell.exe -ArgumentList "iwr -useb `"https://raw.githubusercontent.com/Jax-Core/JaxCore/master/CoreInstaller.ps1`" | iex" -PassThru
$process.WaitForExit()
Write-Host "Installing WeatherAddon"
$tempPath = Join-Path $env:TEMP "rainmeter-calendar.rmskin"
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/small_clean_weather_animated__by_zivallh_de00go4.rmskin"
Invoke-WebRequest $download -Out $tempPath
Start-Process -wait $tempPath
Write-Host "Removing Temp"
Remove-Item $tempPath -Force
}
function Install-Cyberduck {
Write-Host "Installing Cyberduck" -ForegroundColor Yellow
winget install Iterate.Cyberduck
}
function Install-Bitwarden {
Write-Host "Installing Bitwarden" -ForegroundColor Yellow
winget install Bitwarden.Bitwarden
}
function Install-Discord {
Write-Host "Installing Discord" -ForegroundColor Yellow
winget install Discord.Discord
}
function Install-LibreOffice {
Write-Host "Installing LibreOffice" -ForegroundColor Yellow
winget install TheDocumentFoundation.LibreOffice
}
function Install-Gimp {
Write-Host "Installing Gimp" -ForegroundColor Yellow
winget install GIMP.GIMP.3
}
function Install-Joplin {
Write-Host "Installing Joplin" -ForegroundColor Yellow
winget install Joplin.Joplin
}
function Install-PlexAmp {
Write-Host "Installing Plexamp" -ForegroundColor Yellow
winget install Plex.Plexamp
}
function Install-WindowsTerminal {
Write-Host "Installing Windows Terminal" -ForegroundColor Yellow
winget install Microsoft.WindowsTerminal
}
function Config-WindowsTerminal {
Write-Host "Configuring Windows Terminal" -ForegroundColor Yellow
$folderPath = "$ENV:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState"
if (-not (Test-Path $folderPath -PathType Container)) {
New-Item -Path $folderPath -ItemType Directory -Force
Write-Host "Folder '$folderPath' created successfully."
} else {
Write-Host "Folder '$folderPath' already exists."
}
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/termsettings.json"
Invoke-WebRequest $download -Out "$folderPath\settings.json"
}
function Install-VSCode {
Write-Host "Installing VSCode" -ForegroundColor Yellow
winget install Microsoft.VisualStudioCode
}
function Install-Git {
Write-Host "Installing GIT" -ForegroundColor Yellow
winget install Git.Git
}
function Install-SSHCLient {
Write-Host "Installing OpenSSH Client" -ForegroundColor Yellow
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
}
function Install-Mattermost {
Write-Host "Installing Mattermost" -ForegroundColor Yellow
winget install Mattermost.MattermostDesktop
}
function Install-Hoarder {
Write-Host "Installing Hoarder" -ForegroundColor Yellow
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/Hoarder.msi"
$tempPath = Join-Path $env:TEMP "Hoarder.msi"
Invoke-WebRequest $download -Out $tempPath
Start-Process 'msiexec.exe' -ArgumentList "/I `"$tempPath`" /qn" -Wait
Remove-Item $tempPath -Force
}
function Install-HomeBox {
Write-Host "Installing HomeBox" -ForegroundColor Yellow
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/Homebox.msi"
$tempPath = Join-Path $env:TEMP "Homebox.msi"
Invoke-WebRequest $download -Out $tempPath
Start-Process 'msiexec.exe' -ArgumentList "/I `"$tempPath`" /qn" -Wait
Remove-Item $tempPath -Force
}
function Install-LubeLogger {
Write-Host "Installing LubeLogger" -ForegroundColor Yellow
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/LubeLogger.msi"
$tempPath = Join-Path $env:TEMP "LubeLogger.msi"
Invoke-WebRequest $download -Out $tempPath
Start-Process 'msiexec.exe' -ArgumentList "/I `"$tempPath`" /qn" -Wait
Remove-Item $tempPath -Force
}
function Install-Mealie {
Write-Host "Installing Mealie" -ForegroundColor Yellow
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/Mealie.msi"
$tempPath = Join-Path $env:TEMP "Meali.msi"
Invoke-WebRequest $download -Out $tempPath
Start-Process 'msiexec.exe' -ArgumentList "/I `"$tempPath`" /qn" -Wait
Remove-Item $tempPath -Force
}
function Install-Messages {
Write-Host "Installing Messages" -ForegroundColor Yellow
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/Messages.msi"
$tempPath = Join-Path $env:TEMP "Messages.msi"
Invoke-WebRequest $download -Out $tempPath
Start-Process 'msiexec.exe' -ArgumentList "/I `"$tempPath`" /qn" -Wait
Remove-Item $tempPath -Force
}
function Install-Messenger {
Write-Host "Installing Messenger" -ForegroundColor Yellow
$download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/Messenger.msi"
$tempPath = Join-Path $env:TEMP "Messenger.msi"
Invoke-WebRequest $download -Out $tempPath
Start-Process 'msiexec.exe' -ArgumentList "/I `"$tempPath`" /qn" -Wait
Remove-Item $tempPath -Force
}
function Show-InteractiveMenu {
param (
[string]$Title = "Main Menu",
[array]$Options
)
Clear-Host
Write-Host "================ $Title ================"
for ($i = 0; $i -lt $Options.Count; $i++) {
Write-Host "$($i + 1): $($Options[$i])"
}
Write-Host "Q: Quit"
Write-Host "========================================"
}
$menuOptions = @(
"Run All",
"Install Zen Config",
"Install FlowLauncher Theme",
"Install Terminal Settings"
)
do {
Show-InteractiveMenu -Title "Onboarding Script" -Options $menuOptions
$choice = Read-Host "Enter your choice (1- $($menuOptions.Count), or Q to quit)"
switch ($choice) {
"1" {
Install-Zen
Config-Zen
Install-FlowLauncher
Config-FlowLauncher
Install-NextCloud
Install-SteamLink
Install-Clink
Install-Starship
Install-JaxCore
Install-Cyberduck
Install-Discord
Install-LibreOffice
Install-Gimp
Install-Joplin
Install-PlexAmp
Install-WindowsTerminal
Config-WindowsTerminal
Install-VSCode
Install-Git
Install-SSHCLient
Install-Mattermost
Install-HomeBox
Install-Hoarder
Install-LubeLogger
Install-Mealie
Install-Messages
Install-Messenger
Pause
}
"2" {
Pause
}
"3" {
Pause
}
"4" {
Pause
}
"q" {
Write-Host "Exiting menu."
break
}
"Q" {
Write-Host "Exiting menu."
break
}
default {
Write-Host "Invalid choice. Please try again." -ForegroundColor Red
Pause
}
}
} while ($choice -ne "q" -and $choice -ne "Q")