From 6aae7433353b17aba91b92e478d5bcdc24651ad8 Mon Sep 17 00:00:00 2001 From: thatsIch Date: Thu, 15 Feb 2018 10:15:37 +0100 Subject: [PATCH] Closes #56: Migrated MediaKey, NowPlaying, RecycleManager, WebParser from plugins to measures --- Rainmeter.sublime-syntax | 17 +++++++++++++++-- messages.json | 3 ++- messages/2.19.0.md | 13 +++++++++++++ smart_completion.py | 10 +++++----- 4 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 messages/2.19.0.md diff --git a/Rainmeter.sublime-syntax b/Rainmeter.sublime-syntax index 4a878ac..0e29cfc 100644 --- a/Rainmeter.sublime-syntax +++ b/Rainmeter.sublime-syntax @@ -330,7 +330,7 @@ contexts: 4: invalid.rainmeter # - - match: "(?i)^\\s*(measure)\\s*(=)\\s*((Script|Cpu|Memory|PhysicalMemory|SwapMemory|Uptime|Net(In|Out|Total)|FreeDiskSpace|Loop|Plugin|Registry|Time|Calc|String)|\"(Script|Cpu|Memory|PhysicalMemory|SwapMemory|Uptime|Net(In|Out|Total)|FreeDiskSpace|Loop|Plugin|Registry|Time|Calc|String)\")\\s*$" + - match: "(?i)^\\s*(measure)\\s*(=)\\s*((Calc|CPU|FreeDiskSpace|Loop|MediaKey|Memory|PhysicalMemory|SwapMemory|Net(In|Out|Total)|NowPlaying|Plugin|RecycleManager|Registry|Script|String|Time|Uptime|WebParser)|\"(Calc|CPU|FreeDiskSpace|Loop|MediaKey|Memory|PhysicalMemory|SwapMemory|Net(In|Out|Total)|NowPlaying|Plugin|RecycleManager|Registry|Script|String|Time|Uptime|WebParser)\")\\s*$" scope: meta.option.measure.rainmeter captures: 1: storage.type.option.predefined.rainmeter @@ -394,13 +394,26 @@ contexts: 4: invalid.rainmeter # Rainmeter plugins - - match: "(?i)^\\s*(plugin)\\s*(=)\\s*(((Plugins\\\\)?(ActionTimer|AdvancedCPU|CoreTemp|FolderInfo|FileView|InputText|iTunesPlugin|MediaKey|NowPlaying|PerfMon|PingPlugin|PowerPlugin|Process|QuotePlugin|RecycleManager|ResMon|RunCommand|SpeedFanPlugin|SysInfo|VirtualDesktops|WebParser|WiFiStatus|AudioLevel|Win7AudioPlugin|WindowMessagePlugin)(\\.dll)?)|\"((Plugins\\\\)?(ActionTimer|AdvancedCPU|CoreTemp|FolderInfo|InputText|iTunes|MediaKey|NowPlaying|PerfMon|Ping|Power|Process|Quote|RecycleManager|ResMon|RunCommand|SpeedFan|SysInfo|VirtualDesktops|WebParser|WiFiStatus|Win7Audio|WindowMessage)(\\.dll)?)\")\\s*$" + # they might be declared as: + # - Plugin=ActionTimer + # - Plugin=ActionTimer.dll + # - Plugin=Plugins\ActionTimer.dll + - match: "(?i)^\\s*(plugin)\\s*(=)\\s*(((Plugins\\\\)?(ActionTimer|AdvancedCPU|CoreTemp|FolderInfo|FileView|InputText|iTunesPlugin|PerfMon|PingPlugin|PowerPlugin|Process|QuotePlugin|ResMon|RunCommand|SpeedFanPlugin|SysInfo|VirtualDesktops|WiFiStatus|AudioLevel|Win7AudioPlugin|WindowMessagePlugin)(\\.dll)?)|\"((Plugins\\\\)?(ActionTimer|AdvancedCPU|CoreTemp|FolderInfo|InputText|iTunes|MediaKey|NowPlaying|PerfMon|Ping|Power|Process|Quote|RecycleManager|ResMon|RunCommand|SpeedFan|SysInfo|VirtualDesktops|WebParser|WiFiStatus|Win7Audio|WindowMessage)(\\.dll)?)\")\\s*$" scope: meta.option.plugin.rainmeter captures: 1: storage.type.option.predefined.rainmeter 2: keyword.operator.option.equal.rainmeter 3: support.constant.names.rainmeter + # Deprecated plugins + # Were moved to measures; see announcement https://forum.rainmeter.net/viewtopic.php?f=13&t=27744 + - match: "(?i)^\\s*(plugin)\\s*(=)\\s*(((Plugins\\\\)?(MediaKey|NowPlaying|RecycleManager|WebParser)(\\.dll)?)|\"((Plugins\\\\)?(MediaKey|NowPlaying|RecycleManager|WebParser)(\\.dll)?)\")\\s*$" + scope: meta.option.plugin.rainmeter + captures: + 1: storage.type.option.predefined.rainmeter + 2: keyword.operator.option.equal.rainmeter + 3: invalid.deprecated.bang.rainmeter + # custom plugins - match: "(?i)^\\s*(plugin)\\s*(=)\\s*(MSIAfterburner.dll)\\s*$" scope: meta.option.plugin.rainmeter diff --git a/messages.json b/messages.json index b7079db..61a9e96 100644 --- a/messages.json +++ b/messages.json @@ -35,5 +35,6 @@ "2.15.0": "messages/2.15.0.md", "2.16.0": "messages/2.16.0.md", "2.17.0": "messages/2.17.0.md", - "2.18.0": "messages/2.18.0.md" + "2.18.0": "messages/2.18.0.md", + "2.19.0": "messages/2.19.0.md" } diff --git a/messages/2.19.0.md b/messages/2.19.0.md new file mode 100644 index 0000000..9290f47 --- /dev/null +++ b/messages/2.19.0.md @@ -0,0 +1,13 @@ +# Sublime Rainmeter Release 2.19.0 + +* Update to Rainmeter Beta 4.2 Revision 3029 +* Migrated MediaKey, NowPlaying, RecycleManager, WebParser from Plugins to Measures support + * syntax highlighting + * smart completion + * deprecation highlighting + +[Full release notes](https://github.com/thatsIch/sublime-rainmeter/releases/tag/2.19.0) + +--- + +A lot of effort has been put into Sublime Rainmeter. If you like it, star the [repository](https://github.com/thatsIch/sublime-rainmeter). diff --git a/smart_completion.py b/smart_completion.py index 2f42bdc..bd4000b 100644 --- a/smart_completion.py +++ b/smart_completion.py @@ -43,6 +43,7 @@ class MeterAutoComplete(sublime_plugin.EventListener): ["CPU", "CPU"], ["FreeDiskSpace", "FreeDiskSpace"], ["Loop", "Loop"], + ["MediaKey", "MediaKey"], # memory measure ["Memory", "Memory"], @@ -54,12 +55,15 @@ class MeterAutoComplete(sublime_plugin.EventListener): ["NetOut", "NetOut"], ["NetTotal", "NetTotal"], + ["NowPlaying", "NowPlaying"], ["Plugin", "Plugin"], + ["RecycleManager", "RecycleManager"], ["Registry", "Registry"], ["Script", "Script"], ["String", "String"], ["Time", "Time"], - ["Uptime", "Uptime"] + ["Uptime", "Uptime"], + ["WebParser", "WebParser"] ]), # meters @@ -115,19 +119,15 @@ class MeterAutoComplete(sublime_plugin.EventListener): ["FolderInfo", "FolderInfo"], ["InputText", "InputText"], ["iTunes", "iTunesPlugin"], - ["MediaKey", "MediaKey"], - ["NowPlaying", "NowPlaying"], ["PerfMon", "PerfMon"], ["Ping", "PingPlugin"], ["Power", "PowerPlugin"], ["Process", "Process"], ["Quote", "QuotePlugin"], - ["RecycleManager", "RecycleManager"], ["ResMon", "ResMon"], ["RunCommand", "RunCommand"], ["SpeedFan", "SpeedFanPlugin"], ["SysInfo", "SysInfo"], - ["WebParser", "WebParser"], ["WiFiStatus", "WiFiStatus"], ["Win7Audio", "Win7AudioPlugin"], ["WindowMessage", "WindowMessagePlugin"]