Files
dotfiles/config/hypr/hyprland/binds/notifications.lua
T

40 lines
1.3 KiB
Lua

local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.define_submap("notifications", function()
hl.bind("c", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call notifications dismissAllPopups"))
exit_submap()
end, { description = "Hide notifications" })
hl.bind("d", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call notifications clearAll"))
exit_submap()
end, { description = "Delete all notifications" })
hl.bind("m", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call notifications toggleDoNotDisturb"))
exit_submap()
end, { description = "Toggle Do Not Disturb" })
hl.bind("h", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call notifications close"))
exit_submap()
end, { description = "Close notification panel" })
hl.bind("s", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call notifications open"))
exit_submap()
end, { description = "Open notification panel" })
hl.bind("t", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call notifications toggle"))
exit_submap()
end, { description = "Toggle notification panel" })
hl.bind("Escape", function()
exit_submap()
end)
end)