Skip to content

Commit

Permalink
Add WebNowPlaying support
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasOe committed Aug 18, 2019
1 parent 1d69940 commit 5a8d929
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 4 deletions.
Binary file added @Resources/images/arrow_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/previous.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions @Resources/settings.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dockheight=30
iconsize=18

;Locations
songplace=960
chromeplace=200
cmderplace=230
binplace=40
Expand All @@ -32,7 +33,4 @@ hidecmder=0
hidebin=0
hidetime=0
hideday=0
hidefolder1=1
hidefolder2=1
hidefolder3=1
hidecpu=0
93 changes: 92 additions & 1 deletion Dock/dock.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Rainmeter]
Update=1000
Update=100
MouseActionCursor=0
DesktopWorkAreaType=0
DesktopWorkArea@1=0,60,1366,708
Expand Down Expand Up @@ -77,9 +77,49 @@ RecycleType=Size

[MeasureCPULoad]
Measure=CPU
UpdateDivider=20

[MeasureMemoryLoad]
Measure=PhysicalMemory
UpdateDivider=20

[MeasurePlayer]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Player

[MeasureTrack]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Title
IfMatch=^$
IfMatchAction=[!HideMeterGroup Player]
IfNotMatchAction=[!ShowMeterGroup Player]

;The play state of the player
;0 is no song is selected, this will almost never happen as the plugin retains the last known song in the future I may change it so it clears when the websocket closes but I dont think I want to do that in the event the websocket closes unexpectedly you may want it to keep old data
;1 is playing
;2 is paused
[MeasurePlayPause]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=State
Substitute="0":"Play","1":"Pause","2":"Play","3":"Replay"

[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Position

[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Duration

[MeasureProgress]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Progress



Expand Down Expand Up @@ -275,3 +315,54 @@ ImageAlpha=200
LeftMouseUpAction=["C:\Program Files\Cmder\Cmder.exe"]
MouseOverAction=[!SetOption MeterCmder ImageAlpha 255][!Update][!Redraw]
MouseLeaveAction=[!SetOption MeterCmder ImageAlpha 200][!Update][!Redraw]

;-----------------------------------
; Music
;-----------------------------------

[MeterArtist]
Meter=String
MeasureName=MeasureTrack
Meterstyle=textstyle
X=#songplace#
Y=#lineheight#
W=250
Group=Player
ClipString=1

[MeterPlayPause]
Meter=image
ImageName=#@#images\[MeasurePlayPause].png
X=(#songplace# - 60)
Y=(#dockheight# - #iconsize#) / 2
W=#iconsize#
Group=Player
ImageAlpha=200
MouseOverAction=[!SetOption MeterPlayPause ImageAlpha 255][!Update][!Redraw]
MouseLeaveAction=[!SetOption MeterPlayPause ImageAlpha 200][!Update][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasurePlayPause "PlayPause"]
DynamicVariables=1

[MeterNext]
Meter=Image
ImageName=#@#Images\Next.png
X=(#songplace# - 40)
Y=(#dockheight# - #iconsize#) / 2
W=#iconsize#
Group=Player
ImageAlpha=200
MouseOverAction=[!SetOption MeterNext ImageAlpha 255][!Update][!Redraw]
MouseLeaveAction=[!SetOption MeterNext ImageAlpha 200][!Update][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasurePlayPause "Next"]

[MeterPrevious]
Meter=Image
ImageName=#@#Images\Previous.png
X=(#songplace# - 80)
Y=(#dockheight# - #iconsize#) / 2
W=#iconsize#
Group=Player
ImageAlpha=200
MouseOverAction=[!SetOption MeterPrevious ImageAlpha 255][!Update][!Redraw]
MouseLeaveAction=[!SetOption MeterPrevious ImageAlpha 200][!Update][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasurePlayPause "Previous"]

0 comments on commit 5a8d929

Please sign in to comment.