This plugin adds a modern style to Org mode buffers.
The menu is used when selecting further actions in agenda
, capture
and export
.
In order to use a modern menu based on floating windows, you need:
- Load the
org-modern.menu
module. - Create an instance of the
menu
class via thenew
function. - Use the modern menu inside the
handler
function in theorgmode
configuration.
Here is an example of orgmode
configuration for using a modern menu:
local Menu = require("org-modern.menu")
require("orgmode").setup({
ui = {
menu = {
handler = function(data)
Menu:new({
window = {
margin = { 1, 0, 1, 0 },
padding = { 0, 1, 0, 1 },
title_pos = "center",
border = "single",
zindex = 1000,
},
icons = {
separator = "β",
},
}):open(data)
end,
},
},
})
The following is a description of the menu configuration options:
window
(table
) β used to configure the appearance of the menu window, the following options are available:margin
(table
) β size of the margins, they are set in the order{top, right, bottom, left}
.padding
(table
) β size of the paddings, they are set in the order{top, right, bottom, left}
.title_pos
(string
) β position of the title, the valid values areleft
,center
,right
.border
(string
) β border type, the valid values arenone
,single
,double
,rounded
,solid
,shadow
.zindex
(number
) β stacking order (floats with higherzindex
go on top on floats with lower indices), must be larger than zero.
icons
(table
) β used for configuring icons, the following options are available:separator
(string
) β icon used between key and label.