Module decoration
Decoration Module This module handles decorations and blur effects.
Functions
setup (opts) | Sets up the Decoration Module with user-provided options. |
write (file) | Writes the serialized configuration to a file. |
Tables
defaults | Default configuration options for the Decoration Module. |
Functions
- setup (opts)
-
Sets up the Decoration Module with user-provided options.
This function merges user-provided options with the default configuration.
Parameters:
- opts (table) A table of options to apply. See `decoration.defaults` for available options.
Usage:
decoration.setup({ rounding = 10, active_opacity = 0.9, col = { shadow = "0xee000000", }, })
- write (file)
-
Writes the serialized configuration to a file.
Parameters:
- file (file) The file object to write the configuration to.
Usage:
local file = io.open("config.lua", "w") decoration.write(file) file:close()
Tables
- defaults
-
Default configuration options for the Decoration Module.
Users can override these defaults by passing a table of options to `decoration.setup`.
Fields:
- rounding number The corner rounding radius. Default is `0`.
- active_opacity number Opacity when active. Range: `0.0` to `1.0`. Default is `1.0`.
- inactive_opacity number Opacity when inactive. Range: `0.0` to `1.0`. Default is `1.0`.
- fullscreen_opacity number Opacity in fullscreen mode. Range: `0.0` to `1.0`. Default is `1.0`.
- drop_shadow boolean Enable or disable drop shadows. Default is `true`.
- shadow_range number The range of the shadow effect. Default is `4`.
- shadow_render_power number The power level of shadow rendering. Default is `3`.
- shadow_ignore_window boolean Whether shadows should ignore window decorations. Default is `true`.
- shadow_offset boolean Enable or disable shadow offsets. Default is `true`.
- shadow_scale string Scaling factors for shadows. Default is `"0x0"`.
- col table Color settings for shadows.
- shadow string Hex color code for active shadows. Example: `"0xee1a1a1a"`.
- shadow_inactive string Hex color code for inactive shadows. Default is `"nil"`.
- blur table Blur settings.
- brightness number Brightness level for blur. Default is `0.8172`.
- contrast number Contrast level for blur. Default is `0.8916`.
- enabled boolean Enable or disable blur effect. Default is `true`.
- ignore_opacity boolean Whether to ignore opacity in blur. Default is `false`.
- new_optimizations boolean Enable new optimizations for blur. Default is `true`.
- noise number Noise level for blur. Default is `0.0117`.
- passes number Number of blur passes. Default is `1`.
- popups boolean Enable or disable blur for popups. Default is `false`.
- popups_ignorealpha number Opacity to ignore for popups. Default is `0.3`.
- size number Blur size. Default is `8`.
- special boolean Special blur parameter. Default is `false`.
- vibrancy number Vibrancy level for blur. Default is `0.1696`.
- vibrancy_darkness number Vibrancy darkness level. Default is `0.0`.
- xray boolean Enable xray effect in blur. Default is `false`.
- dim_inactive boolean Enable or disable dimming for inactive elements. Default is `false`.
- dim_strength number Strength of the dim effect. Default is `0.5`.
- dim_special number Special dimming parameter. Default is `0.2`.
- dim_around number Dim amount around elements. Default is `0.4`.
- screen_shader string Path or identifier for the screen shader. Default is `""`.