├── settings └── language-rainmeter.cson ├── keymaps └── language-rainmeter.cson ├── menus └── language-rainmeter.cson ├── .github ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE.md ├── package.json ├── lib └── rainmeter.coffee ├── LICENSE.md ├── README.md ├── styles └── rainmeter.atom-text-editor.less └── grammars └── rainmeter.cson /settings/language-rainmeter.cson: -------------------------------------------------------------------------------- 1 | '.source.rainmeter': 2 | editor: 3 | commentStart: '; ' 4 | -------------------------------------------------------------------------------- /keymaps/language-rainmeter.cson: -------------------------------------------------------------------------------- 1 | 'atom-workspace [data-grammar="source rainmeter"]': 2 | 'ctrl-b': 'rainmeter:refresh' 3 | -------------------------------------------------------------------------------- /menus/language-rainmeter.cson: -------------------------------------------------------------------------------- 1 | 2 | 'menu': [ 3 | { 4 | 'label': 'Packages' 5 | 'submenu': [ 6 | 'label': 'Rainmeter' 7 | 'submenu': [ 8 | { 9 | 'label': 'Refresh skin' 10 | 'command': 'rainmeter:refresh' 11 | } 12 | ] 13 | ] 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | ### Types of Changes 3 | - [ ] Fix (fixes a reported issue) 4 | - [ ] New feature (adds additional functionality) 5 | 6 | ### Proposed Changes: 7 | - [Fixes #(corresponding issue number)] 8 | - 9 | - 10 | 11 | ### Additional Information 12 | If this pull request features relatively large or undiscussed changes, explain the motivation or benefits of the proposed changes. 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "language-rainmeter", 3 | "main": "./lib/rainmeter.coffee", 4 | "version": "1.7.5", 5 | "private": false, 6 | "author": "thomaskoppelaar ", 7 | "description": "Syntax highlighting and snippets for Rainmeter files", 8 | "repository": "https://github.com/thomaskoppelaar/language-rainmeter", 9 | "license": "MIT", 10 | "engines": { 11 | "atom": ">=0.50.0" 12 | }, 13 | "dependencies": {} 14 | } 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Prerequisites 2 | 3 | * [ ] You are using the most recent release of **language-rainmeter** 4 | * [ ] You have checked that your issue hasn't already been addressed by an [existing issue](https://github.com/MarcoPixel/language-rainmeter/issues?utf8=%E2%9C%93&q=is%3Aissue) 5 | 6 | ### Description 7 | 8 | [Description of the issue or enhancement] 9 | 10 | ### Steps to Reproduce 11 | 12 | 1. [First Step] 13 | 2. [Second Step] 14 | 3. [and so on...] 15 | 16 | **Expected behavior:** [What you expect to happen] 17 | 18 | **Actual behavior:** [What actually happens] 19 | 20 | **Reproduces how often:** [What percentage of the time does it reproduce?] 21 | 22 | 23 | ### Additional Information 24 | 25 | Any additional information, configuration or data that might be necessary to reproduce the issue. 26 | -------------------------------------------------------------------------------- /lib/rainmeter.coffee: -------------------------------------------------------------------------------- 1 | exec = require('child_process').exec 2 | 3 | module.exports = 4 | 5 | config: 6 | rainmeterPath: 7 | type: 'string' 8 | default: 'C:\\Program Files\\Rainmeter\\Rainmeter.exe' 9 | 10 | refreshCmd: null 11 | 12 | activate: -> 13 | refreshCmd = atom.commands.add 'atom-workspace', 'rainmeter:refresh', @refresh 14 | 15 | deactivate: -> 16 | refreshCmd.dispose() 17 | refreshCmd = null 18 | 19 | refresh: -> 20 | filepath = '' 21 | if editor = atom.workspace.getActiveTextEditor() 22 | filepath = editor.getPath() 23 | if filepath != '' 24 | if filepath.substr(-4) == '.ini' 25 | config = filepath.substring filepath.indexOf('Rainmeter\\Skins\\')+16, filepath.lastIndexOf('\\') 26 | skin = filepath.substr filepath.lastIndexOf('\\')+1 27 | rmpath = atom.config.get('language-rainmeter.rainmeterPath') 28 | exec("\"#{rmpath}\" !ActivateConfig \"#{config}\" \"#{skin}\"") 29 | exec("\"#{rmpath}\" !Refresh \"#{config}\"") 30 | else 31 | atom.notifications.addWarning 'Not a rainmeter skin', 32 | detail: 'You can only refresh skin while in the .ini file' 33 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Marco Vockner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rainmeter language syntax 2 | 3 | Adds syntax highlighting for Rainmeter files in Atom. 4 | 5 | [![version](https://img.shields.io/apm/v/language-rainmeter.svg)](https://github.com/MarcoPixel/language-rainmeter/releases/latest) 6 | [![issues](https://img.shields.io/github/issues/MarcoPixel/language-rainmeter.svg)](https://github.com/MarcoPixel/language-rainmeter/issues) 7 | [![license](https://img.shields.io/apm/l/language-rainmeter.svg)](https://github.com/MarcoPixel/language-rainmeter/blob/master/LICENSE.md) 8 | [![downloads](https://img.shields.io/apm/dm/language-rainmeter.svg)](https://atom.io/packages/language-rainmeter) 9 | 10 | 11 | 12 | ## Screenshot 13 | 14 | ![Default Theme Screenshot](https://raw.githubusercontent.com/MarcoPixel/marcopixel.github.io/master/img/Atom.png "Default Theme Screenshot") 15 | 16 | ## Install 17 | 18 | ```bash 19 | $ apm install language-rainmeter 20 | ``` 21 | 22 | Or Settings ➔ Packages ➔ Search for `language-rainmeter` 23 | 24 | # Contributing & Issues 25 | 26 | Contributions are greatly appreciated. Please fork this repository and open a pull request to add snippets, make grammar tweaks, etc. 27 | 28 | If you find any bugs or issues, please report them [here](https://github.com/MarcoPixel/language-rainmeter/issues). Please follow the existing template and fill out the necessary information, otherwise the issue will be closed. 29 | 30 | # License 31 | 32 | [MIT](https://github.com/MarcoPixel/language-rainmeter/blob/master/LICENSE.md) © [Marco Vockner](https://github.com/MarcoPixel) 33 | 34 | # Authors 35 | 36 | **Original author:** NighthawkSLO (https://github.com/NighthawkSLO) 37 | **Main contributor:** Marcopixel (https://github.com/marcopixel) 38 | **Current maintainer:** Thomaskoppelaar (https://github.com/thomaskoppelaar) -------------------------------------------------------------------------------- /styles/rainmeter.atom-text-editor.less: -------------------------------------------------------------------------------- 1 | @import "syntax-variables"; 2 | 3 | .syntax--source.syntax--rainmeter{ 4 | .syntax--section, 5 | .syntax--predefined.syntax--section{ 6 | color: @syntax-color-function; 7 | } 8 | 9 | .syntax--predefined.syntax--section{ 10 | font-weight: bold; 11 | } 12 | 13 | .syntax--variable, 14 | .syntax--predefined.syntax--variable{ 15 | color: @syntax-color-variable; 16 | } 17 | 18 | .syntax--predefined.syntax--variable{ 19 | font-style: italic; 20 | } 21 | 22 | .syntax--section.syntax--variable{ 23 | color: @syntax-color-snippet; 24 | background-color: rgba(red(@syntax-color-snippet), green(@syntax-color-snippet), blue(@syntax-color-snippet), 0.1); 25 | } 26 | 27 | .syntax--section.syntax--variable.syntax--arg{ 28 | color: @syntax-color-constant; 29 | } 30 | 31 | .syntax--invalid{ 32 | color: white; 33 | background-color: @syntax-color-removed; 34 | } 35 | 36 | .syntax--support.syntax--function{ 37 | font-style: italic; 38 | } 39 | 40 | .syntax--support.syntax--function.syntax--constant{ 41 | font-style: normal; 42 | } 43 | 44 | .syntax--deprecated.syntax--function{ 45 | color: darken(@syntax-color-modified, 50%); 46 | background-color: @syntax-color-modified; 47 | font-style: normal; 48 | } 49 | 50 | .syntax--option{ 51 | color: @syntax-color-keyword; 52 | } 53 | 54 | .syntax--meter.syntax--style.syntax--option{ 55 | font-style: italic; 56 | } 57 | 58 | .syntax--include{ 59 | font-style: italic; 60 | font-weight: bold; 61 | } 62 | 63 | .syntax--value.syntax--constant{ 64 | color: @syntax-color-class; 65 | } 66 | 67 | .syntax--value.syntax--constant.syntax--important{ 68 | font-weight: bold; 69 | } 70 | 71 | .syntax--color.syntax--r{ 72 | color: #FF5151; 73 | } 74 | .syntax--color.syntax--g{ 75 | color: #00D200; 76 | } 77 | .syntax--color.syntax--b{ 78 | color: #6262FF; 79 | } 80 | .syntax--color.syntax--a{ 81 | color: #AAAAAA; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /grammars/rainmeter.cson: -------------------------------------------------------------------------------- 1 | # general options 2 | scopeName: 'source.rainmeter' 3 | name: 'Rainmeter' 4 | fileTypes: [ 5 | 'ini' 6 | 'inc' 7 | ] 8 | patterns: [ 9 | # @include and comments 10 | {include: '#general'} 11 | 12 | # Variables section 13 | {begin: '(?i)^\\s*(\\[Variables\\])\\s*$' 14 | beginCaptures: {1: {name: 'predefined.section.rainmeter'}} 15 | end: '(?=^\\s*\\[)' 16 | patterns: [ 17 | {include: '#general'} 18 | begin: '^\\s*([^=]*)=' 19 | beginCaptures: {1: {name: 'variable.rainmeter'}} 20 | end: '$' 21 | patterns: [ 22 | {include: '#variables'} 23 | {include: '#bangs'} 24 | {include: '#math'} 25 | {include: '#colors'} 26 | ] 27 | ]} 28 | 29 | # Rainmeter section 30 | {begin: '(?i)^\\s*(\\[Rainmeter\\])\\s*$' 31 | beginCaptures: {1: {name: 'predefined.section.rainmeter'}} 32 | end: '(?=^\\s*\\[)' 33 | patterns: [ 34 | {include: '#general'} 35 | {include: '#meterActionOptions'} 36 | {begin: '(?i)^\\s*(On(Refresh|Close|(Un)?Focus|Wake)Action|(?!ContextAction1\\s*=)ContextAction\\d*)\\s*=' 37 | beginCaptures: {1: {name: 'option.rainmeter'}} 38 | end: '$' 39 | patterns: [ 40 | {include: '#variables'} 41 | {include: '#bangs'} 42 | {include: '#math'} 43 | ]} 44 | {begin: '(?i)^\\s*(DefaultUpdateDivider|AccurateText|DynamicWindowSize|ToolTipHidden|Blur)\\s*=' 45 | beginCaptures: {1: {name: 'option.rainmeter'}} 46 | end: '$' 47 | patterns: [ 48 | {match: '\\s*"?([0-1])"?(?=\\s*$)' 49 | captures: {1: {name: 'value.constant.rainmeter'}}} 50 | {include: '#variables'} 51 | {include: '#math'} 52 | ]} 53 | {match: '(?i)^\\s*(BackgroundMode)\\s*=\\s*"?(0|1|2|3|4)"?\\s*$' 54 | captures: 55 | 1: {name: 'option.rainmeter'} 56 | 2: {name: 'value.constant.rainmeter'}} 57 | {match: '(?i)^\\s*(BevelType)\\s*=\\s*"?(0|1|2)"?\\s*$' 58 | captures: 59 | 1: {name: 'option.rainmeter'} 60 | 2: {name: 'value.constant.rainmeter'}} 61 | {begin: '(?i)^\\s*((Transition)?Update|DefaultUpdateDivider|AccurateText|DynamicWindowSize|Skin(Width|Height)|DragMargins|ToolTipHidden|Image(Crop|Tint|Alpha|Flip|Rotate)|Greyscale|UseExifOrientation|ColorMatrix[1-5]|Background(Mode|Margins)?|SolidColor2?|GradientAngle|BevelType|(?!BlurRegion1)BlurRegion\\d*|Blur|SelectedColor)\\s*=' 62 | beginCaptures: {1: {name: 'option.rainmeter'}} 63 | end: '$' 64 | patterns: [ 65 | {include: '#variables'} 66 | {include: '#math'} 67 | ]} 68 | {begin: '(?i)^\\s*(DragGroup|Group|(?!ContextTitle1)ContextTitle\\d*)\\s*=' 69 | beginCaptures: {1: {name: 'option.rainmeter'}} 70 | end: '$' 71 | patterns: [ 72 | {include: '#variables'} 73 | {match: '[^\\n\"#\\[\\]]+' 74 | name: 'string.rainmeter'} 75 | ]} 76 | ]} 77 | 78 | # Metadata section 79 | {begin: '(?i)^\\s*(\\[Metadata\\])\\s*$' 80 | beginCaptures: {1: {name: 'predefined.section.rainmeter'}} 81 | end: '(?=^\\s*\\[)' 82 | patterns: [ 83 | {include: '#general'} 84 | {begin: '(?i)^\\s*(Name|Author|Information|Version|License)\\s*=' 85 | beginCaptures: {1: {name: 'option.rainmeter'}} 86 | end: '$' 87 | patterns: [ 88 | {match: '\\d' 89 | name: 'constant.numeric.rainmeter'} 90 | {match: '[^\\d\\n\"#\\[\\]]+' 91 | name: 'string.rainmeter'} 92 | {include: '#variables'} 93 | ]} 94 | ]} 95 | 96 | # Meters and Measures 97 | {begin: '(?i)^\\s*(\\[(?!Rainmeter|Variables|Metadata)[^\\s#@%]+\\])\\s*$' 98 | beginCaptures: {1: {name: 'section.rainmeter'}} 99 | end: '(?=^\\s*\\[)' 100 | patterns: [ 101 | {include: '#general'} 102 | {include: '#meterActionOptions'} 103 | # Meter 104 | {match: '(?i)^\\s*(Meter)\\s*=\\s*"?(Bar|Bitmap|Button|Histogram|Image|Line|Rotator|Roundline|String|Shape)"?\\s*$' 105 | captures: 106 | 1: {name: 'option.rainmeter'} 107 | 2: {name: 'value.constant.important.rainmeter'}} 108 | 109 | # Measure 110 | {match: '(?i)^\\s*(Measure)\\s*=\\s*"?(Calc|Cpu|FreeDiskSpace|Loop|(?:Physical|Swap)?Memory|Net|Plugin|Registry|Script|String|(?:Up)?Time)"?\\s*$' 111 | captures: 112 | 1: {name: 'option.rainmeter'} 113 | 2: {name: 'value.constant.important.rainmeter'}} 114 | # Plugin 115 | {match: '(?i)^\\s*(Plugin)\\s*=\\s*"?(ActionTimer|AdvancedCPU|AudioLevel|CoreTemp|FileView|FolderInfo|InputText|iTunes|MediaKey|NowPlaying|PerfMon|PingPlugin|PowerPlugin|Process|QuotePlugin|RecycleManager|ResMon|RunCommand|SpeedFanPlugin|SysInfo|VirtualDesktops|WebParser|WiFiStatus|Win7AudioPlugin|WindowMessagePlugin)"?\\s*$' 116 | captures: 117 | 1: {name: 'option.rainmeter'} 118 | 2: {name: 'value.constant.important.rainmeter'}} 119 | # Options that have specific values 120 | {match: '(?i)^\\s*((?:Mask)?ImageFlip)\\s*=\\s*"?(None|Horizontal|Vertical|Both)"?\\s*$' 121 | captures: 122 | 1: {name: 'option.rainmeter'} 123 | 2: {name: 'value.constant.rainmeter'}} 124 | {match: '(?i)^\\s*(ToolTipIcon)\\s*=\\s*"?(Info|Warning|Error|Question|Shield)"?\\s*$' 125 | captures: 126 | 1: {name: 'option.rainmeter'} 127 | 2: {name: 'value.constant.rainmeter'}} 128 | {match: '(?i)^\\s*((?:Bar|Graph)Orientation)\\s*=\\s*"?(Horizontal|Vertical)"?\\s*$' 129 | captures: 130 | 1: {name: 'option.rainmeter'} 131 | 2: {name: 'value.constant.rainmeter'}} 132 | {match: '(?i)^\\s*(BitmapAlign)\\s*=\\s*"?(Left|Center|Right)"?\\s*$' 133 | captures: 134 | 1: {name: 'option.rainmeter'} 135 | 2: {name: 'value.constant.rainmeter'}} 136 | {match: '(?i)^\\s*(GraphStart)\\s*=\\s*"?(Left|Right)"?\\s*$' 137 | captures: 138 | 1: {name: 'option.rainmeter'} 139 | 2: {name: 'value.constant.rainmeter'}} 140 | {match: '(?i)^\\s*(StringAlign)\\s*=\\s*"?((?:Left|Right|Center)(?:|Top|Bottom|Center))"?\\s*$' 141 | captures: 142 | 1: {name: 'option.rainmeter'} 143 | 2: {name: 'value.constant.rainmeter'}} 144 | {match: '(?i)^\\s*(StringStyle)\\s*=\\s*"?(Normal|Bold|Italic|BoldItalic)"?\\s*$' 145 | captures: 146 | 1: {name: 'option.rainmeter'} 147 | 2: {name: 'value.constant.rainmeter'}} 148 | {match: '(?i)^\\s*(StringCase)\\s*=\\s*"?(None|Upper|Lower|Proper)"?\\s*$' 149 | captures: 150 | 1: {name: 'option.rainmeter'} 151 | 2: {name: 'value.constant.rainmeter'}} 152 | {match: '(?i)^\\s*(StringEffect)\\s*=\\s*"?(None|Shadow|Border)"?\\s*$' 153 | captures: 154 | 1: {name: 'option.rainmeter'} 155 | 2: {name: 'value.constant.rainmeter'}} 156 | {match: '(?i)^\\s*(FontWeight)\\s*=\\s*"?(100|200|300|400|500|600|700|800|900|950)"?\\s*$' 157 | captures: 158 | 1: {name: 'option.rainmeter'} 159 | 2: {name: 'value.constant.rainmeter'}} 160 | {match: '(?i)^\\s*((?!InlineSetting1)InlineSetting\\d*)\\s*=\\s*"?((Face|Size|Color|Weight|Case|CharacterSpacing|Italic|Oblique|Underline|Strikethrough|Shadow|Strech|Typography|GradientColor|None)(?=\\s*\\|.*)|\\s*$)' 161 | captures: 162 | 1: {name: 'option.rainmeter'} 163 | 2: {name: 'value.constant.rainmeter'}} 164 | {match: '(?i)^\\s*(RegHKey)\\s*=\\s*"?(HKEY_(CURRENT_(CONFIG|USER)|LOCAL_MACHINE|CLASSES_ROOT|(PERFORMANCE|DYN)_DATA))"?\\s*$' 165 | captures: 166 | 1: {name: 'option.rainmeter'} 167 | 2: {name: 'value.constant.rainmeter'}} 168 | {match: '(?i)^\\s*(AutoScale)\\s*=\\s*"?(0|[1-2]k?)"?\\s*$' 169 | captures: 170 | 1: {name: 'option.rainmeter'} 171 | 2: {name: 'value.constant.rainmeter'}} 172 | {match: '(?i)^\\s*(BevelType|PreserveAspectRatio|ClipString)\\s*=\\s*"?([0-2])"?\\s*$' 173 | captures: 174 | 1: {name: 'option.rainmeter'} 175 | 2: {name: 'value.constant.rainmeter'}} 176 | 177 | # ----- PLUGINS ----- 178 | 179 | # ActionTimer 180 | {begin: '(?i)^\\s*((?!ActionList\\s*=)ActionList\\d*)\\s*=' 181 | beginCaptures: {1: {name: 'option.rainmeter'}} 182 | end: '$' 183 | patterns: [ 184 | {match: 'Repeat|Wait' 185 | name: 'support.function.constant.rainmeter'} 186 | {include: '#variables'} 187 | ]} 188 | {begin: '(?i)^\\s*(IgnoreWarnings)\\s*=' 189 | beginCaptures: {1: {name: 'option.rainmeter'}} 190 | end: '$' 191 | patterns: [ 192 | {match: '\\s*"?([0-1])"?(?=\\s*$)' 193 | captures: {1: {name: 'value.constant.rainmeter'}}} 194 | {include: '#variables'} 195 | {include: '#math'} 196 | ]} 197 | 198 | # AdvancedCPU plugin 199 | {match: '(?i)^\\s*(TopProcess)\\s*=\\s*"?(1|2)"?\\s*$' 200 | captures: 201 | 1: {name: 'option.rainmeter'} 202 | 2: {name: 'value.constant.rainmeter'}} 203 | {begin: '(?i)^\\s*(CPUInclude|CPUExclude|TopProcess)\\s*=' 204 | beginCaptures: {1: {name: 'option.rainmeter'}} 205 | end: '$' 206 | patterns: [ 207 | {include: '#variables'} 208 | ]} 209 | 210 | # AudioLevel + FileView types 211 | {match: '(?i)^\\s*(Port)\\s*=\\s*"?(Output|Input)"?\\s*$' 212 | captures: 213 | 1: {name: 'option.rainmeter'} 214 | 2: {name: 'value.constant.rainmeter'}} 215 | {match: '(?i)^\\s*(Type)\\s*=\\s*"?(RMS|Peak|FFT|FFTFreq|Band|BandFreq|Format|DeviceStatus|DeviceName|DeviceID|DeviceList|FolderPath|FolderSize|FileCount|FolderCount|FileName|FileType|FileSize|FileDate|FilePath|PathToFile|Icon)"?\\s*$' 216 | captures: 217 | 1: {name: 'option.rainmeter'} 218 | 2: {name: 'value.constant.rainmeter'}} 219 | {match: '(?i)^\\s*(Channel)\\s*=\\s*"?(L|FL|0|R|FR|1|C|2|LFE|Sub|3|BL|4|BR|5|SL|6|SR|7|Sum|Avg)"?\\s*$' 220 | captures: 221 | 1: {name: 'option.rainmeter'} 222 | 2: {name: 'value.constant.rainmeter'}} 223 | {begin: '(?i)^\\s*(Port|ID|RMSAttack|RMSDecay|RMSGain|PeakAttack|PeakDecay|PeakGain|FFTSize|FFTOverlap|FFTAttack|FFTDecay|Bands|FreqMin|FreqMax|Sensitivity|Parent|Channel|Type|FFTIdx|BandIdx)\\s*=' 224 | beginCaptures: {1: {name: 'option.rainmeter'}} 225 | end: '$' 226 | patterns: [ 227 | {include: '#variables'} 228 | ]} 229 | 230 | # CoreTemp 231 | {match: '(?i)^\\s*(SortType)\\s*=\\s*"?(Name|Size|Type|Date)"?\\s*$' 232 | captures: 233 | 1: {name: 'option.rainmeter'} 234 | 2: {name: 'value.constant.rainmeter'}} 235 | {match: '(?i)^\\s*(SortDateType)\\s*=\\s*"?(Modified|Created|Accessed)"?\\s*$' 236 | captures: 237 | 1: {name: 'option.rainmeter'} 238 | 2: {name: 'value.constant.rainmeter'}} 239 | {match: '(?i)^\\s*(DateType)\\s*=\\s*"?(Modified|Created|Accessed)"?\\s*$' 240 | captures: 241 | 1: {name: 'option.rainmeter'} 242 | 2: {name: 'value.constant.rainmeter'}} 243 | {match: '(?i)^\\s*(IconSize)\\s*=\\s*"?(Small|Medium|Large|ExtraLarge)"?\\s*$' 244 | captures: 245 | 1: {name: 'option.rainmeter'} 246 | 2: {name: 'value.constant.rainmeter'}} 247 | {match: '(?i)^\\s*(CoreTempType)\\s*=\\s*"?(CpuName|CpuSpeed|MaxTemperature|BusSpeed|BusMultiplier|Vid|Tdp|Power|Temperature|TjMax|CoreBusMultiplier|CoreSpeed|Load)"?\\s*$' 248 | captures: 249 | 1: {name: 'option.rainmeter'} 250 | 2: {name: 'value.constant.rainmeter'}} 251 | {begin: '(?i)^\\s*(CoreTempType|CoreTempIndex)\\s*=' 252 | beginCaptures: {1: {name: 'option.rainmeter'}} 253 | end: '$' 254 | patterns: [ 255 | {include: '#variables'} 256 | ]} 257 | 258 | # FileView 259 | # TODO Add begin/end pattern for matching Type when Plugin is FileView 260 | # This is currently not possible because there is no multi-line lookahead in Atom grammars. 261 | {begin: '(?i)^\\s*(Recursive|Count|ShowDotDot|ShowFolder|ShowFile|ShowHidden|ShowSystem|HideExtensions|SortAscending|Index|IgnoreCount)\\s*=' 262 | beginCaptures: {1: {name: 'option.rainmeter'}} 263 | end: '$' 264 | patterns: [ 265 | {match: '\\s*"?([0-1])"?(?=\\s*$)' 266 | captures: {1: {name: 'value.constant.rainmeter'}}} 267 | {include: '#variables'} 268 | {include: '#math'} 269 | ]} 270 | {begin: '(?i)^\\s*(Path|FinishAction|Recursive|Count|ShowDotDot|ShowFolder|ShowFile|ShowHidden|ShowSystem|HideExtensions|Extension|SortType|SortDateType|SortAscending|WildcardSearch|Index|IgnoreCount|Type|DateType|IconPath|IconSize)\\s*=' 271 | beginCaptures: {1: {name: 'option.rainmeter'}} 272 | end: '$' 273 | patterns: [ 274 | {include: '#variables'} 275 | ]} 276 | 277 | # FolderInfo 278 | {begin: '(?i)^\\s*(IncludeSubFolders|IncludeHiddenFiles|IncludeSystemFiles)\\s*=' 279 | beginCaptures: {1: {name: 'option.rainmeter'}} 280 | end: '$' 281 | patterns: [ 282 | {match: '\\s*"?([0-1])"?(?=\\s*$)' 283 | captures: {1: {name: 'value.constant.rainmeter'}}} 284 | {include: '#variables'} 285 | {include: '#math'} 286 | ]} 287 | {begin: '(?i)^\\s*(Folder|InfoType|RegExpFilter|IncludeSubFolders|IncludeHiddenFiles|IncludeSystemFiles)\\s*=' 288 | beginCaptures: {1: {name: 'option.rainmeter'}} 289 | end: '$' 290 | patterns: [ 291 | {include: '#variables'} 292 | ]} 293 | 294 | # InputText 295 | {begin: '(?i)^\\s*((?!Command\\s*=)Command\\d*)\\s*=' 296 | beginCaptures: {1: {name: 'option.rainmeter'}} 297 | end: '$' 298 | patterns: [ 299 | {include: '#variables'} 300 | {include: '#bangs'} 301 | ]} 302 | {begin: '(?i)^\\s*(DefaultValue|Password|InputLimit|InputNumber|TopMost|FocusDismiss|OnDismissAction)\\s*=' 303 | beginCaptures: {1: {name: 'option.rainmeter'}} 304 | end: '$' 305 | patterns: [ 306 | {include: '#variables'} 307 | ]} 308 | 309 | # NowPlaying 310 | {match: '(?i)^\\s*(PlayerName)\\s*=\\s*"?(AIMP|CAD|iTunes|CAD|MediaMonkey|Winamp|WMP|Spotify|WLM)"?\\s*$' 311 | captures: 312 | 1: {name: 'option.rainmeter'} 313 | 2: {name: 'value.constant.rainmeter'}} 314 | {match: '(?i)^\\s*(PlayerType)\\s*=\\s*"?(Artist|Album|Title|Number|Year|Genre|Cover|File|Duration|Position|Progress|Rating|Repeat|Shuffle|State|Status|Volume)"?\\s*$' 315 | captures: 316 | 1: {name: 'option.rainmeter'} 317 | 2: {name: 'value.constant.rainmeter'}} 318 | {begin: '(?i)^\\s*(PlayerName|PlayerType)\\s*=' 319 | beginCaptures: {1: {name: 'option.rainmeter'}} 320 | end: '$' 321 | patterns: [ 322 | {include: '#variables'} 323 | ]} 324 | 325 | # PerfMon 326 | {begin: '(?i)^\\s*(PerfMonObject|PerfMonCounter|PerfMonInstance|PerfMonDifference)\\s*=' 327 | beginCaptures: {1: {name: 'option.rainmeter'}} 328 | end: '$' 329 | patterns: [ 330 | {include: '#variables'} 331 | ]} 332 | 333 | # Ping 334 | {begin: '(?i)^\\s*(DestAddress|UpdateRate|Timeout|TimeoutValue|FinishAction)\\s*=' 335 | beginCaptures: {1: {name: 'option.rainmeter'}} 336 | end: '$' 337 | patterns: [ 338 | {include: '#variables'} 339 | ]} 340 | 341 | # PowerPlugin 342 | {match: '(?i)^\\s*(PowerState)\\s*=\\s*"?(ACLine|Status|Status2|Lifetime|Percent|Hz|MHz)"?\\s*$' 343 | captures: 344 | 1: {name: 'option.rainmeter'} 345 | 2: {name: 'value.constant.rainmeter'}} 346 | 347 | # Process 348 | {begin: '(?i)^\\s*(ProcessName)\\s*=' 349 | beginCaptures: {1: {name: 'option.rainmeter'}} 350 | end: '$' 351 | patterns: [ 352 | {include: '#variables'} 353 | ]} 354 | 355 | # Quote 356 | {begin: '(?i)^\\s*(Subfolders)\\s*=' 357 | beginCaptures: {1: {name: 'option.rainmeter'}} 358 | end: '$' 359 | patterns: [ 360 | {match: '\\s*"?([0-1])"?(?=\\s*$)' 361 | captures: {1: {name: 'value.constant.rainmeter'}}} 362 | {include: '#variables'} 363 | {include: '#math'} 364 | ]} 365 | {begin: '(?i)^\\s*(PathName|Seperator|Subfolders|FileFilter)\\s*=' 366 | beginCaptures: {1: {name: 'option.rainmeter'}} 367 | end: '$' 368 | patterns: [ 369 | {include: '#variables'} 370 | ]} 371 | 372 | # RecycleManager 373 | {match: '(?i)^\\s*(RecycleType)\\s*=\\s*"?(Count|Size)"?\\s*$' 374 | captures: 375 | 1: {name: 'option.rainmeter'} 376 | 2: {name: 'value.constant.rainmeter'}} 377 | 378 | # ResMon 379 | {match: '(?i)^\\s*(ResCountType)\\s*=\\s*"?(GDI|USER|Handle|Window)"?\\s*$' 380 | captures: 381 | 1: {name: 'option.rainmeter'} 382 | 2: {name: 'value.constant.rainmeter'}} 383 | 384 | # RunCommand 385 | {match: '(?i)^\\s*(State)\\s*=\\s*"?(Hide|Show|Minimized|Maximized)"?\\s*$' 386 | captures: 387 | 1: {name: 'option.rainmeter'} 388 | 2: {name: 'value.constant.rainmeter'}} 389 | {match: '(?i)^\\s*(OutputType)\\s*=\\s*"?(UTF-16|UTF-8|ANSI)"?\\s*$' 390 | captures: 391 | 1: {name: 'option.rainmeter'} 392 | 2: {name: 'value.constant.rainmeter'}} 393 | {begin: '(?i)^\\s*(Program|Parameter|State|FinishAction|OutputFile|OutputType|StartInFolder|Timeout)\\s*=' 394 | beginCaptures: {1: {name: 'option.rainmeter'}} 395 | end: '$' 396 | patterns: [ 397 | {include: '#variables'} 398 | ]} 399 | 400 | # RunCommand 401 | {match: '(?i)^\\s*(SpeedFanType)\\s*=\\s*"?(Temperature|Fan|Voltage)"?\\s*$' 402 | captures: 403 | 1: {name: 'option.rainmeter'} 404 | 2: {name: 'value.constant.rainmeter'}} 405 | {match: '(?i)^\\s*(SpeedFanScale)\\s*=\\s*"?(C|F|K)"?\\s*$' 406 | captures: 407 | 1: {name: 'option.rainmeter'} 408 | 2: {name: 'value.constant.rainmeter'}} 409 | {begin: '(?i)^\\s*(SpeedFanType|SpeedFanNumber|SpeedFanScale)\\s*=' 410 | beginCaptures: {1: {name: 'option.rainmeter'}} 411 | end: '$' 412 | patterns: [ 413 | {include: '#variables'} 414 | ]} 415 | 416 | # SysInfo 417 | {match: '(?i)^\\s*(SysInfoType)\\s*=\\s*"?(COMPUTER_NAME|USER_NAME|USER_LOGONTIME|OS_VERSION|OS_BITS|PAGESIZE|IDLE_TIME|HOST_NAME|DOMAIN_NAME|DOMAINWORKGROUP|DNS_SERVER|ADAPTER_DESCRIPTION|ADAPTER_TYPE|NET_MASK|IP_ADDRESS|GATEWAY_ADDRESS|LAN_CONNECTIVITY|INTERNET_CONNECTIVITY|NUM_MONITORS|SCREEN_SIZE|SCREEN_WIDTH|SCREEN_HEIGHT|VIRTUAL_SCREEN_TOP|VIRTUAL_SCREEN_LEFT|VIRUTAL_SCREEN_WIDTH|VIRUTAL_SCREEN_HEIGHT|WORK_AREA|WORK_AREA_TOP|WORK_AREA_LEFT|WORK_AREA_WIDTH|WORK_AREA_HEIGHT|TIMEZONE_ISDST|TIMEZONE_BIAS|TIMEZONE_STANDART_NAME|TIMEZONE_STANDARD_BIAS|TIMEZONE_DAYLIGHT_NAME|TIMEZONE_DAYLIGHT_BIAS)"?\\s*$' 418 | captures: 419 | 1: {name: 'option.rainmeter'} 420 | 2: {name: 'value.constant.rainmeter'}} 421 | {match: '(?i)^\\s*(SysInfoData)\\s*=\\s*"?(Best)"?\\s*$' 422 | captures: 423 | 1: {name: 'option.rainmeter'} 424 | 2: {name: 'value.constant.rainmeter'}} 425 | {begin: '(?i)^\\s*(SysInfoType|SysInfoData)\\s*=' 426 | beginCaptures: {1: {name: 'option.rainmeter'}} 427 | end: '$' 428 | patterns: [ 429 | {include: '#variables'} 430 | ]} 431 | 432 | # WebParser 433 | {begin: '(?i)^\\s*(Download|LogSubstringErrors|ForceReload)\\s*=' 434 | beginCaptures: {1: {name: 'option.rainmeter'}} 435 | end: '$' 436 | patterns: [ 437 | {match: '\\s*"?([0-1])"?(?=\\s*$)' 438 | captures: {1: {name: 'value.constant.rainmeter'}}} 439 | {include: '#variables'} 440 | {include: '#math'} 441 | ]} 442 | {match: '(?i)^\\s*(DecodeCharacterReference)\\s*=\\s*"?(0|1|2|3)"?\\s*$' 443 | captures: 444 | 1: {name: 'option.rainmeter'} 445 | 2: {name: 'value.constant.rainmeter'}} 446 | {match: '(?i)^\\s*(Debug)\\s*=\\s*"?(0|1|2)"?\\s*$' 447 | captures: 448 | 1: {name: 'option.rainmeter'} 449 | 2: {name: 'value.constant.rainmeter'}} 450 | {begin: '(?i)^\\s*(URL|RegExp|StringIndex|StringIndex2|UpdateRate|DecodeCharacterReference|Debug|Debug2File|Download|DownloadFile|ErrorString|LogSubstringErrors|ForceReload|CodePage|ProxyServer|UserAgent)\\s*=' 451 | beginCaptures: {1: {name: 'option.rainmeter'}} 452 | end: '$' 453 | patterns: [ 454 | {include: '#variables'} 455 | ]} 456 | 457 | # WiFiStatus 458 | {match: '(?i)^\\s*(WiFiInfoType)\\s*=\\s*"?(SSID|Quality|Encryption|AUTH|PHY|List)"?\\s*$' 459 | captures: 460 | 1: {name: 'option.rainmeter'} 461 | 2: {name: 'value.constant.rainmeter'}} 462 | {match: '(?i)^\\s*(WiFiListStyle)\\s*=\\s*"?(0|1|2|3)"?\\s*$' 463 | captures: 464 | 1: {name: 'option.rainmeter'} 465 | 2: {name: 'value.constant.rainmeter'}} 466 | {begin: '(?i)^\\s*(WiFiInfoType|WiFiIntfID|WiFiListStyle|WiFiListLimit)\\s*=' 467 | beginCaptures: {1: {name: 'option.rainmeter'}} 468 | end: '$' 469 | patterns: [ 470 | {include: '#variables'} 471 | ]} 472 | 473 | # WindowMessagePlugin 474 | {begin: '(?i)^\\s*(WindowName|WindowClass|WindowMessage)\\s*=' 475 | beginCaptures: {1: {name: 'option.rainmeter'}} 476 | end: '$' 477 | patterns: [ 478 | {include: '#variables'} 479 | ]} 480 | 481 | # Shape options 482 | {match: '(?i)^\\s*((?!Shape1\\s*=)Shape\\d*)\\s*=\\s*"?(Ellipse|Rectangle|Line|Arc|Curve|Path|Combine)\\s*' 483 | captures: 484 | 1: {name: 'option.rainmeter'} 485 | 2: {name: 'value.constant.rainmeter'}} 486 | {include: '#variables'} 487 | {include: '#colors'} 488 | {match: '(?i)\\s*(Fill Color|Stroke Color|Stroke(Width|Dashes|DashOffset|DashCap|StartCap|EndCap|LineJoin)|Scale|Rotate|Skew|Offset|TransformOrder|Extend|Fill|(Linear|Radial)Gradient|Union|Intersect|XOR|Exclude)\\b' 489 | captures: 490 | 1: {name: 'value.constant.rainmeter'}} 491 | 492 | # 1/0 options 493 | {begin: '(?i)^\\s*(Hidden|AntiAlias|Greyscale|UseExifOrientation|ToolTipType|ToolTipHidden|Flip|BitmapZeroFrame|BitmapExtend|Tile|HorizontalLines|Solid|ControlAngle|Percentual|InvertMeasure|DynamicVariables|Disabled|Paused|IfConditionMode|IfMatchMode|RegExpSubstitute|UpdateRandom|UniqueRandom|Total|Label|Type|IgnoreRemovable|DiskQuota|Cumulative|DaylightSavingTime|AddDaysToHours|MouseActionCursor)\\s*=' 494 | beginCaptures: {1: {name: 'option.rainmeter'}} 495 | end: '$' 496 | patterns: [ 497 | {match: '\\s*"?([0-1])"?(?=\\s*$)' 498 | captures: {1: {name: 'value.constant.rainmeter'}}} 499 | {include: '#variables'} 500 | {include: '#math'} 501 | ]} 502 | 503 | # All other options 504 | {begin: '(?i)^\\s*(MeterStyle|(?!MeasureName1)MeasureName\\d*|BevelType|AntiAlias|DynamicVariables|Greyscale|(Mask)?Image(Path|Flip|Name)|UseExifOrientation|ColorMatrixN|ToolTip(Text|Icon|Type|Hidden)|BarImage|BarOrientation|Flip|Bitmap(Image|ZeroFrame|Extend)|ButtonImage|Autoscale|Graph(Start|Orientation)|(Primary|Secondary|Both)Image(Path|Flip)?|PreserveAspectRatio|Tile|HorizontalLines|GraphStart|GraphOrientation|ControlAngle|String(Align|Style|Case|Effect)|ClipString|Percentual|(?!InlineSetting1)Inline(Setting)\\d*|Disabled|Paused|IfConditionMode|IfMatchMode|Substitute|RegExpSubstitute|(Update|Unique)Random|Processor|Drive|Total|Label|Type|IgnoreRemovable|DiskQuota|Interface|Cumulative|Reg(HKey|Value)|ScriptFile|TimeStamp|DaylightSavingTime|AddDaysToHours|(?!If(Above|Below|Equal)Action1)If(Above|Below|Equal)Action\\d*|(?!If(Match|NotMatch|True|False)Action1)If(Match|NotMatch|True|False)Action\\d*)\\s*=' 505 | beginCaptures: {1: {name: 'option.rainmeter'}} 506 | end: '$' 507 | patterns: [ 508 | {include: '#variables'} 509 | ]} 510 | 511 | # Number options 512 | {begin: '(?i)^\\s*(Padding|UpdateDivider|GradientAngle|TransformationMatrix|Image(Crop|Alpha|Rotate)|ColorMatrix[1-5]|ToolTipWidth|BarBorder|Bitmap(Transition)?Frames|Bitmap(Digits|Separation)|(Primary|Secondary|Both)Image(Crop|Alpha|Rotate|ColorMatrix[1-5])|ScaleMargins|MaskImageRotate|Line(Count|Width|Length|Start)|(?!Scale1)Scale\\d*|Offset(X|Y)|(Start|Rotation)Angle|ValueRemainder|(Start|Length)Shift|FontSize|ClipString(W|H)|Angle|NumOfDecimals|(Max|Min)Value|AverageSize|(?!If(Above|Below|Equal)Value1)If(Above|Below|Equal)Value\\d*|(?!IfCondition1)IfCondition\\d*|(?!If(Match|NotMatch)1)If(Match|NotMatch)\\d*|(Low|High)Bound|(Start|End)Value|Increment|LoopCount|SecondsValue)\\s*=' 513 | beginCaptures: {1: {name: 'option.rainmeter'}} 514 | end: '$' 515 | patterns: [ 516 | {include: '#variables'} 517 | {include: '#math'} 518 | 519 | # Color options 520 | ]} 521 | {begin: '(?i)^\\s*(SolidColor2?|ImageTint|(Bar|Primary|Secondary|Both|HorizontalLine|Font(Effect)?)Color|(?!LineColor1)LineColor\\d*)\\s*=' 522 | beginCaptures: {1: {name: 'option.rainmeter'}} 523 | end: '$' 524 | patterns: [ 525 | {include: '#variables'} 526 | {include: '#colors'} 527 | ]} 528 | 529 | # X/Y/W/H options 530 | {begin: '(?i)^\\s*(X|Y|W|H)\\s*=' 531 | beginCaptures: {1: {name: 'option.rainmeter'}} 532 | end: '$' 533 | patterns: [ 534 | {match: '(?i)r' 535 | name: 'support.function.constant.rainmeter'} 536 | {include: '#variables'} 537 | {include: '#math'} 538 | ]} 539 | 540 | # Format 541 | {begin: '(?i)^\\s*((TimeStamp)?Format)\\s*=' 542 | beginCaptures: {1: {name: 'option.rainmeter'}} 543 | end: '$' 544 | patterns: [ 545 | {match: '%([aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%]|#?[cdHIjmMSUwWxyY]|E?[cCxXyY]|O?[deHImMSuUVwWy])' 546 | name: 'support.function.constant.rainmeter'} 547 | {match: '.' 548 | name: 'string.rainmeter'} 549 | {include: '#variables'} 550 | ]} 551 | 552 | # Formula 553 | {begin: '(?i)^\\s*(Formula)\\s*=' 554 | beginCaptures: {1: {name: 'option.rainmeter'}} 555 | end: '$' 556 | patterns: [ 557 | {match: 'Random|Counter' 558 | name: 'support.function.constant.rainmeter'} 559 | {include: '#variables'} 560 | {include: '#math'} 561 | ]} 562 | 563 | # Text 564 | {begin: '(?i)^\\s*((ToolTip)?Text)\\s*=' 565 | beginCaptures: {1: {name: 'option.rainmeter'}} 566 | end: '$' 567 | patterns: [ 568 | {match: '%\\d' 569 | name: 'support.function.constant.rainmeter'} 570 | {match: '[^\\n#\\[\\]%]+' 571 | name: 'string.rainmeter'} 572 | {include: '#variables'} 573 | ]} 574 | {begin: '(?i)^\\s*(Group|ToolTipTitle|(Pre|Post)fix|FontFace|(?!InlinePattern1)InlinePattern\\d*|Substitute|RegKey|String)\\s*=' 575 | beginCaptures: {1: {name: 'option.rainmeter'}} 576 | end: '$' 577 | patterns: [ 578 | {include: '#variables'} 579 | {match: '[^\\n#\\[\\]]+' 580 | name: 'string.rainmeter'} 581 | ]} 582 | ]} 583 | ] 584 | 585 | # Storage 586 | repository: 587 | 588 | # Comments 589 | comments: 590 | match: '^\\s*;.*$' 591 | name: 'comment.line.rainmeter' 592 | 593 | # @include 594 | include: 595 | begin: '(?i)^\\s*(@include[^\\s=]*)=' 596 | beginCaptures: {1: {name: 'option.include.rainmeter'}} 597 | end: '$' 598 | patterns: [ 599 | {include: '#variables'} 600 | ] 601 | 602 | # Comments and @include merged 603 | general: 604 | patterns: [ 605 | {include: '#comments'} 606 | {include: '#include'} 607 | ] 608 | 609 | # Section variables and their arguments 610 | sectionVars: 611 | match: '(\\[\\w+)(:(|(?i)X|Y|W|H|EscapeRegExp|EncodeURL|Timestamp|(Min|Max)Value|(\\/[+-]?\\d+|%)(,\\d+,?)?|\\d+))?(\\])' 612 | captures: 613 | 1: {name: 'section.variable.rainmeter'} 614 | 2: {name: 'section.variable.arg.rainmeter'} 615 | 7: {name: 'section.variable.rainmeter'} 616 | 617 | # Enviroment variables 618 | enviromentVars: 619 | match: '%[A-Za-z][0-9a-zA-Z_]+?%' 620 | name: 'predefined.variable.rainmeter' 621 | 622 | # Built in variables 623 | builtInVars: 624 | match: '(?i)#(@|PROGRAMDRIVE|PROGRAMPATH|SETTINGSPATH|SKINSPATH|PLUGINSPATH|ADDONSPATH|CURRENTPATH|ROOTCONFIGPATH|CURRENTFILE|CURRENTCONFIG|CURRENTSECTION|CURRENTCONFIGWIDTH|CURRENTCONFIGHEIGHT|CURRENTCONFIGX|CURRENTCONFIGY|[Pp]?WORKAREAX|[Pp]?WORKAREAY|[Pp]?WORKAREAWIDTH|[Pp]?WORKAREAHEIGHT|[PpVv]?SCREENAREAWIDTH|[PpVv]?SCREENAREAHEIGHT|CRLF|WORKAREAWIDTH|WORKAREAHEIGHT|[PpVv]?SCREENAREAX|[PpVv]?SCREENAREAY|WORKAREAX@\\d+|WORKAREAY@\\d+|WORKAREAWIDTH@\\d+|WORKAREAHEIGHT@\\d+|SCREENAREAX@\\d+|SCREENAREAY@\\d+|SCREENAREAWIDTH@\\d+|SCREENAREAHEIGHT@\\d+)#' 625 | name: 'predefined.variable.rainmeter' 626 | 627 | # Event variables 628 | eventVars: 629 | match: '(?i)\\$(Mouse(X|Y)(:%)?|Userinput)\\$' 630 | name: 'predefined.variable.rainmeter' 631 | 632 | # Character Reference Variables 633 | charReferenceVars: 634 | match: '(\\[\\\\*.+?\\])' 635 | name: 'support.function.constant.rainmeter' 636 | 637 | # All other - normal variables 638 | normalVars: 639 | match: '(?!#\\*.+?\\*#)#[\\w\\-]+#' 640 | name: 'variable.rainmeter' 641 | 642 | # All the variables combined 643 | variables: 644 | patterns: [ 645 | {include: '#sectionVars'} 646 | {include: '#enviromentVars'} 647 | {include: '#builtInVars'} 648 | {include: '#eventVars'} 649 | {include: '#charReferenceVars'} 650 | {include: '#normalVars'} 651 | ] 652 | 653 | # All Bangs 654 | bangs: 655 | patterns: [ 656 | # Normal 657 | {match: '(?i)!(Set(Clip|Wallpaper)|About|Manage|TrayMenu|Log|ResetStats|LoadLayout|RefreshApp|Quit|SetOption(Group)?|WriteKeyValue|SetVariable(Group)?|Toggle(Group|Config)?|Move(Meter)?|DeactivateConfig(Group)?|ActivateConfig|Refresh(Group)?|Redraw(Group)?|SetTransparency(Group)?|(Show|Hide|Toggle)Fade(Group)?|(Show|Hide|Toggle|Add|Remove)Blur|Draggable(Group)?|ZPos(Group)?|KeepOnScreen(Group)?|ClickThrough(Group)?|SnapEdges(Group)?|SkinMenu|(Show|Hide|Toggle|Update)Meter(Group)?|((Dis|En)able|Toggle|Update)Measure(Group)?|CommandMeasure|(Un|Toggle)?PauseMeasure|(Show|Hide)(Group)?|Update|LoadLayout|FadeDuration(Group)?)\\b' 658 | name: 'support.function.rainmeter'} 659 | # Deprecated 660 | {match: '(?i)!(Rainmeter(SetClip|SetWallpaper|About|Manage|Log|LsBoxHook|ResetStats|TrayMenu|RefreshApp|Quit|(SetOptionGroup?)|WriteKeyValue|(SetVariableGroup?)|Toggle(Group|Config)?|Move(Meter)?|DeactivateConfig(Group)?|ActivateConfig|Refresh(Group)?|Redraw(Group)?|SetTransparency(Group)?|(Show|Hide|Toggle)Fade(Group)?|(Show|Hide|Toggle|Add|Remove)Blur|Draggable(Group)?|ZPos(Group)?|KeepOnScreen(Group)?|ClickThrough(Group)?|SnapEdges(Group)?|SkinMenu|(Show|Hide|Toggle|Update)Meter(Group)?|((Dis|En)able|Toggle|Update)Measure(Group)?|CommandMeasure|(Un|Toggle)?PauseMeasure|(Show|Hide)(Group)?|Update|LoadLayout)|Execute|(Rainmeter)?PluginBang)\\b' 661 | name: 'deprecated.function.rainmeter'} 662 | ] 663 | 664 | # All math functions and constants 665 | math: 666 | patterns: [ 667 | {match: '(?i)\\b(((a)?(tan|sin|cos))|abs|exp|log|ln|sqrt|sgn|frac|trunc|floor|ceil|round|rad|deg|min|max|clamp)\\s*(?=\\()' 668 | name: 'support.function.rainmeter'} 669 | {match: '(?i)\\b(PI|E)\\b' 670 | name: 'support.function.constant.rainmeter'} 671 | ] 672 | 673 | # All options that require bangs 674 | meterActionOptions: 675 | patterns: [ 676 | {begin: '(?i)^\\s*(((Left|Right|Middle|X(1|2))Mouse(Up|Down|DoubleClick)|Mouse(Over|Leave|Scroll(Up|Down|Left|Right))|OnUpdate)Action|(?!If(Above|Below|Equal)Action1)If(Above|Below|Equal)Action\\d*|(?!If(Match|NotMatch)Action1)If(Match|NotMatch)Action\\d*|(?!If(True|False)Action1)If(True|False)Action\\d*|MouseActionCursorName|OnChangeAction)\\s*=' 677 | beginCaptures: {1: {name: 'option.rainmeter'}} 678 | end: '$' 679 | patterns: [ 680 | {include: '#variables'} 681 | {include: '#bangs'} 682 | ]} 683 | ] 684 | 685 | colors: 686 | patterns: [ 687 | {match: '(?i)(\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+))?|(?<=[= \"])([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?' 688 | captures: 689 | 1: {name: 'color.r.rainmeter'} 690 | 2: {name: 'color.g.rainmeter'} 691 | 3: {name: 'color.b.rainmeter'} 692 | 4: {name: 'color.a.rainmeter'} 693 | 5: {name: 'color.r.rainmeter'} 694 | 6: {name: 'color.g.rainmeter'} 695 | 7: {name: 'color.b.rainmeter'} 696 | 8: {name: 'color.a.rainmeter'}} 697 | ] 698 | --------------------------------------------------------------------------------