Bangs

Bangs are commands that control various aspects of skins and Rainmeter. They are executed when used with action options in the skin.

Bangs can also be used from the Windows command line as a parameter to the Rainmeter.exe executable. Example: "C:\Program Files\Rainmeter\Rainmeter.exe" !RefreshApp.

Note: Many bangs have a Config parameter. Unless otherwise specified, valid values are the config name of a currently loaded skin to be acted upon or * (asterisk) to act on all currently loaded skins. When optional and not supplied, the parameter defaults to the current config. If executing a bang with a "config" parameter from the Windows command line, the parameter is always required.

Operating System bangs

!SetClip Parameter: String
Copies the specified string to the Windows clipboard. If the string contains spaces, use quotes around the parameter.
  • String (required): The string to be copied to the clipboard.

Example: !SetClip "This is copied to the clipboard!"
!SetWallpaper Parameters: File, Position
Sets the Windows desktop background to the specified image file.
  • File (required): The file to be set as the desktop background. The following formats are supported: .bmp, .jpg, .png, .gif, and .tiff. If the filename contains spaces, you must enclose the filename in quotes.
  • Position (optional): Sets the position of the wallpaper. Valid values are: Center, Tile, Stretch. Windows 7 (and above) also have the values: Fit and Fill.

Example: !SetWallpaper "Some Image.png" Center

Application bangs

!About Parameter: TabName
Opens the About window.
  • TabName (optional): Name of the tab to open. Valid values are: Log (default), Skins, Plugins, and Version. The value Measures is deprecated and will open the Skins tab.

Example: !About Skins
!Manage Parameters: TabName, Config, File
Opens the Manage window.
  • TabName (optional): Name of the tab to open. Valid values are: Skins (default), Layouts, and Settings.
  • Config (optional): Config name. If specified the list on the left will jump to and select the named config. If Config is specified, then TabName is required.
  • File (optional): A skin .ini file in a named config. If specified the list on the left will jump to and select the named skin .ini file. If File is specified, then TabName and Config are required.

Example: !Manage Skins "illustro\Clock" "Clock.ini"
!TrayMenu
Opens the Rainmeter context menu at the current mouse location.
!Log Parameters: String, ErrorType
Writes a message to the log.
  • String (required): The string to be written to the log. If the string contains spaces, enclose the string in quotes.
  • ErrorType (optional): Specifies the type of error. Valid values are: Notice (default), Error, Warning, and Debug.

Example: !Log "There was an error!" Error
!ResetStats
Resets the network statistics.
!LoadLayout Parameters: LayoutName
Loads the named layout. A layout can also be loaded from the Windows command line:

Example: "C:\Program Files\Rainmeter\Rainmeter.exe" !LoadLayout "My Saved Layout"
!RefreshApp
Does a full refresh of all skins and reloads the list of configs and Rainmeter.ini settings. This is the same as "Refresh All" from the system tray context menu. The main difference from !Refresh * is that the skins folder is rescanned.
!Quit
Quits Rainmeter.
Play Parameter: SoundFile
Plays the given sound file once.
  • SoundFile (required): File to be played. Must be a .wav file.

Example: Play "SomeFile.wav"
PlayLoop Parameter: SoundFile
Plays the given sound file in a loop.
  • SoundFile (required): File to be played. Must be a .wav file.

Example: PlayLoop "SomeFile.wav"
PlayStop
Stops the currently playing sound.

Option and Variable bangs

!SetOption Parameters: Meter/Measure, Option, Value, Config
Sets an option (ie. FontSize, Text, Formula, etc.) of a meter or measure.
  • Meter/Measure (required): Name of the meter or measure section.
  • Option (required): Name of the option to be changed.
  • Value (required): New value to be set.
  • Config (optional)

Details at !SetOption Guide.


Example: !SetOption SomeStringMeter Text "New Text"
!SetVariable Parameters: Variable, Value, Config
Sets a new value for a variable. The meter or measure where the variable is used must enable DynamicVariables. !SetVariable can create a new variable in memory, even if it is not pre-defined in the [Variables] section.
  • Variable (required): Name of the variable.
  • Value (required): New value to be set.
  • Config (optional)

Example: !SetVariable SomeVariable "New value!"
!WriteKeyValue Parameters: Section, Key, Value, FilePath
Permanently writes a Key=Value pair below a section in a INI formatted file (such as .ini or .inc files). A skin must be refreshed for a new value written to the skin's .ini or .inc files to be re-read and used.
  • Section (required): If the section does not exist in the file, a new section will be written at the end of the file.
  • Key (required): If the key does not exist under the section, a new key will be written at the end of the section.
  • Value (required): Value to be written. Any previous value will be overwritten.
  • FilePath (optional): If not specified, the current skin file is used. The file must exist and must be located under either #SKINSPATH# or #SETTINGSPATH#.

Example: !WriteKeyValue Variables MyFontName Arial "#@#Variables.inc"

Option and Variable group bangs:

!SetOptionGroup Parameters: Group, Option, Value, Config
Sets an option (ie. FontSize, Text, Formula, etc.) of meters and measures in the specified group.
  • Group (required): Name of the group.
  • Option (required): Name of the option to be changed.
  • Value (required): New value to be set.
  • Config (optional)

Example: !SetOptionGroup StringGroup Text "New text!"
!SetVariableGroup Parameters: Variable, Value, Group
Changes the value of a variable in the configs of the specified group.
  • Variable (required): Name of the variable.
  • Value (required): New value to be set.
  • Group (required): Name of the group.

Example: !SetVariableGroup MyFontName "Arial" ConfigGroup

Skin bangs

!Show, !Hide, !Toggle Parameter: Config
Shows or hides an active skin.
  • Config (optional)

Example: !Toggle "illustro\Clock"
!ShowFade, !HideFade, !ToggleFade Parameter: Config
Shows or hides an active skin with a fade effect.
  • Config (optional)
!ShowBlur, !HideBlur, !ToggleBlur Parameter: Config
Shows or hides the blur behind a skin.
  • Config (optional)
!AddBlur, !RemoveBlur Parameter: Region, Config
Adds or removes a blur region to/from existing blur areas.
  • Region (required): Region to add or remove a blur effect.
  • Config (optional)
!Move Parameters: X, Y, Config
Sets the position of a skin.
  • X (required): New X position.
  • Y (required): New Y position.
  • Config (optional)

Example: !Move "100" "100"
!ActivateConfig Parameters: Config, File
Activates a skin.
  • Config (required): The config to be activated.
  • File (optional): If not specified, the next .ini file variant in the config folder is activated.

Example: !ActivateConfig "illustro\Clock" "Clock.ini"
!DeactivateConfig Parameter: Config
Deactivates a skin.
  • Config (required): The config to be deactivated.

Example: !DeactivateConfig "illustro\Clock"
!ToggleConfig Parameters: Config, File
Activates or deactivates a skin.
  • Config (required): The config to be activated or deactivated.
  • File (required): The .ini file to be activated or deactivated.

Example: !ToggleConfig "illustro\Clock" "Clock.ini"
!Update Parameter: Config
Overrides the setting of the Update option in [Rainmeter] and immediately updates the entire skin, all measures and meters. This does not override any UpdateDivider options on measures or meters.
  • Config (optional)
!Redraw Parameter: Config
Overrides the setting of the Update option in [Rainmeter] and immediately redraws all visible elements of the entire skin. Meters will use the last value obtained for any measures or variables referenced.
  • Config (optional)
!Refresh Parameter: Config
Reads the skin file and recreates the skin.
  • Config (optional)
!SkinMenu Parameter: Config
Opens the skin context menu at the current mouse position.
  • Config (optional)
!SetTransparency Parameters: Alpha, Config
Sets the transparency of a skin.
  • Alpha (required): From 0 (invisible) to 255 (opaque).
  • Config (optional)

Example: !SetTransparency "128" "illustro\Clock"
!ZPos Parameters: Position, Config
Sets the Z-position of a skin.
  • Position (required): -2 for On desktop, -1 for Bottom, 0 for Normal, 1 for On top, or 2 for Always on top.
  • Config (optional)

Example: !ZPos "2" "illustro\Clock"
!Draggable Parameters: Setting, Config
Sets the Draggable option of a skin.
  • Setting (required): 0 to disable, 1 to enable or -1 to toggle.
  • Config (optional)
!KeepOnScreen Parameters: Setting, Config
Sets the KeepOnScreen option of a skin.
  • Setting (required): 0 to disable, 1 to enable or -1 to toggle.
  • Config (optional)
!ClickThrough Parameters: Setting, Config
Sets the ClickThrough option of a skin.
  • Setting (required): 0 to disable, 1 to enable or -1 to toggle.
  • Config (optional)
!SnapEdges Parameters: Setting, Config
Sets the SnapEdges option of a skin.
  • Setting (required): 0 to disable, 1 to enable or -1 to toggle.
  • Config (optional)

Skin group bangs:

!ShowGroup, !HideGroup, !ToggleGroup Parameter: Group
Shows or hides a group of active skins.
  • Group (required): Group to show or hide.

Example: !ShowGroup "SomeGroup"
!ShowFadeGroup, !HideFadeGroup, !ToggleFadeGroup Parameter: Group
Shows or hides a group of active skins with a fade effect.
  • Group (required): Group to show or hide with a fade effect.
!DeactivateConfigGroup Parameter: Group
Deactivates a group of skins.
  • Group (required): Group to deactivate.
!Updategroup Parameter: Group
Overrides the setting of the Update option in [Rainmeter] and immediately updates the skins in the specified group, all measures and meters. This does not override any UpdateDivider options on measures or meters.
  • Group (required): Group to redraw.
!RedrawGroup Parameter: Group
Overrides the setting of the Update option in [Rainmeter] and immediately redraws all visible elements of the specified group of skins. Meters will use the last value obtained for any measures or variables referenced.
  • Group (required): Group to redraw.
!RefreshGroup Parameter: Group
Reads the skin file and recreates a group of skins.
  • Group (required): Group to refresh.
!SetTransparencyGroup Parameters: Alpha, Group
Sets the transparency of the configs in the specified group.
  • Alpha (required): From 0 (invisible) to 255 (opaque).
  • Group (required): Name of the the group.

Example: !SetTransparencyGroup "128" "SuiteName"
!DraggableGroup Parameters: Setting, Group
Sets the Draggable option for each config in the specified group.
  • Setting (required): 0 to disable, 1 to enable or -1 to toggle.
  • Group (required): Name of the group.
!ZPosGroup Parameters: Position, Group
Sets the Z-position of the configs in the specified group.
  • Position (required): -2 for On desktop, -1 for Bottom, 0 for Normal, 1 for On top, or 2 for Always on top.
  • Group (required): Name of the group.
!KeepOnScreenGroup Parameters: Setting, Group
Sets the KeepOnScreen setting for the specified group.
  • Setting (required): 0 to disable, 1 to enable or -1 to toggle.
  • Group (required): Name of the group.
!SnapEdgesGroup Parameters: Setting, Group
Sets the SnapEdges setting for the specified group.
  • Setting (required): 0 to disable, 1 to enable or -1 to toggle.
  • Group (required): Name of the group.

Meter bangs

!ShowMeter, !HideMeter, !ToggleMeter Parameters: Meter, Config
Shows or hides the given meter.
  • Meter (required): Name of the meter to show or hide.
  • Config (optional)

Example: !ToggleMeter "MyMeter"
!UpdateMeter Parameters: Meter, Config
Overrides the setting of the Update option in [Rainmeter] or any UpdateDivider on the meter, and immediately updates the meter, obtaining new current values for any measures or variables referenced. Note that the meter is not redrawn with any new values until the next update, or if a !Redraw bang is used.
  • Meter (required): Name of the meter to update. Use * to update all meters.
  • Config (optional)

Example: !UpdateMeter "MyMeter"
!MoveMeter Parameters: X, Y, Meter, Config
Moves the given meter (not the window) to the specified position. The new position is relative to the top left corner of the skin.
  • X (required): New X position.
  • Y (required): New Y position.
  • Meter (required): Name of the meter to move.
  • Config (optional)

Example: !MoveMeter 15 10 "MyMeter"

Meter group bangs:

!ShowMeterGroup, !HideMeterGroup, !ToggleMeterGroup Parameters: Group, Config
Shows or hides a group of meters.
  • Group (required): Group to show or hide.
  • Config (optional).
!UpdateMeterGroup Parameters: Group, Config
Overrides the setting of the Update option in [Rainmeter] or any UpdateDivider on the meters in the specified group, and immediately updates the meters, obtaining new current values for any measures or variables referenced. Note that the meters are not redrawn with any new values until the next update, or if a !RedrawGroup bang is used.
  • Group (required): Name of the meter group to update.
  • Config (optional)

Measure bangs

!EnableMeasure, !DisableMeasure, !ToggleMeasure Parameters: Measure, Config
Enables or disables the given measure.
  • Measure (required): Name of the measure.
  • Config (optional)
This behavior can also be controlled with the Disabled general measure option. Numeric values in measures will be set to zero when the measure is disabled.

Example: !ToggleMeasure "CPUMeasure"
!PauseMeasure, !UnpauseMeasure, !TogglePauseMeasure Parameters: Measure, Config
Pauses or unpauses updating the given measure.
  • Measure (required): Name of the measure.
  • Config (optional)
This is similar to !DisableMeasure / !EnableMeasure, however the numeric value of the measure will contain the most recent value, rather than being set to zero.

Example: !TogglePauseMeasure "CPUMeasure"
!UpdateMeasure Parameters: Measure, Config
Overrides the setting of the Update option in [Rainmeter] or any UpdateDivider on the measure, and immediately updates the measure.
  • Measure (required): Name of the measure. Use * to update all measures.
  • Config (optional)

Example: !UpdateMeasure "CPUMeasure"
!CommandMeasure Parameters: Measure, Arguments, Config
Sends a command to the given measure.
  • Measure (required): Name of the measure.
  • Arguments (required): Arguments to send to the measure.
  • Config (optional)

Example: !CommandMeasure "NowPlayingParent" "Previous"

Measure group bangs:

!EnableMeasureGroup, !DisableMeasureGroup, !ToggleMeasureGroup Parameters: Group, Config
Enables or disables the given measures in the specified group.
  • Group (required): Name of the group.
  • Config (optional)
!PauseMeasureGroup, !UnpauseMeasureGroup, !TogglePauseMeasureGroup Parameters: Group, Config
Pauses or unpauses updating the given measure in the specified group.
  • Group (required): Name of the group.
  • Config (optional)
!UpdateMeasureGroup Parameters: Group, Config
Overrides the setting of the Update option in [Rainmeter] or any UpdateDivider on the measures in the specified group, and immediately updates the measures.
  • Group (required): Name of the group.
  • Config (optional)

Deprecated bangs

!Execute
The !Execute bang, used both to indicate multiple bangs in one statement and to execute external applications has been made optional. Do not use it in new skins.
!Rainmeter...
Bangs names can optionally be preceded by the "Rainmeter" keyword. For example, !RainmeterShowMeter and !ShowMeter are both equal. New skins should not use the Rainmeter prefix.
!PluginBang Parameters: Measure, Arguments, Config
This bang has been deprecated in favor of !CommandMeasure and should not be used in any new skins.