Skip to content

Instantly share code, notes, and snippets.

@ellbur
Created January 27, 2020 14:09
Show Gist options
  • Save ellbur/3229a63f868eb8ed3d11bb6fee5d8143 to your computer and use it in GitHub Desktop.
Save ellbur/3229a63f868eb8ed3d11bb6fee5d8143 to your computer and use it in GitHub Desktop.
Subtle notification area for awesomewm that won't cover windows
notification_box = wibox.widget {
text = '',
align = 'left',
valign = 'center',
widget = wibox.widget.textbox
}
notification_timer = nil
naughty.dbus.config.mapping = {
{{}, {
callback = function(data, appname, replaces_id, icon, title, text, actions, hints, expire)
notification_box.text = title .. ", " .. text
notification_timer = timer {
timeout = 1.5,
autostart = true,
single_shot = true,
callback = function()
notification_box.text = ""
end
}
end
}},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment