Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d862f0c
commit d618b38
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|
||
|