Skip to content

Latest commit

 

History

History
313 lines (220 loc) · 6.78 KB

File metadata and controls

313 lines (220 loc) · 6.78 KB

Contents




Modifying The Location

  • You can modify the location of the notification!
  1. To use the pre-defined locations, find the following code in the config.lua file:

    Cfg.Location = 'center-right' 

  1. Set Cfg.Location to one of the following values:
    • 'top'
    • 'top-right'
    • 'top-left'
    • 'center'
    • 'center-right'
    • 'center-left'
    • 'bottom'
    • 'bottom-right'
    • 'bottom-left'


  • You can also create custom locations or modify the existing ones.
  1. Locate the following code in the config.lua file:

    Cfg.LocationMapping = {
        ['top'] = {right = '50%', top = '94%'},
        ['top-right'] = {right = '1%', top = '94%'},
        ['top-left'] = {left = '1%', top = '94%'},
        ['center'] = {right = '50%', top = '35%'},
        ['center-right'] = {right = '1%', top = '35%'},
        ['center-left'] = {left = '1%', top = '35%'},
        ['bottom'] = {right = '50%', top = '6%'},
        ['bottom-right'] = {right = '1%', top = '6%'},
        ['bottom-left'] = {left = '1%', top = '6%'},
    }
  2. Modify any of the pre-defined locations or create your own!


  1. To create a custom location, you can adjust three parameters:
    • 'top' ➡️ Distance from the top of the screen
    • 'right' ➡️ Distance from the right
    • 'left' ➡️ Distance from the left

  1. If you want to change only one parameter, you can remove the others; the script will set their value to 'auto'. You only need to use either 'left' or 'right', not both.

  1. Example of custom location:

    Cfg.LocationMapping = {
        ['my-custom-location'] = {left = '10px', top = '5px'}, -- Also able to use `px` suffix :D
        ['my-custom-location2'] = {left = '6%'}, -- Maybe we just need to modify one parameters!
    }

  1. To apply the custom location tag to the script, change 'Cfg.Location', for example:

    Cfg.Location = 'my-custom-location' 



Modifying Corners

  • You can make the corners rounded or modify them.
  1. Find the following code in the config.lua file:
    Cfg.Corners = 'rounded'

  1. Change the value to one of the following options:
    • 'super-rounded' ➡️ Very rounded corners!
    • 'rounded' ➡️ Normal rounded corners.
    • 'custom' ➡️ Allows for custom rounded corners.
    • 'normal' ➡️ Removes rounded corners.

  1. To apply a custom value, set Cfg.Corners to 'custom':

    Cfg.Corners = 'custom'

  1. Then find the following code in the config.lua file and modify the value:

    Cfg.CustomRadius = '15px'



Custom Background & Text Color

  • Change the background color of the notifications.
  1. Locate the following code in the config.lua file and modify the value:

    Cfg.BackGround = 'dimgrey'
    Cfg.BackGround = '#333'
    Cfg.BackGround = '#333333'
    Cfg.BackGround = 'rgb(51, 51, 51)'

  1. Ensure the text colors are adjusted for visibility!

  1. To change the text colors, find the following codes in the config.lua file and modify them:

    Cfg.TitleColor = '#fff' 
    Cfg.MessageColor = '#fff' 



Custom Divider Line

  • Modify the divider line between the notification header and message.
  1. Find the following codes in the config.lua file:

    Cfg.Divider = true
    Cfg.DividerColor = 'gray'

  1. Disable the divider line by setting Cfg.Divider to false, for example:

    Cfg.Divider = false
    Cfg.DividerColor = 'gray'

  1. To change the color of the divider, modify the Cfg.DividerColor value. Examples:

    Cfg.Divider = true
    Cfg.DividerColor = 'gray'
    Cfg.Divider = true
    Cfg.DividerColor = '#555'
    Cfg.Divider = true
    Cfg.DividerColor = '#555555'
    Cfg.Divider = true
    Cfg.DividerColor = 'rgb(85, 85, 85)'



Glowing Effect

  • Enable a glowing effect around the notifications!
  1. Find the following code in the config.lua file and enable or disable it:

    Cfg.Glowing = true



Modifying Height & Width

  • Modify the height and width of the notifications.
  1. Find the following codes in the config.lua file:

    Cfg.MinHeight = 'auto'
    Cfg.MaxHeight = '6%'
    Cfg.HeightSize = 'auto'
    
    Cfg.MinWidth = '300px'
    Cfg.MaxWidth = '390px'
    Cfg.WidthSize = 'auto'

  1. The Cfg.MinHeight and Cfg.MinWidth properties enforce minimum sizes:
    • If Cfg.MinWidth is set to '30px', the width cannot be lower than '30px'.
    • You can also set this option to 'auto'.

  1. The Cfg.MaxHeight and Cfg.MaxWidth properties enforce maximum sizes:
    • If Cfg.MaxWidth is set to '300px', the width cannot exceed '300px'.
    • You can also set this option to 'auto'.

  1. The Cfg.WidthSize and Cfg.HeightSize properties change the actual notification size.
    • You cannot set these values lower than Cfg.MinHeight and Cfg.MinWidth values.



Modifying Icons

  • Adjust the size of the icons!
  1. Find the following code in the config.lua file to adjust the logo size:

    Cfg.ImageSize = '24px'

  1. To change the images, go to the appropriate folder and replace the images:
    • Ensure to use PNG formatted images!
    • Images must have a transparent background.



Other Settings

  • Modify the default duration of notifications.
  1. Locate the following code in the config.lua file:

    • Time is in milliseconds.
    Cfg.DefaultDuration = 5000


  • To modify the default title of notifications.
  1. Find the following codes in the config.lua file:

    Cfg.DefaultTitle = "Code Wizards" 
    Cfg.ForceDefaultTitle = false  

  1. To change the title, simply edit the Cfg.DefaultTitle value.
  2. To force the use of the default title on all notifications, edit the Cfg.ForceDefaultTitle value.