It is currently April 25th, 2024, 2:27 am

Move Skin

A package of skins with a "theme" or by a single author
smasher511
Posts: 4
Joined: January 17th, 2013, 10:23 am

Move Skin

Post by smasher511 »

Hi all,

I'm a Rainmeter noob, just recently discovered this awesome tool, 2 weeks ago. So, here is my attempt of skin.

Features:
- digital 24h clock //change digits and seconds bar color with variables
- CPU histogram
- Android mobile phone notifications for sms & calls via WIFI
- Day and date
- Customizable small bar icons //color and transparency
- Weather //current temp and desc + icon (will add +3 days onclick)
- Music player via NowPlaying plugin
- 1px thin song position
- Customizable bars //colors

Bars: (individual colors settings)
- HDDs //bar showing percentage //text showing gigs/teras left (need to adjust 1024 multiplier for gigas or tera)
- CPU //bar & text showing usage percentage
- Memory //bar - usage percentage //text - used memory in gigabytes
- Battery level for Android phones //bar - level percentage //text - lvl perc //when charging, green charging icon appears, when full red icon appears, when disconnected from AC percentage shows again
- Volume //Left mouse button - volume down //Right - volume up //Middle - next device
- Download & Upload speed //bar percentage - you need to specify your download speed in settings
- Jdownloader 1 & 2 //hides when finished
- Launcher with icons

Images go nice with darker wallpapers, I'll consider making another skin for brighter wallpapers

Weather icons:
http://yfengp.deviantart.com/art/Simple4-Weather-v1-02-4Avedesk-18989324
- other icons by me


For Android Notifications:
download:
Android notifier (both android and desktop apps)
http://code.google.com/p/android-notifier/
attached smash.zip - this is my Autoit application for fetching data from Android notifier and saving it in a nicer format for Rainmeter to read

You need to check the Execute commands options in Android Notifier Desktop Preferences, and input this:

"C:\Program Files\Rainmeter\smash.exe" "C:\Users\User\Documents\Rainmeter\Skins\smasher\meters\ring.txt" "{deviceId}" "{id}" "{type}" "{data}" "{description}"

The first one is obviously the path where you saved my smash.exe file, second one is where the file with notifications will be saved, and the others are variables from AND.

Make sure you put other filename for each notifications (ring,sms, and battery only supported by my smash.exe right now - you can use other applications)
If you change filenames (ring, sms, battery.txt) then you will need to change it in the meters.ini file as well.

Please note! While in my skin you are only getting notifications about number of calls and texts, there are other info saved in .txt file (whole sms message, sender name, sender number - same goes for calls)
When you click on the red notification circle, you execute smash.exe function for deleting the contents of either sms.txt or call.txt

Hope I didn't forget anything. Let me know what you think.
Download skin here:
http://smasher511.deviantart.com/#/d5s5n3w

Keep in mind that I'm not a programmer, nor Rainmeter experienced user, so maybe some things might have been written more wisely code-wise.

Here is Autoit source (in case you're suspicious ;) - you can compile yourself )
#include <File.au3>

$targetwritefile = $CmdLine[1]
$deviceid = $CmdLine[2]
$notificationid = $CmdLine[3]
$type = $CmdLine[4]
$datatxt = $CmdLine[5]
$description = $CmdLine[6]

$splitwithcomma=0
$splitwithdash=0
$chargestatetxt=0
$chargestate=0
$smsfrom=0
$smstext=0
$splitwithsemicollon=0
$callfrom=0
$devicefrom=0
$countlines=0
$textcontents=0
$existingfile=0

$date = ((@YEAR - 1970) * 31557600) + (int ((@YEAR - 1972) / 4) * 86400) + ((@YDAY - 1) * 86400) + (@HOUR * 3600) + (@MIN * 60) + @SEC


If $type = "BATTERY" Then
$splitwithcomma = StringSplit($description, ",")
$chargestatetxt = StringRegExpReplace($splitwithcomma[1], "[^\w ]", "")


If $chargestatetxt = "NOT Charging" Then
$chargestate = 0
ElseIf $chargestatetxt = "Charging" Then
$chargestate = 1
ElseIf $chargestatetxt = "Full" Then
$chargestate = 2
EndIf


$file = FileOpen ( $targetwritefile, 2 )
If $file = -1 Then Exit MsgBox(0, "Error", "Unable to open file.")

FileWrite ( $file, "<timestamp>" & $date & "</timestamp><deviceid>" & $deviceid & "</deviceid><id>" & $notificationid & "</id><type>" & $type & "</type><data>" & $datatxt & "</data><state>" & $chargestate & "</state><statetxt>" & $chargestatetxt & "</statetxt>" )
FileClose ( $file )

ElseIf $type = "SMS" Then


$splitwithdash = StringSplit($description, "-")

$smsfrom = StringRegExpReplace($splitwithdash[1], "SMS from ", "")
$smsfrom = StringTrimRight ( $smsfrom, 1 )
$smsfrom = StringRegExpReplace( $smsfrom, "[^\w ]", "" )

$splitwithsemicollon = StringSplit($description, ":")
$smstext = StringTrimLeft ( $splitwithsemicollon[2], 1 )

$existingfile = FileExists($targetwritefile)
$textcontents = FileRead($targetwritefile)
$countlines = _FileCountLines($targetwritefile)

If $existingfile = 0 Then
$textcontents = "<count>0</count>"
$countlines = 0
Else
$countlines = $countlines - 1
Endif

$countlines = $countlines + 1


$file = FileOpen ( $targetwritefile, 2 )
If $file = -1 Then Exit MsgBox(0, "Error", "Unable to open file.")

FileWrite ( $file, "<count>" & $countlines & "</count><timestamp>" & $date & "</timestamp><deviceid>" & $deviceid & "</deviceid><id>" & $notificationid & "</id><type>" & $type & "</type><data>" & $datatxt & "</data><smstext>" & $smstext & "</smstext><smsfrom>" & $smsfrom & "</smsfrom>" & @CRLF & $textcontents )
FileClose ( $file )

ElseIf $type = "RING" Then

$splitwithdash = StringSplit($description, "-")

$callfrom = StringTrimRight ( $splitwithdash[1], 1 )
$callfrom = StringTrimLeft ( $callfrom, 1 )

$devicefrom = $splitwithdash[2]
$devicefrom = StringReplace($devicefrom, $datatxt, "")
$devicefrom = StringTrimRight ( $devicefrom, 3 )
$devicefrom = StringTrimLeft ( $devicefrom, 1 )

$existingfile = FileExists($targetwritefile)
$textcontents = FileRead($targetwritefile)
$countlines = _FileCountLines($targetwritefile)


If $existingfile = 0 Then
$textcontents = "<count>0</count>"
$countlines = 0
Else
$countlines = $countlines - 1
Endif

$countlines = $countlines + 1

$file = FileOpen ( $targetwritefile, 2 )
If $file = -1 Then Exit MsgBox(0, "Error", "Unable to open file.")



FileWrite ( $file, "<count>" & $countlines & "</count><timestamp>" & $date & "</timestamp><deviceid>" & $deviceid & "</deviceid><id>" & $notificationid & "</id><type>" & $type & "</type><data>" & $datatxt & "</data><callfrom>" & $callfrom & "</callfrom><devicefrom>" & $devicefrom & "</devicefrom>"& @CRLF & $textcontents)
FileClose ( $file )

ElseIf $type = "EMPTY" Then

$file = FileOpen ( $targetwritefile, 2 )
If $file = -1 Then Exit MsgBox(0, "Error", "Unable to open file.")

FileWrite ( $file, "<count>0</count>" )
FileClose ( $file )

Endif
You do not have the required permissions to view the files attached to this post.