Skip to content

Notifications

Hyprland has simple built-in notification system. Notifications are simple text boxes, with an optional icon, positioned in the top-right corner of the active monitor. They are not meant to handle your system notifications.

Parameters

NameDescriptionTypeDefaultLimits
textText of the notificationstr[[Empty]]
timeoutTimeout/duration in msint[[Required]]
iconIcon type, see belowstr"none"
colorNotification color. 0 means “default color for icon”color0
font_sizeSize of the font used to display the notificationint13

Icon

Icon can be one of the following, selected by either Lua name or hyprctl ID:

NameLua namehyprctl IDDefault color
Nonenone-1#000000
Warningwarn/warning0#FFCC66
Infoinfo1#80FFFF
Hinthint2#B3FFCC
Errorerr/error3#FF4D4D
Confusedconfused/question4#FFCC99
Okok5#80FF80

Creating a notification

Lua

-- Just push a notification
hl.notification.create({ text = "Hello from Lua!", timeout = 15000, icon = "info", font_size = 20 })

-- Assign "HL.Notification" object to "somevar" for later use and push the notification
local somevar = hl.notification.create({ text = "Please store me", timeout = 228638, icon = "hint" })

-- Get a table of all active notifications as "HL.Notification" objects
hl.notification.get()

Hyprctl

To create a notification from hyprctl, you can use hyprctl notify command. It takes the same information as hl.notification.create(), but in a slightly different format. See more about it here.

Last updated on