Rules

Rules are used to add special handling to windows that match a regex pattern.

nog.rules = {
  ["notepad.exe"] = {
    ...
  }
}

The above snippet defines a rule for any window that either has a title or executable name matching notepade.exe.

A rule can contain the following settings

KeyValueDescription
has_custom_titlebarBooleanChanges how we align the window (applications like vscode should have this enabled)
actionStringTells nog how to behave when a new window is created. The value is expected to be one of the following:
  • Ignore - nog will ignore the window
  • Manage - nog will manage the window and add it to the currently active workspace
  • Pin - nog will globally pin the window (see pinning mode)
  • Validate - nog will check other config values to determine whether to manage or not
chromiumBooleanAdds chromium specific handling (anything based on chromium like the new microsoft edge should have this enabled)
firefoxBooleanAdds firefx specific handling
workspace_idNumberWhich workspace this window gets moved to

The default config contains a few useful rules if you want to see them in action.