It is currently December 14th, 2018, 8:24 pm

Notepad++: Snippets for Rainmeter

Share your custom plugins and applications to enhance Rainmeter.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3053
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Notepad++: Snippets for Rainmeter

eclectic-tech » July 13th, 2015, 5:00 am

EDIT: See this post if upgrading to NOTEPAD++ V7.6
See JSMorley's post concerning changes to V7.6 of Notepad++ and the use of Rainlexer

Will work with any earlier versions of Notepad++

I have been using RainSend by JSMorley, and it works great. It runs in an external window, and switching back and forth to add code was inconvenient (for me), so I was looking for an alternative.

Recently, I started using the Snippets plugin by Frank Fesever for Notepad++ and found it more convenient because the plugin can be docked in same window as my code. I find the convenience of docked, and easily modified, snippets more productive for my coding habits.
NewRainmeterSnippetsLibraries.png
Snippets can be easily modified or added after importing. Updates of other Snippets, will not overwrite your changes.

The link above contains Snippets version 1.3 and you must install it manually. However, Notepad++ Plugin Manager offers Snippets version 1.2 and there is a no advantage to using the newer version, plus using the Plugin Manager to install is automatic!

I would recommend using Notepad++'s Plugin Manager, and select Snippets (NOT SnippetsPlus) from the 'Available' tab list, and install it (all files will be placed in the proper locations for you).

New Rainmeter Snippet Libraries

The new Snippet Libraries for Rainmeter have been separated into 2 separate libraries for easier access based on your intended use.
Separating the snippets eliminates having an extended list of items that has to be scrolled and searched.

Rainmeter Templates Library
Contains templates for measures, meters, and plugins currently available.
Trying to remember rarely used options usually means hunting through the documentation for answers.
This library has the advantage of including the options that are available for every type of measure, meter, and plugin.


Rainmeter Action Bangs Library
Contain code snippets for comparisons, mouse actions, and bangs
Some users may find this library useful for remembering the syntax of commands and to save some keystroke in coding skins.


You have a choice of importing one or both of the libraries into the Snippet addon.

Spoiler contains details on Installing/Updating Rainmeter Libraries:
The attached compressed sqlite database contains only the latest snippet libraries for Rainmeter.

(See JSMorley's post that includes screenshots explaining the process here)

Download the latest Snippets compressed file from below.
Extract the file, and remember where you extracted :)
The compressed file will extract 1 file, named: "NppSnippets.sqlite".

To update to the newest Rainmeter snippets library, you should first delete the current Rainmeter snippet libraries from the Snippet list in Notepad++. (First time users, skip this step, and go 'To add the new Rainmeter...')

To delete:
Select the Rainmeter... library from the list.
Now right-click on the drop-down list box, where it says 'Rainmeter...', and select 'Delete library...'.
A dialog box will ask if you really want to delete the Rainmeter library.
Click 'Yes'.

To add the new Rainmeter snippets:
Again right-click the drop-down list of libraries in Snippets.
Select 'Import library...'
Browse to where you saved the extracted file and select it.
From the drop-down list in the dialog box, select the Rainmeter Library you want from the list of included libraries.
Click 'Import', after a few seconds, the new snippets will be available in the Snippet's library list.
:: Version History ::
2018-06-18
> Corrected MouseAction group bang syntax for proper order

2018-05-14
> Added New Mouse bangs to Rainmeter Action Bangs library
> Renamed bangs so similar actions are grouped together

2018-05-02
> Modified UsageMonitor plugin Blacklist/Whitelist to use a pipe symbol '|' instead of a comma symbol ',' as the separator

2018-04-29
> Added Usage Monitor Plugin
> Removed deprecated AdvancedCPU, iTunes, & PerfMon plugins
> Added + Group snippet to Templates

2017-08-29
> Added FontWeight to string meter
> Corrected TransformationMatrix parameter description (skew x & skew y placements were reversed)

2016-12-09
> Added Shape meters
> Added new InputText measure options
> Note: All available Snippet Libraries are included in the zip

2016-02-03
> Added links to documentation for some of the more complicated measures/plugins
> Corrected formatting on several snippets (either no carriage return/or too many)

2016-01-27
> Separated available snippets into 2 libraries to simplify use. Eliminates having to search through a long list of options
> Measure, Meter, Plugin, and New Skin templates are in the Rainmeter Template library
> Actions, Comparison, and Bangs are in Rainmeter Action Bangs library

2015-12-28
> Details are in this update post

Older> See posts below...
You do not have the required permissions to view the files attached to this post.
Last edited by eclectic-tech on June 18th, 2018, 8:22 pm, edited 27 times in total.
User avatar
jsmorley
Developer
Posts: 18494
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Notepad++: Snippets for Rainmeter

jsmorley » July 13th, 2015, 5:02 am

Neat. I will certainly take a look at that.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3053
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

eclectic-tech » July 13th, 2015, 5:07 am

I have been 'playing' with this plugin for a few hours and it seems pretty versatile and stable... only took a short while to add all the rainmeter code snippets!

Have a look. I would be interested in your opinion...
User avatar
Active Colors
Moderator
Posts: 498
Joined: February 16th, 2012, 3:32 am

Re: Notepad++: Snippets for Rainmeter

Active Colors » July 13th, 2015, 7:37 am

I want to give it a try and make it docked as well but I can't open github because my internet provider behaves strange lately. Could you please reupload Snippets from github to e.g dropcanvas?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3053
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

eclectic-tech » July 13th, 2015, 1:37 pm

Active Colors wrote:I want to give it a try and make it docked as well but I can't open github because my internet provider behaves strange lately. Could you please reupload Snippets from github to e.g dropcanvas?
You should be able to download it from the author's site linked in the first post: Snippets.
Never looked at github for this...
User avatar
Active Colors
Moderator
Posts: 498
Joined: February 16th, 2012, 3:32 am

Re: Notepad++: Snippets for Rainmeter

Active Colors » July 14th, 2015, 7:23 am

eclectic-tech wrote: You should be able to download it from the author's site linked in the first post: Snippets.
Never looked at github for this...
The download link forwards to github
777.png
Anyways I download it from the plugin manager. But now I can't find import menu
snp.png
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3053
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

eclectic-tech » July 14th, 2015, 1:46 pm

Yes, it is not well documented...

Right-click the drop down menu, where it shows 'Templates' in your screenshot,
to access the context menu with library options.
snippetslib.png
You do not have the required permissions to view the files attached to this post.
Last edited by eclectic-tech on October 10th, 2018, 4:36 pm, edited 2 times in total.
User avatar
Active Colors
Moderator
Posts: 498
Joined: February 16th, 2012, 3:32 am

Re: Notepad++: Snippets for Rainmeter

Active Colors » July 15th, 2015, 5:19 am

Newer expected dropdown menu would have a context menu. Thanks for pointing me this. And thanks for porting snippets to the Snippets :thumbup:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3053
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

eclectic-tech » July 23rd, 2015, 3:34 am

Updated the Rainmeter Snippet library (attached file in first post was updated).
Added a few common Bang snippets! 8-)

That file contains only the Rainmeter library now. :D

I removed the duplicate libraries that are already installed with Snippets. :sly:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3053
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

eclectic-tech » November 8th, 2015, 3:13 am

Updated the RainmeterSnippets library in the first post.
Added the new SkinWidth & SkinHeight options to the [Rainmeter] section of New Skin, and also add Left|Middle|Right|MouseDownActions.