It is currently October 13th, 2024, 6:46 am

Notepad++: Snippets for Rainmeter

Plugins and Addons popular with the Community
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

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.
Snippets_Rainmeter.zip
:: Version History ::
2020-09-28
TEMPLATES
> Default Settings options added to *New skin
> Flags added to Webparser parent measure
> Process is now an internal measure
> Added - Add Meter Hidden
> Added - Add Measure Disabled
* Corrected missing '=' in Webparser parent
* Removed 'Functions' description from Measure Calc

ACTION BANGS
> Added 'Span' as an option of !SetWallpaper
> Added !EditSkin options to specify the file to edit
> Added !SetWindowPosition and !SetAnchor

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)
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: 22851
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Notepad++: Snippets for Rainmeter

Post by jsmorley »

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

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

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: 1318
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Notepad++: Snippets for Rainmeter

Post by Active Colors »

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: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

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: 1318
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Notepad++: Snippets for Rainmeter

Post by Active Colors »

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: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

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: 1318
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Notepad++: Snippets for Rainmeter

Post by Active Colors »

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: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

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: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

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.