[Rainmeter]
Author=jing
Update=100
BackgroundMode=1
MouseActionCursor=0
MiddleMouseDownAction=!RainmeterDeactivateConfig

[Metadata]
Name=i3 bar
Config=Mail (Animated)
Description=Shows how many new mails
Version=1.0.0
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

;Animation method by Chris Hennessey !


[Variables]
Font=Segoe UI
WhiteColor=255,255,255,255
@include="#SKINSPATH#\i3 bar\Resources\Variables1.txt"

;Do not touch these : 

ShowItems=[!RainmeterShowMeterGroup Mail]
HideItems=[!RainmeterHideMeterGroup Mail]

[StringStyle]
FontColor=#WhiteColor#
FontFace=#Font#
StringAlign=Center
StringStyle=Normal
AntiAlias=1

[Back]
Measure=Calc
Formula=0

[Open]
Measure=Calc
Formula=10

[CounterStep]
Measure=Calc
Formula=Counter

[CounterHold]
Measure=Calc
Formula=CounterHold = 0 ? CounterStep : CounterHold
Disable=1

[CounterReset]
Measure=Calc
Formula=CounterStep - CounterHold
IfAboveValue=9
IfAboveAction=!Execute [!RainmeterDisableMeasure CounterHold]

[BackAnim]
Measure=Calc
MinValue=0
MaxValue=10
Formula=(CounterStep-CounterHold < 10) ? CounterStep-CounterHold : 0
IfEqualValue=9
IfEqualAction=!Execute [!RainmeterHideMeter MeterAnimOpen][!RainmeterShowMeter MeterBackOpen][!RainmeterHideMeter MeterBackAnim][!RainmeterDisableMeasure BackAnim][!RainmeterShowMeter MeterAnimClose][!RainmeterDisableMeasure CounterHold] #ShowItems#
Disabled=1

[BackAnimRev]
Measure=Calc
MinValue=0
MaxValue=10
Formula=(CounterStep-CounterHold < 10) ? 10-(CounterStep-CounterHold) : 9
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterShowMeter MeterBack][!RainmeterHideMeter MeterBackAnimRev][!RainmeterDisableMeasure BackAnimRev][!RainmeterShowMeter MeterAnimOpen][!RainmeterHideMeter MeterAnimClose][!RainmeterDisableMeasure CounterHold]
Disabled=1


::::::::::::::::::::::::::::::
;Animated Drop-Down Screen Meters
::::::::::::::::::::::::::::::

[MeterBack]
MeasureName=Back
Meter=BITMAP
X=0
Y=0
BitmapImage=animleft.png
BitmapFrames=16
BitmapZeroFrame=1

[MeterBackAnim]
MeasureName=BackAnim
Meter=BITMAP
X=0
Y=0
BitmapImage=animleft.png
BitmapFrames=16
BitmapZeroFrame=1
Hidden=1

[MeterBackAnimRev]
MeasureName=BackAnimRev
Meter=BITMAP
X=0
Y=0
BitmapImage=animleft.png
BitmapFrames=16
BitmapZeroFrame=1
Hidden=1

[MeterBackOpen]
MeasureName=Open
Meter=BITMAP
X=0
Y=0
BitmapImage=animleft.png
BitmapFrames=16
BitmapZeroFrame=1
Hidden=1

[MeterAnimOpen]
Meter=Image
x=81
y=48
w=20
h=20
SolidColor=0, 190, 233, 0
LeftMouseDownAction=!Execute [!RainmeterEnableMeasure CounterHold][!RainmeterEnableMeasure BackAnim][!RainmeterShowMeter MeterBackAnim][!RainmeterHideMeter MeterBack] [!RainmeterHideMeter MeterAnimOpen]

[MeterAnimClose]
Meter=Image
x=21
y=48
w=20
h=20
SolidColor=0, 190, 233, 0
LeftMouseDownAction=!Execute #HideItems#[!RainmeterHideMeter MeterAnimClose][!RainmeterEnableMeasure CounterHold][!RainmeterEnableMeasure BackAnimRev][!RainmeterShowMeter MeterBackAnimRev][!RainmeterHideMeter MeterBackOpen]
Hidden=1

::::::::::::::::::::::::::::::
MEASURES
::::::::::::::::::::::::::::::

[MeasureGmail]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=https://#GmailUsername#:#GmailPassword#@gmail.google.com/gmail/feed/atom
RegExp="(?siU)<fullcount>(.*)</fullcount>"
Codepage=0
Download=1
UpdateRate=3600
StringIndex=4

[MeasureNumber]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=1
UpdateRate=3600

::::::::::::::::::::::::::::::
METER
::::::::::::::::::::::::::::::

[MeterNumber]
Meter=STRING
MeasureName=MeasureNumber
X=84
Y=30
FontSize=17
StringAlign=Center
MeterStyle=StringStyle
LeftMouseUpAction=!Execute ["http://www.gmail.com/]
MouseActionCursor=1
Group=Mail
Hidden=1

[MeterOverlayNumber]
Meter=Image
W=30
H=7
X=70
Y=43
ImageName=overlay\overlay1-1.png
Group=Mail
Hidden=1

[NumberLabel]
Meter=STRING
X=84
Y=60
FontSize=8
StringAlign=Center
MeterStyle=StringStyle
Text="new"
Group=Mail
Hidden=1

[MeterOverlayLabel]
Meter=Image
W=30
H=7
X=70
Y=65
ImageName=overlay\overlay2-1.png
Group=Mail
Hidden=1

[NumberLabel1]
Meter=STRING
X=86
Y=70
FontSize=8
StringAlign=Center
MeterStyle=StringStyle
Text="message(s)"
Group=Mail
Hidden=1

[MeterOverlayLabel1]
Meter=Image
W=60
H=7
X=55
Y=75
ImageName=overlay\overlay2-1.png
Group=Mail
Hidden=1