Skip to content

Instantly share code, notes, and snippets.

@crutkas
Last active April 29, 2021 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crutkas/83659687dcad016a06bb4cb9a877953c to your computer and use it in GitHub Desktop.
Save crutkas/83659687dcad016a06bb4cb9a877953c to your computer and use it in GitHub Desktop.
Setup script for Cinnamon
# Things to note
# Script needs internet access to download files
# Script assumes WinGet is installed
# Script will remotely grab the json fragments and import for winget
# Script assumes winget's setting has this line in it: experimentalFeatures": { "import": true },
$mypath = $MyInvocation.MyCommand.Path
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
# Restarting as Admin
if (!$isAdmin) {
Start-Process PowerShell -Verb RunAs "-NoProfile -ExecutionPolicy Bypass -Command `"cd '$pwd'; & '$mypath' $Args;`"";
exit;
}
# installing what I like 😊
winget import Cinnamon_WinGet.json
# since env won't reset right now, directly adding git to path
$env:Path += ";" + $Env:Programfiles + "\git\cmd"
# Getting terminal source code cloned
mkdir $env:USERPROFILE/source/repo
cd $env:USERPROFILE/source/repo
git clone https://github.com/microsoft/terminal
# FULL ONLY, Kayla will comment this out
# Copy JSON fragments to Terminal folder
# done
$Input = Read-Host -Prompt "Done! Press enter to quit"
{
"$schema" : "https://aka.ms/winget-packages.schema.1.0.json",
"CreationDate" : "2021-04-13T11:00:20.925-00:00",
"Sources" :
[
/* Commenting out since we want scriptable. This requires Store to be signed in
{
"Packages" :
[
{ "Id" : "Microsoft.WindowsTerminalPreview" }
],
"SourceDetails" :
{
"Argument" : "https://winget.azureedge.net/msstore",
"Identifier" : "Microsoft.Winget.MSStore.Source_8wekyb3d8bbwe",
"Name" : "msstore",
"Type" : "Microsoft.PreIndexed.Package"
}
},
*/
{
"Packages" :
[
{ "Id" : "Microsoft.WindowsTerminalPreview" },
{ "Id" : "Git.Git" },
{ "Id" : "Figma.Figma" },
{ "Id" : "Microsoft.PowerToys" },
{ "Id" : "Microsoft.VisualStudioCode.User-x64" },
{ "Id" : "Microsoft.VisualStudio.Enterprise" }
],
"SourceDetails" :
{
"Argument" : "https://winget.azureedge.net/cache",
"Identifier" : "Microsoft.Winget.Source_8wekyb3d8bbwe",
"Name" : "winget",
"Type" : "Microsoft.PreIndexed.Package"
}
}
],
"WinGetVersion" : "0.2.10971"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment