Skip to content

Instantly share code, notes, and snippets.

@linguas
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linguas/d0dd406acea94b71f83c to your computer and use it in GitHub Desktop.
Save linguas/d0dd406acea94b71f83c to your computer and use it in GitHub Desktop.
[Rainmeter]
Update=100
OnRefreshAction=!execute [!RainMeterHideMetergroup Hover]
MouseOverAction=!execute [!rainmetershowMetergroup Hover]
MouseLeaveAction=!execute [!rainmeterhidemetergroup Hover]
[Metadata]
Name=WaniKani
Author=bk-210
Information=Displays next review time, number of available lessons, and number of available reviews
License=Creative Commons BY-SA 3.0
Version=FG204 2nd EDITION ver2.31
[Variables]
; Paste your API key here
APIKey=
; Enter RGBA value for colour. First three values are Red, Green, and Blue. Fourth value is Alpha (opacity).
IconColour=255,255,255,200
; Style settings for next review time, lessons, and reviews text
[StyleNumbers]
FontColor=255,255,255,200
FontFace=Segoe UI Light
FontSize=28
AntiAlias=1
; Style settings for labels
[StyleLabels]
FontColor=255,255,255,200
FontFace=Segoe UI
FontSize=12
AntiAlias=1
[MeasureWKAPIRequest]
Measure=Plugin
Plugin=WebParser
URL=https://www.wanikani.com/api/user/#APIKey#/study-queue
RegExp="lessons_available..(\d*)..reviews_available..(\d*)..next_review_date..(\d*)"
UpdateRate=3000
[MeasureLessons]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWKAPIRequest]
StringIndex=1
[MeasureReviews]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWKAPIRequest]
StringIndex=2
IfCondition=MeasureReviews < 25
IfTrueAction=[!SetOption MeterReviews FontColor 255,238,228,255]
IfCondition2=(MeasureReviews >= 25) && (MeasureReviews < 50)
IfTrueAction2=[!SetOption MeterReviews FontColor 255,202,171,255]
IfCondition3=(MeasureReviews >= 50) && (MeasureReviews < 75)
IfTrueAction3=[!SetOption MeterReviews FontColor 255,161,107,255]
IfCondition4=(MeasureReviews >= 75) && (MeasureReviews < 100)
IfTrueAction4=[!SetOption MeterReviews FontColor 255,130,57,255] [!SetOption MeterReviews FontSize 28]
IfCondition5=(MeasureReviews >= 100) && (MeasureReviews < 125)
IfTrueAction5=[!SetOption MeterReviews FontColor 255,110,26,255] [!SetOption MeterReviews FontSize 30]
IfCondition6=(MeasureReviews >= 125) && (MeasureReviews < 150)
IfTrueAction6=[!SetOption MeterReviews FontColor 255,94,0,255] [!SetOption MeterReviews FontSize 35]
IfCondition7=(MeasureReviews >= 150) && (MeasureReviews < 175)
IfTrueAction7=[!SetOption MeterReviews FontColor 255,0,0,255] [!SetOption MeterReviews FontSize 40]
IfCondition8=(MeasureReviews >= 175) && (MeasureReviews < 200)
IfTrueAction8=[!SetOption MeterReviews FontColor 225,0,0,255] [!SetOption MeterReviews FontSize 45]
IfCondition9=MeasureReviews >= 200
IfTrueAction9=[!SetOption MeterReviews FontColor 255,0,0,255] [!SetOption MeterReviews FontSize 50]
OnUpdateAction=[!UpdateMeter MeterReviews][!Redraw]
[MeasureReviewTime]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWKAPIRequest]
StringIndex=3
[MeasureReviewTimeConversion]
Measure=Script
ScriptFile=timeConvert.lua
[MeterReviewTime]
Meter=String
MeasureName=MeasureReviewTimeConversion
MeterStyle=StyleNumbers
Text=%1
StringAlign=Center
X=102
Group=Hover
[MeterReviewTimeIcon]
Meter=Image
ImageName=@Resources\clock_16x16.png
ImageTint=#IconColour#
Y=54
X=44
Group=Hover
[MeterReviewTimeLabel]
Meter=String
MeterStyle=StyleLabels
Text=Next Review
Y=51
x=67
Group=Hover
[MeterLessons]
Meter=String
MeasureName=MeasureLessons
MeterStyle=StyleNumbers
StringAlign=Center
X=439
Group=Hover
[MeterLessonsIcon]
Meter=Image
ImageName=@Resources\layers_16x14.png
ImageTint=#IconColour#
Y=56
X=396
Group=Hover
[MeterLessonsLabel]
Meter=String
MeterStyle=StyleLabels
Text=Lessons
Y=51
x=419
Group=Hover
[MeterReviews]
Meter=String
MeasureName=MeasureReviews
MeterStyle=StyleNumbers
StringAlign=Center
X=279
[MeterReviewsIcon]
Meter=Image
ImageName=@Resources\loop_alt1_16x12.png
ImageTint=#IconColour#
Y=55
X=237
[MeterReviewsLabel]
Meter=String
MeterStyle=StyleLabels
Text=Reviews
Y=51
x=260
[Background]
Meter=Image
X=230
Y=10
W=110
H=70
SolidColor=0,0,0,1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment