Skip to content

Commit

Permalink
Merge pull request #29 from InterFelix/master
Browse files Browse the repository at this point in the history
Fixed Spotify widgets and added functionality to them
  • Loading branch information
MinhThienDX authored May 26, 2020
2 parents e70e639 + 29359fb commit 907fc7f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
1 change: 1 addition & 0 deletions Win10 Widgets/Spotify/Spotify-Large.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Version=1.0.0
@Include=Spotify-Small.ini
BackgroundHeight=418
LeftPadding=10
ShowIfSpotifyClosed=1


; ------------------------------------------------------------------------
Expand Down
44 changes: 32 additions & 12 deletions Win10 Widgets/Spotify/Spotify-Small.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
[Rainmeter]
Update=100
MouseActionCursor=0
ContextTitle3=----
ContextAction3=[]
ContextTitle4="Show when Spotify is closed"
ContextAction4=[!WriteKeyValue Variables ShowIfSpotifyClosed "1"][!Refresh]
ContextTitle5="Hide when Spotify is closed"
ContextAction5=[!WriteKeyValue Variables ShowIfSpotifyClosed "0"][!Refresh]

[Metadata]
Name=Spotify (small)
Expand All @@ -23,6 +29,7 @@ HoverColor2=#SpotifyGreen#
ClickColor=#ForegroundFaintColor#
LeftPadding=60
AutoBorder=1
ShowIfSpotifyClosed=1


; ------------------------------------------------------------------------
Expand All @@ -35,24 +42,30 @@ Plugin=WebNowPlaying
PlayerType=Cover
DefaultPath=#@#Images\nocover.png
CoverPath=#@#Images\cover.png
UpdateDivider = 5
UpdateDivider = #UpdateRate#


[MeasurePlayPause]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=State
Substitute="0":"Play","1":"Pause","2":"Play","3":"Replay"
Substitute="0":"Closed","1":"Pause","2":"Play","3":"Replay"
UpdateDivider = #UpdateRate#

[MeasurePlaying]
; Returns playing status of currently playing Spotify track.
[MeasureState]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=State
IfCondition=(MeasurePlaying=1)
IfTrueAction=[!SetVariable HovorColor #ForegroundColor#][!SetVariable HoverColor2 #SpotifyGreen#][!SetVariable ClickColor #ForegroundFaintColor#][!ShowMeterGroup Pause][!HideMeterGroup Play]
IfFalseAction=[!SetVariable HovorColor #SpotifyGreen#][!SetVariable HoverColor2 #ForegroundColor#][!SetVariable ClickColor #SpotifyGreen#][!HideMeterGroup Pause][!ShowMeterGroup Play]
OnChangeAction=[!UpdateMeter PlayPauseCircle]
IfCondition=MeasureState = 1
IfTrueAction=[!Show][!SetVariable HovorColor #ForegroundColor#][!SetVariable HoverColor2 #SpotifyGreen#][!SetVariable ClickColor #ForegroundFaintColor#][!ShowMeterGroup Pause][!HideMeterGroup Play]
IfCondition2=MeasureState = 2
IfTrueAction2=[!Show][!SetVariable HovorColor #SpotifyGreen#][!SetVariable HoverColor2 #ForegroundColor#][!SetVariable ClickColor #SpotifyGreen#][!HideMeterGroup Pause][!ShowMeterGroup Play]
IfCondition3=(MeasureState=0)
IfTrueAction3=[!HideMeterGroup Pause][!ShowMeterGroup Play]
IfCondition4=(MeasureState=0) && (#ShowIfSpotifyClosed#=0)
IfTrueAction4=[!Hide]
IfConditionMode=1
DynamicVariables=1
UpdateDivider=0.2

[MeasurePosition]
Expand Down Expand Up @@ -85,15 +98,15 @@ UpdateDivider=#UpdateRate#
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Title
UpdateDivider = 5
UpdateDivider = #UpdateRate#
Substitute="":"Track"

[MeasureArtist]
; Returns artist of currently playing Spotify track
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Artist
UpdateDivider = 5
UpdateDivider = #UpdateRate#
Substitute="":"Artist"


Expand Down Expand Up @@ -514,7 +527,7 @@ X=1r
Y=1r
W=1
H=2
SolidColor=#ForegroundColor#
SolidColor=#ForegroundColor#

[NextDiagonalTop]
Meter=Image
Expand Down Expand Up @@ -550,8 +563,9 @@ Y=2
W=50
H=[MeterDefaultCoverBackground:W]
SolidColor=#SpotifyCoverBackground#
LeftMouseUpAction=["C:\Users\dninja21\AppData\Roaming\Spotify\Spotify.exe"]
LeftMouseUpAction=["%AppData%\Spotify\Spotify.exe"]
MouseActionCursor=1
UpdateDivider=#UpdateRate#

[MeterDefaultCoverForeground]
; Shows the default cover foreground; i.e. a gray CD (for when a cover is not available or Spotify is closed).
Expand All @@ -564,6 +578,7 @@ LineStart=18.8
LineLength=6
LineColor=#SpotifyCoverForeground#
Solid=1
UpdateDivider=#UpdateRate#

[MeterCover]
; Shows cover image of currently playing Spotify track.
Expand All @@ -575,6 +590,7 @@ W=[MeterDefaultCoverBackground:W]
H=[MeterCover:W]
DynamicVariables=1
AntiAlias=1
UpdateDivider=#UpdateRate#


; ------------------------------------------------------------------------
Expand All @@ -592,6 +608,7 @@ H=4
SolidColor=#ForegroundFaintColor#
BarColor=#BarColor#
BarOrientation=Horizontal
UpdateDivider=#UpdateRate#


; ------------------------------------------------------------------------
Expand All @@ -607,6 +624,7 @@ MeasureName2=MeasureLength
X=(#BackgroundWidth#-4)
Y=([MeterBar:Y]-18)
Text="%1 / %2"
UpdateDivider=#UpdateRate#

[MeterTrack]
; Shows name of currently playing Spotify track.
Expand All @@ -619,6 +637,7 @@ ClipString=2
ClipStringW=(#BackgroundWidth#-[MeterTrack:X]-9)
Text="%1"
FontFace=Segoe UI Semibold
UpdateDivider=#UpdateRate#

[MeterArtist]
; Shows artist of currently playing Spotify track.
Expand All @@ -631,3 +650,4 @@ ClipString=2
ClipStringW=(#BackgroundWidth#-[MeterArtist:X]-[MeterTime:W]-8)
Text="%1"
DynamicVariables=1
UpdateDivider=#UpdateRate#

0 comments on commit 907fc7f

Please sign in to comment.