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("swaync-client --hide-all")) exit_submap() end, { description = "Hide notifications" }) hl.bind("d", function() hl.dispatch(hl.dsp.exec_cmd("swaync-client --close-all")) exit_submap() end, { description = "Delete all notifications" }) hl.bind("m", function() hl.dispatch(hl.dsp.exec_cmd("swaync-client -d")) exit_submap() end, { description = "Toggle Do Not Disturb" }) hl.bind("h", function() hl.dispatch(hl.dsp.exec_cmd("swaync-client -cp")) exit_submap() end, { description = "Close notification panel" }) hl.bind("s", function() hl.dispatch(hl.dsp.exec_cmd("swaync-client -op")) exit_submap() end, { description = "Open notification panel" }) hl.bind("t", function() hl.dispatch(hl.dsp.exec_cmd("swaync-client -t")) exit_submap() end, { description = "Toggle notification panel" }) hl.bind("Escape", function() exit_submap() end) end)