Skip to content

Commit

Permalink
INITIAL AWESOME COMMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
shanselman committed Jun 28, 2019
1 parent d862f0c commit d618b38
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
48 changes: 48 additions & 0 deletions getitdone.ps1
@@ -0,0 +1,48 @@
param(
# The `Name` of the MicrosoftTerminal Profile
[Parameter(Mandatory = $true, Position = 0)]
[string]
[Alias('Profile')]
$Name,

# The `Path` of the your awesome gifs that are clearly not copyrighted an totally appropriate to use in an OSS project
[Parameter(Mandatory = $true, Position = 1)]
[string]
[Alias('GifFolderPath')]
$Path
)

#if(!(Get-Module -Name MSTerminalSettings -ListAvailable) )
if(-not (Get-Module -Name MSTerminalSettings -ListAvailable) )
{
Install-Module MSTerminalSettings
}

while ($true) {
#forloop over the path
Get-ChildItem $Path -Filter "*.gif" | ForEach-Object {

$terminalProfile = Get-MSTerminalProfile -Name $Name

$terminalProfile.useAcrylic = $false

if(!$terminalProfile.backgroundImage){
$terminalProfile | Add-Member -NotePropertyName backgroundImage -NotePropertyValue ""
}
$terminalProfile.backgroundImage = $_.FullName

if(!$terminalProfile.backgroundImageOpacity){
$terminalProfile | Add-Member -NotePropertyName backgroundImageOpacity -NotePropertyValue 1
}
$terminalProfile.backgroundImageOpacity = 0.40

if(!$terminalProfile.backgroundImageStretchMode){
$terminalProfile | Add-Member -NotePropertyName backgroundImageStretchMode -NotePropertyValue ""
}
$terminalProfile.backgroundImageStretchMode = "stretchToFill"

$terminalProfile | Set-MSTerminalProfile

Start-Sleep -Seconds 5
}
}
19 changes: 19 additions & 0 deletions notes.txt
@@ -0,0 +1,19 @@
"backgroundImage" : "C:/Users/Scott/Desktop/magic.gif",
"backgroundImageOpacity" : 0.69999998807907104,
"backgroundImageStretchMode" : "uniformToFill",

TerminatAttractMode -name FOO -folder BAR

"useAcrylic" : false

find profile by name
set useAcrylic = false

foreach gif in folder
set backgroundImage
set backgroundImageOpacity to some known const
set backgroundImageStretchMode to some known const
save json (don't screw it up)
sleep(30*1000)


0 comments on commit d618b38

Please sign in to comment.