-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path10_Columns.ps1
More file actions
35 lines (20 loc) · 1.29 KB
/
10_Columns.ps1
File metadata and controls
35 lines (20 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$MusicInfo = Import-Csv 'C:\Demos\Music\Tags.txt' -Delimiter "`t" -Header 'Artist', 'Album', 'Year', 'Title'
$AlbumInfo = '{0} ({1})' -f $MusicInfo.Album, $MusicInfo.Year
$Header = New-BTText -Text 'Now Playing'
$LogoPath = Join-Path -Path (Get-Module BurntToast -ListAvailable)[0].ModuleBase -ChildPath 'Images\BurntToast.png'
$AppLogo = New-BTImage -Source $LogoPath -AppLogoOverride -Crop Circle
$ImagePath = 'C:\Demos\Music\CoverArtwork.jpg'
$ToastImage = New-BTImage -Source $ImagePath -RemoveMargin -Align Right
$TitleLabel = New-BTText -Text 'Title:' -Style Base
$AlbumLabel = New-BTText -Text 'Album:' -Style Base
$ArtistLabel = New-BTText -Text 'Artist:' -Style Base
$Title = New-BTText -Text $MusicInfo.Title -Style BaseSubtle
$Album = New-BTText -Text $MusicInfo.Artist -Style BaseSubtle
$Artist = New-BTText -Text $AlbumInfo -Style BaseSubtle
$Column1 = New-BtColumn -Weight 2 -Children $TitleLabel, $AlbumLabel, $ArtistLabel
$Column2 = New-BtColumn -Weight 6 -Children $Title, $Album, $Artist
$Audio1 = New-BTAudio -Silent
$Binding1 = New-BTBinding -Children $Header, $ToastImage -Column $Column1, $Column2 -AppLogoOverride $AppLogo
$Visual1 = New-BTVisual -BindingGeneric $Binding1
$Content1 = New-BTContent -Visual $Visual1 -Audio $Audio1 -Duration Long
Submit-BTNotification -Content $Content1