Skip to main content

naughty

The naughty library handles desktop notifications in AwesomeWM/SomeWM. It provides notification display, rules, and customization.

Upstream documentation: awesomewm.org/apidoc/libraries/naughty.html

Key Modules

ModulePurpose
naughty.notifyDisplay notifications
naughty.notificationNotification object
naughty.layoutNotification positioning
naughty.actionNotification actions (buttons)
ruled.notificationNotification rules

Basic Usage

local naughty = require("naughty")

-- Simple notification
naughty.notify({
title = "Hello",
text = "This is a notification",
timeout = 5
})

Notification Rules

Rules let you customize notifications based on their properties:

ruled.notification.connect_signal("request::rules", function()
ruled.notification.append_rule({
rule = { app_name = "Spotify" },
properties = {
timeout = 3,
urgency = "low"
}
})
end)

See the Notifications Guide for detailed configuration.

Behavioral Notes

SomeWM's naughty implementation is fully compatible with AwesomeWM.