summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlbonn <lbonn@users.noreply.github.com>2024-03-05 16:22:47 +0100
committerGitHub <noreply@github.com>2024-03-05 16:22:47 +0100
commit433f9664e93e7354c3c5dee0d8bfb234ae1ee8d7 (patch)
tree6e692e08076c5294a7ec0addec4ffeaa1b119e67
parent3d29715e1edb073ed1e0494cdfd8aef7b0637ca5 (diff)
[Doc] Switch to pandoc and remove generated files (#1955)
* [Build] Add missing dist files from libnkutils * [Doc] Switch to pandoc and remove generated files * [Doc] Rewrite markdown for conversion to man * convert existing markup to use definition list (a bit hacky...) * rewrite title to pandoc man metadata * reduce heading nesting to match most man pages * inline code displayed as bold, also common man style * [Doc] New installation with autoconf and meson - autoconf: * generate in source directory if pandoc found * install from source directory - meson: * generate and install with build directory if pandoc found * try to install from source directory if pandoc not found * bail otherwise * [Doc] Make pandoc filter 2.9 compatible Man pages look better with pandoc >= 2.17
-rw-r--r--.github/actions/setup/action.yml1
-rw-r--r--Makefile.am59
-rw-r--r--configure.ac12
-rw-r--r--doc/README.md4
-rw-r--r--doc/man_filter.lua237
-rw-r--r--doc/meson.build63
-rw-r--r--doc/rofi-debugging.5256
-rw-r--r--doc/rofi-debugging.5.markdown4
-rw-r--r--doc/rofi-dmenu.5365
-rw-r--r--doc/rofi-dmenu.5.markdown2
-rw-r--r--doc/rofi-keys.5676
-rw-r--r--doc/rofi-keys.5.markdown318
-rw-r--r--doc/rofi-script.5279
-rw-r--r--doc/rofi-script.5.markdown2
-rw-r--r--doc/rofi-sensible-terminal.173
-rw-r--r--doc/rofi-sensible-terminal.1.markdown2
-rw-r--r--doc/rofi-theme-selector.146
-rw-r--r--doc/rofi-theme-selector.1.markdown2
-rw-r--r--doc/rofi-theme.52449
-rw-r--r--doc/rofi-theme.5.markdown16
-rw-r--r--doc/rofi.11761
-rw-r--r--doc/rofi.1.markdown25
-rw-r--r--meson-dist-script16
-rw-r--r--meson.build12
24 files changed, 541 insertions, 6139 deletions
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index 0181bafa..16871dc5 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -34,6 +34,7 @@ runs:
libxkbcommon-dev \
libxkbcommon-x11-dev \
ninja-build \
+ pandoc \
python3-pip \
python3-setuptools \
python3-wheel \
diff --git a/Makefile.am b/Makefile.am
index acf567ef..adcda08c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -172,19 +172,52 @@ rofi_LDADD=\
$(LIBS)
##
-# Manpage
+# Manpages
##
+
+.PHONY: generate-manpage
+
+if FOUND_PANDOC
+
+generate-manpage: doc/rofi.1\
+ doc/rofi-sensible-terminal.1\
+ doc/rofi-theme-selector.1\
+ doc/rofi-debugging.5\
+ doc/rofi-dmenu.5\
+ doc/rofi-keys.5\
+ doc/rofi-script.5\
+ doc/rofi-theme.5
+
+doc/rofi.1: doc/rofi.1.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-sensible-terminal.1: doc/rofi-sensible-terminal.1.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-theme-selector.1: doc/rofi-theme-selector.1.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-debugging.5: doc/rofi-debugging.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-dmenu.5: doc/rofi-dmenu.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-keys.5: doc/rofi-keys.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-script.5: doc/rofi-script.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-theme.5: doc/rofi-theme.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+
+endif
+
dist_man1_MANS=\
doc/rofi.1\
- doc/rofi-theme-selector.1\
- doc/rofi-sensible-terminal.1
+ doc/rofi-sensible-terminal.1\
+ doc/rofi-theme-selector.1
dist_man5_MANS=\
- doc/rofi-theme.5\
doc/rofi-debugging.5\
- doc/rofi-keys.5\
doc/rofi-dmenu.5\
- doc/rofi-script.5
+ doc/rofi-keys.5\
+ doc/rofi-script.5\
+ doc/rofi-theme.5
EXTRA_DIST += \
doc/rofi-theme.5.markdown \
@@ -254,19 +287,7 @@ EXTRA_DIST+=\
doc/default_configuration.rasi\
doc/default_theme.rasi\
Changelog
-##
-# Indent
-##
-update-manpage: $(top_srcdir)/doc/rofi-theme-selector.1.markdown $(top_srcdir)/doc/rofi.1.markdown $(top_srcdir)/doc/rofi-theme.5.markdown $(top_srcdir)/doc/rofi-script.5.markdown ${top_srcdir}/doc/rofi-sensible-terminal.1.markdown ${top_srcdir}/doc/rofi-keys.5.markdown ${top_srcdir}/doc/rofi-dmenu.5.markdown $(top_srcdir)/doc/rofi-debugging.5.markdown
- go-md2man -in $(top_srcdir)/doc/rofi.1.markdown -out $(top_srcdir)/doc/rofi.1
- go-md2man -in $(top_srcdir)/doc/rofi-theme-selector.1.markdown -out $(top_srcdir)/doc/rofi-theme-selector.1
- go-md2man -in $(top_srcdir)/doc/rofi-theme.5.markdown -out $(top_srcdir)/doc/rofi-theme.5
- go-md2man -in $(top_srcdir)/doc/rofi-debugging.5.markdown -out $(top_srcdir)/doc/rofi-debugging.5
- go-md2man -in $(top_srcdir)/doc/rofi-keys.5.markdown -out $(top_srcdir)/doc/rofi-keys.5
- go-md2man -in $(top_srcdir)/doc/rofi-script.5.markdown -out $(top_srcdir)/doc/rofi-script.5
- go-md2man -in $(top_srcdir)/doc/rofi-dmenu.5.markdown -out $(top_srcdir)/doc/rofi-dmenu.5
- go-md2man -in $(top_srcdir)/doc/rofi-sensible-terminal.1.markdown -out $(top_srcdir)/doc/rofi-sensible-terminal.1
##
# Rofi test program
@@ -656,6 +677,8 @@ EXTRA_DIST += \
subprojects/libgwater/wayland-server/meson.build \
subprojects/libgwater/meson.build \
subprojects/libgwater/win/meson.build \
+ subprojects/libnkutils/bindings/meson.build \
+ subprojects/libnkutils/core/meson.build \
subprojects/libnkutils/meson.build \
subprojects/libnkutils/meson_options.txt \
subprojects/libgwater/wayland/libgwater-wayland.h \
diff --git a/configure.ac b/configure.ac
index 2b97e366..c658aed9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,6 +169,13 @@ AC_ARG_ENABLE([check], AS_HELP_STRING([--disable-check], [Build with checks usin
AS_IF([test "x${enable_check}" != "xno"], [ PKG_CHECK_MODULES([check],[check >= 0.11.0], [HAVE_CHECK=1]) ])
AM_CONDITIONAL([USE_CHECK], [test "x${enable_check}" != "xno" && test "$HAVE_CHECK" -eq 1])
+dnl ---------------------------------------------------------------------
+dnl Build man pages
+dnl ---------------------------------------------------------------------
+AC_ARG_ENABLE([man], AS_HELP_STRING([--disable-man], [Build man pages (default: enabled)]))
+
+AS_IF([test "x$enable_man" != "xno" ], [ AC_CHECK_PROG([pandoc], pandoc, [yes])])
+AM_CONDITIONAL([FOUND_PANDOC], [test "x$pandoc" = xyes])
dnl ---------------------------------------------------------------------
dnl Gets the resource compile tool path.
@@ -210,6 +217,11 @@ echo "Check based tests Enabled"
else
echo "Check based tests Disabled"
fi
+if test "x${enable_man}" != "xno" && test "x$pandoc" = "xyes"; then
+echo "Build man pages Enabled"
+else
+echo "Build man pages Disabled"
+fi
echo "-------------------------------------"
echo "Now type 'make' to build"
echo ""
diff --git a/doc/README.md b/doc/README.md
index 389e7a61..49814bc3 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,7 +1,7 @@
-Manpages are build using [go-md2man](https://github.com/cpuguy83/go-md2man)
+Manpages are build using [pandoc](https://pandoc.org/)
Manpages can be updated using the following make command:
```
-make update-manpage
+make generate-manpage
```
diff --git a/doc/man_filter.lua b/doc/man_filter.lua
new file mode 100644
index 00000000..eaa41cd6
--- /dev/null
+++ b/doc/man_filter.lua
@@ -0,0 +1,237 @@
+local Def = {}
+
+function Def:new(d)
+ -- init with empty def
+ if d == nil then
+ d = {
+ start_idx = nil,
+ end_idx = nil,
+ def_par = nil,
+ content = {},
+ }
+ end
+ setmetatable(d, self)
+ self.__index = self
+ return d
+end
+
+function Def:init(start_idx, el)
+ self.start_idx = start_idx
+ self.def_par = el
+end
+
+function Def:append(el)
+ if self.start_idx ~= nil then
+ table.insert(self.content, el)
+ end
+end
+
+function Def:stop(end_idx)
+ if self.start_idx == nil then
+ return nil
+ end
+ local out = self:new({
+ start_idx = self.start_idx,
+ end_idx = end_idx,
+ def_par = self.def_par,
+ content = self.content,
+ })
+ self.start_idx = nil
+ self.end_idx = nil
+ self.def_par = nil
+ self.content = {}
+ return out
+end
+
+function Def:to_string()
+ return string.format("start: %d, end: %d, def_par: %s", self.start_idx, self.end_idx, self.def_par)
+end
+
+function find_defs(doc)
+ local defs = {}
+ local idx = 0
+ local def = Def:new()
+
+ -- find defintions:
+ -- * start at paragraphs with `word` ...
+ -- * stop at next definition or next header
+ local filter = {
+ traverse = "topdown",
+ Para = function(el)
+ idx = idx + 1
+
+ local new_def_start = #el.content >= 1 and el.content[1].tag == "Code"
+
+ if new_def_start then
+ local newd = def:stop(idx - 1)
+ table.insert(defs, newd)
+
+ def:init(idx, el.content)
+ else
+ def:append(el)
+ end
+ return nil, false
+ end,
+ Block = function(el)
+ idx = idx + 1
+ def:append(el)
+ -- stop exploring after one nesting level
+ return nil, false
+ end,
+ Header = function(el)
+ idx = idx + 1
+ local newd = def:stop(idx - 1)
+ table.insert(defs, newd)
+ return nil, false
+ end,
+ }
+
+ doc:walk(filter)
+ local newd = def:stop(idx - 1)
+ table.insert(defs, newd)
+
+ return defs
+end
+
+function convert_defs(doc, defs)
+ local idx = 0
+ local out_blocks = {}
+
+ local convert_defs = {
+ traverse = "topdown",
+ Block = function(el)
+ idx = idx + 1
+ for _, d in ipairs(defs) do
+ if idx == d.end_idx then
+ local dl = pandoc.DefinitionList({ { d.def_par, { d.content } } })
+ table.insert(out_blocks, dl:walk())
+ return {}, false
+ end
+ if idx >= d.start_idx and idx < d.end_idx then
+ -- drop
+ return {}, false
+ end
+ end
+ table.insert(out_blocks, el:walk())
+ return nil, false
+ end,
+ }
+
+ doc:walk(convert_defs)
+
+ return pandoc.Pandoc(out_blocks, doc.meta)
+end
+
+-- for <2.17 compatibility
+-- equivalent to `doc:walk(filter)`
+local function walk_doc(doc, filter)
+ local div = pandoc.Div(doc.blocks)
+ local blocks = pandoc.walk_block(div, filter).content
+ return pandoc.Pandoc(blocks, doc.meta)
+end
+
+local function extract_title(doc)
+ local title = {}
+ local section
+ local filter = {
+ Header = function(el)
+ local f = {
+ Str = function(el)
+ if el.text:find("%(1%)") ~= nil then
+ section = "General Commands Manual"
+ elseif el.text:find("%(5%)") ~= nil then
+ section = "File Formats Manual"
+ end
+ table.insert(title, el)
+ end,
+ Inline = function(el)
+ table.insert(title, el)
+ end,
+ }
+ if el.level == 1 then
+ pandoc.walk_block(el, f)
+ return {} -- drop
+ end
+ return nil
+ end,
+ }
+
+ doc = walk_doc(doc, filter)
+
+ local to_inline = function(s)
+ local r = {}
+ for w in s:gmatch("%S+") do
+ table.insert(r, pandoc.Str(w))
+ table.insert(r, pandoc.Space())
+ end
+ table.remove(r, #r)
+ return r
+ end
+
+ if section ~= nil then
+ for _, e in ipairs({
+ pandoc.Space(),
+ pandoc.Str("rofi"),
+ pandoc.Space(),
+ pandoc.Str("|"),
+ table.unpack(to_inline(section)),
+ }) do
+ table.insert(title, e)
+ end
+ end
+
+ doc.meta = pandoc.Meta({
+ title = pandoc.MetaInlines(title),
+ })
+
+ return doc
+end
+
+local function decrement_heading(doc)
+ local filter = {
+ Header = function(el)
+ if el.level > 1 then
+ el.level = el.level - 1
+ return el
+ end
+ return nil
+ end,
+ }
+
+ doc = walk_doc(doc, filter)
+ return doc
+end
+
+local function code_in_strong(doc)
+ local filter = {
+ Code = function(el)
+ return pandoc.Strong(el.text)
+ end,
+ }
+
+ doc = walk_doc(doc, filter)
+ return doc
+end
+
+--- Run filtering function through whole document
+--
+-- * find argument definitions: paragraph starting with inline code (`-arg`)
+-- * replace the paragraphs until the end of the definition with a DefinitionList
+-- * extract metadata title from main heading
+-- * decrement heading from 1 for better display
+-- * convert inline code text to Strong as usual in man pages
+function Pandoc(doc)
+ if PANDOC_VERSION >= pandoc.types.Version("2.17.0") then
+ -- 2.17 is required for topdown traversal
+ local defs = find_defs(doc)
+ doc = convert_defs(doc, defs)
+ end
+
+ doc = extract_title(doc)
+
+ doc = decrement_heading(doc)
+
+ doc = code_in_strong(doc)
+
+ return doc
+end
diff --git a/doc/meson.build b/doc/meson.build
index e898a5b0..b5bb2f01 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1,25 +1,52 @@
-gomd2man = find_program('go-md2man', required: false)
-if gomd2man.found()
+man_files = [
+ 'rofi.1',
+ 'rofi-sensible-terminal.1',
+ 'rofi-theme-selector.1',
+ 'rofi-debugging.5',
+ 'rofi-dmenu.5',
+ 'rofi-keys.5',
+ 'rofi-script.5',
+ 'rofi-theme.5',
+]
+
+fs = import('fs')
+
+pandoc = find_program('pandoc', required: false, version: '>=2.9')
+
+if pandoc.found()
man_targets = []
- foreach f: [
- 'rofi.1',
- 'rofi-theme-selector.1',
- 'rofi-theme.5',
- 'rofi-dmenu.5',
- 'rofi-debugging.5',
- 'rofi-keys.5',
- 'rofi-script.5',
- 'rofi-sensible-terminal.1'
- ]
+ cp_cmds = []
+ foreach f: man_files
+ section_number = f.split('.')[1]
+ install_dest = join_paths(get_option('prefix'), get_option('mandir'), 'man' + section_number)
+
man_targets += custom_target(f,
- input: '.'.join([f, 'markdown']),
+ input: ['.'.join([f, 'markdown']), 'man_filter.lua'],
output: f,
- command: [ 'go-md2man',
- '-in', files('.'.join([f,'markdown'])),
- '-out', files(f)
- ])
+ command: [ 'pandoc', '--standalone', '--to=man',
+ '--lua-filter', '@INPUT1@',
+ '-f', 'markdown-tex_math_dollars',
+ '@INPUT0@', '-o', '@OUTPUT@' ],
+ install: true,
+ install_dir: install_dest,
+ build_by_default: true,
+ )
endforeach
- run_target('update-manpage', command: ['true'], depends: man_targets)
+
+ run_target('generate-manpage', command: ['true'], depends: man_targets)
+else
+ man_missing = false
+ foreach f: man_files
+ if not fs.is_file(f)
+ man_missing = true
+ endif
+ endforeach
+
+ if man_missing
+ warning('Man files cannot be generated and not present in source directory, they will not be installed')
+ else
+ install_man(man_files)
+ endif
endif
doxy_conf = configuration_data()
diff --git a/doc/rofi-debugging.5 b/doc/rofi-debugging.5
deleted file mode 100644
index 73a934b9..00000000
--- a/doc/rofi-debugging.5
+++ /dev/null
@@ -1,256 +0,0 @@
-.nh
-.TH ROFI DEBUGGING 5 rofi debugging
-.SH NAME
-.PP
-Debugging rofi.
-
-.PP
-When reporting an issue with rofi crashing, or misbehaving. It helps to do some
-small test to help pin-point the problem.
-
-.PP
-First try disabling your custom configuration: \fB\fC-no-config\fR
-
-.PP
-This disables the parsing of the configuration files. This runs rofi in \fIstock\fP
-mode.
-
-.PP
-If you run custom C plugins, you can disable the plugins using: \fB\fC-no-plugins\fR
-
-.SH Get the relevant information for an issue
-.PP
-Please pastebin the output of the following commands:
-
-.PP
-.RS
-
-.nf
-rofi -help
-rofi -dump-config
-rofi -dump-theme
-
-.fi
-.RE
-
-.PP
-\fB\fCrofi -help\fR provides us with the configuration files parsed, the exact
-version, monitor layout and more useful information.
-
-.PP
-The \fB\fCrofi -dump-config\fR and \fB\fCrofi -dump-theme\fR output gives us \fB\fCrofi\fR
-interpretation of your configuration and theme.
-
-.PP
-Please check the output for identifiable information and remove this.
-
-.SH Timing traces
-.PP
-To get a timing trace, enable the \fBTimings\fP debug domain.
-
-.PP
-.RS
-
-.nf
-G_MESSAGES_DEBUG=Timings rofi -show drun
-
-.fi
-.RE
-
-.PP
-It will show a trace with (useful) timing information at relevant points during
-the execution. This will help debugging when rofi is slow to start.
-
-.PP
-Example trace:
-
-.PP
-.RS
-
-.nf
-(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
-(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
-(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
-(process:14942): Timings-DEBUG: 13:47:39.336: 0.000219 (0.000056): ../source/rofi.c:main:826 Setup Locale
-(process:14942): Timings-DEBUG: 13:47:39.337: 0.001235 (0.001016): ../source/rofi.c:main:828 Collect MODI
-(process:14942): Timings-DEBUG: 13:47:39.337: 0.001264 (0.000029): ../source/rofi.c:main:830 Setup MODI
-(process:14942): Timings-DEBUG: 13:47:39.337: 0.001283 (0.000019): ../source/rofi.c:main:834 Setup mainloop
-(process:14942): Timings-DEBUG: 13:47:39.337: 0.001369 (0.000086): ../source/rofi.c:main:837 NK Bindings
-(process:14942): Timings-DEBUG: 13:47:39.337: 0.001512 (0.000143): ../source/xcb.c:display_setup:1177 Open Display
-(process:14942): Timings-DEBUG: 13:47:39.337: 0.001829 (0.000317): ../source/xcb.c:display_setup:1192 Setup XCB
-(process:14942): Timings-DEBUG: 13:47:39.346: 0.010650 (0.008821): ../source/rofi.c:main:844 Setup Display
-(process:14942): Timings-DEBUG: 13:47:39.346: 0.010715 (0.000065): ../source/rofi.c:main:848 Setup abe
-(process:14942): Timings-DEBUG: 13:47:39.350: 0.015101 (0.004386): ../source/rofi.c:main:883 Load cmd config
-(process:14942): Timings-DEBUG: 13:47:39.351: 0.015275 (0.000174): ../source/rofi.c:main:907 Setup Modi
-(process:14942): Timings-DEBUG: 13:47:39.351: 0.015291 (0.000016): ../source/view.c:rofi_view_workers_initialize:1922 Setup Threadpool, start
-(process:14942): Timings-DEBUG: 13:47:39.351: 0.015349 (0.000058): ../source/view.c:rofi_view_workers_initialize:1945 Setup Threadpool, done
-(process:14942): Timings-DEBUG: 13:47:39.367: 0.032018 (0.016669): ../source/rofi.c:main:1000 Setup late Display
-(process:14942): Timings-DEBUG: 13:47:39.367: 0.032080 (0.000062): ../source/rofi.c:main:1003 Theme setup
-(process:14942): Timings-DEBUG: 13:47:39.367: 0.032109 (0.000029): ../source/rofi.c:startup:668 Startup
-(process:14942): Timings-DEBUG: 13:47:39.367: 0.032121 (0.000012): ../source/rofi.c:startup:677 Grab keyboard
-(process:14942): Timings-DEBUG: 13:47:39.368: 0.032214 (0.000093): ../source/view.c:__create_window:701 xcb create window
-(process:14942): Timings-DEBUG: 13:47:39.368: 0.032235 (0.000021): ../source/view.c:__create_window:705 xcb create gc
-(process:14942): Timings-DEBUG: 13:47:39.368: 0.033136 (0.000901): ../source/view.c:__create_window:714 create cairo surface
-(process:14942): Timings-DEBUG: 13:47:39.369: 0.033286 (0.000150): ../source/view.c:__create_window:723 pango cairo font setup
-(process:14942): Timings-DEBUG: 13:47:39.369: 0.033351 (0.000065): ../source/view.c:__create_window:761 configure font
-(process:14942): Timings-DEBUG: 13:47:39.381: 0.045896 (0.012545): ../source/view.c:__create_window:769 textbox setup
-(process:14942): Timings-DEBUG: 13:47:39.381: 0.045944 (0.000048): ../source/view.c:__create_window:781 setup window attributes
-(process:14942): Timings-DEBUG: 13:47:39.381: 0.045955 (0.000011): ../source/view.c:__create_window:791 setup window fullscreen
-(process:14942): Timings-DEBUG: 13:47:39.381: 0.045966 (0.000011): ../source/view.c:__create_window:797 setup window name and class
-(process:14942): Timings-DEBUG: 13:47:39.381: 0.045974 (0.000008): ../source/view.c:__create_window:808 setup startup notification
-(process:14942): Timings-DEBUG: 13:47:39.381: 0.045981 (0.000007): ../source/view.c:__create_window:810 done
-(process:14942): Timings-DEBUG: 13:47:39.381: 0.045992 (0.000011): ../source/rofi.c:startup:679 Create Window
-(process:14942): Timings-DEBUG: 13:47:39.381: 0.045999 (0.000007): ../source/rofi.c:startup:681 Parse ABE
-(process:14942): Timings-DEBUG: 13:47:39.381: 0.046113 (0.000114): ../source/rofi.c:startup:684 Config sanity check
-(process:14942): Timings-DEBUG: 13:47:39.384: 0.048229 (0.002116): ../source/dialogs/run.c:get_apps:216 start
-(process:14942): Timings-DEBUG: 13:47:39.390: 0.054626 (0.006397): ../source/dialogs/run.c:get_apps:336 stop
-(process:14942): Timings-DEBUG: 13:47:39.390: 0.054781 (0.000155): ../source/dialogs/drun.c:get_apps:634 Get Desktop apps (start)
-(process:14942): Timings-DEBUG: 13:47:39.391: 0.055264 (0.000483): ../source/dialogs/drun.c:get_apps:641 Get Desktop apps (user dir)
-(process:14942): Timings-DEBUG: 13:47:39.418: 0.082884 (0.027620): ../source/dialogs/drun.c:get_apps:659 Get Desktop apps (system dirs)
-(process:14942): Timings-DEBUG: 13:47:39.418: 0.082944 (0.000060): ../source/dialogs/drun.c:get_apps_history:597 Start drun history
-(process:14942): Timings-DEBUG: 13:47:39.418: 0.082977 (0.000033): ../source/dialogs/drun.c:get_apps_history:617 Stop drun history
-(process:14942): Timings-DEBUG: 13:47:39.419: 0.083638 (0.000661): ../source/dialogs/drun.c:get_apps:664 Sorting done.
-(process:14942): Timings-DEBUG: 13:47:39.419: 0.083685 (0.000047): ../source/view.c:rofi_view_create:1759
-(process:14942): Timings-DEBUG: 13:47:39.419: 0.083700 (0.000015): ../source/view.c:rofi_view_create:1783 Startup notification
-(process:14942): Timings-DEBUG: 13:47:39.419: 0.083711 (0.000011): ../source/view.c:rofi_view_create:1786 Get active monitor
-(process:14942): Timings-DEBUG: 13:47:39.420: 0.084693 (0.000982): ../source/view.c:rofi_view_refilter:1028 Filter start
-(process:14942): Timings-DEBUG: 13:47:39.421: 0.085992 (0.001299): ../source/view.c:rofi_view_refilter:1132 Filter done
-(process:14942): Timings-DEBUG: 13:47:39.421: 0.086090 (0.000098): ../source/view.c:rofi_view_update:982
-(process:14942): Timings-DEBUG: 13:47:39.421: 0.086123 (0.000033): ../source/view.c:rofi_view_update:1002 Background
-(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
-
-.fi
-.RE
-
-.SH Debug domains
-.PP
-To further debug the plugin, you can get a trace with (lots of) debug
-information. This debug output can be enabled for multiple parts in rofi using
-the glib debug framework. Debug domains can be enabled by setting the
-G_MESSAGES_DEBUG environment variable. At the time of creation of this page,
-the following debug domains exist:
-
-.RS
-.IP \(bu 2
-all: Show debug information from all domains.
-.IP \(bu 2
-X11Helper: The X11 Helper functions.
-.IP \(bu 2
-View: The main window view functions.
-.IP \(bu 2
-Widgets.Box: The Box widget.
-.IP \(bu 2
-Modes.DMenu: The dmenu mode.
-.IP \(bu 2
-Modes.Run: The run mode.
-.IP \(bu 2
-Modes.DRun: The desktop file run mode.
-.IP \(bu 2
-Modes.Window: The window mode.
-.IP \(bu 2
-Modes.Script: The script mode.
-.IP \(bu 2
-Modes.Combi: The script mode.
-.IP \(bu 2
-Modes.Ssh: The ssh mode.
-.IP \(bu 2
-Rofi: The main application.
-.IP \(bu 2
-Timings: Get timing output.
-.IP \(bu 2
-Theme: Theme engine debug output. (warning lots of output).
-.IP \(bu 2
-Widgets.Icon: The Icon widget.
-.IP \(bu 2
-Widgets.Box: The box widget.
-.IP \(bu 2
-Widgets.Container: The container widget.
-.IP \(bu 2
-Widgets.Window: The window widget.
-.IP \(bu 2
-Helpers.IconFetcher: Information about icon lookup.
-
-.RE
-
-.PP
-For full list see \fB\fCman rofi\fR\&.
-
-.PP
-Example: \fB\fCG_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun\fR To get specific output
-from the Desktop file run dialog.
-
-.PP
-To redirect the debug output to a file (\fB\fC~/rofi.log\fR) add:
-
-.PP
-.RS
-
-.nf
-rofi -show drun -log ~/rofi.log
-
-.fi
-.RE
-
-.PP
-Specifying the logfile automatically enabled all log domains.
-This can be useful when rofi is launched from a window manager.
-
-.SH Creating a backtrace
-.PP
-First make sure you compile \fBrofi\fP with debug symbols:
-
-.PP
-.RS
-
-.nf
-make CFLAGS="-O0 -g3" clean rofi
-
-.fi
-.RE
-
-.PP
-Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it
-grabs keyboard and mouse. So if it crashes in GDB you are stuck. The best way
-to go is to enable core file. (ulimit -c unlimited in bash) then make rofi
-crash. You can then load the core in GDB.
-
-.PP
-.RS
-
-.nf
-gdb rofi core
-
-.fi
-.RE
-
-.PP
-Then type inside gdb:
-
-.PP
-.RS
-
-.nf
-thread apply all bt
-
-.fi
-.RE
-
-.PP
-The output trace is useful when reporting crashes.
-
-.PP
-Some distribution have \fB\fCsystemd-coredump\fR, this way you can easily get a
-backtrace via \fB\fCcoredumpctl\fR\&.
-
-.SH SEE ALSO
-.PP
-rofi-sensible-terminal(1), dmenu(1), rofi-debugging(5), rofi-theme(5),
-rofi-script(5), rofi-keys(5),rofi-theme-selector(1)
-
-.SH AUTHOR
-.RS
-.IP \(bu 2
-Qball Cow qball@blame.services
-\[la]mailto:qball@blame.services\[ra]
-
-.RE
diff --git a/doc/rofi-debugging.5.markdown b/doc/rofi-debugging.5.markdown
index 229fe773..4df15d52 100644
--- a/doc/rofi-debugging.5.markdown
+++ b/doc/rofi-debugging.5.markdown
@@ -1,4 +1,4 @@
-# ROFI DEBUGGING 5 rofi debugging
+# rofi-debugging(5)
## NAME
@@ -169,7 +169,7 @@ backtrace via `coredumpctl`.
## SEE ALSO
-rofi-sensible-terminal(1), dmenu(1), rofi-debugging(5), rofi-theme(5),
+rofi-sensible-terminal(1), dmenu(1), rofi-theme(5),
rofi-script(5), rofi-keys(5),rofi-theme-selector(1)
## AUTHOR
diff --git a/doc/rofi-dmenu.5 b/doc/rofi-dmenu.5
deleted file mode 100644
index a2cebe59..00000000
--- a/doc/rofi-dmenu.5
+++ /dev/null
@@ -1,365 +0,0 @@
-.nh
-.TH ROFI-DMENU 5 rofi-dmenu
-.SH NAME
-.PP
-\fBrofi dmenu mode\fP - Rofi dmenu emulation
-
-.SH DESCRIPTION
-.PP
-To integrate \fBrofi\fP into scripts as simple selection dialogs,
-\fBrofi\fP supports emulating \fBdmenu(1)\fP (A dynamic menu for X11).
-
-.PP
-The website for \fB\fCdmenu\fR can be found here
-\[la]http://tools.suckless.org/dmenu/\[ra]\&.
-
-.PP
-\fBrofi\fP does not aim to be 100% compatible with \fB\fCdmenu\fR\&. There are simply too
-many flavors of \fB\fCdmenu\fR\&. The idea is that the basic usage command-line flags
-are obeyed, theme-related flags are not. Besides, \fBrofi\fP offers some extended
-features (like multi-select, highlighting, message bar, extra key bindings).
-
-.SH BASIC CONCEPT
-.PP
-In \fB\fCdmenu\fR mode, \fBrofi\fP reads data from standard in, splits them into
-separate entries and displays them. If the user selects a row, this is printed
-out to standard out, allowing the script to process it further.
-
-.PP
-By default separation of rows is done on new lines, making it easy to pipe the
-output a one application into \fBrofi\fP and the output of rofi into the next.
-
-.SH USAGE
-.PP
-By launching \fBrofi\fP with the \fB\fC-dmenu\fR flag it will go into dmenu emulation
-mode.
-
-.PP
-.RS
-
-.nf
-ls | rofi -dmenu
-
-.fi
-.RE
-
-.SS DMENU DROP-IN REPLACEMENT
-.PP
-If \fB\fCargv[0]\fR (calling command) is dmenu, \fBrofi\fP will start in dmenu mode.
-This way, it can be used as a drop-in replacement for dmenu. Just copy or
-symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&.
-
-.PP
-.RS
-
-.nf
-ln -s /usr/bin/rofi /usr/bin/dmenu
-
-.fi
-.RE
-
-.SS DMENU VS SCRIPT MODE
-.PP
-Script mode is used to extend \fBrofi\fP, dmenu mode is used to extend a script.
-The two do share much of the same input format. Please see the
-\fBrofi-script(5)\fP manpage for more information.
-
-.SS DMENU SPECIFIC COMMANDLINE FLAGS
-.PP
-A lot of these options can also be modified by the script using special input.
-See the \fBrofi-script(5)\fP manpage for more information about this syntax.
-
-.PP
-\fB\fC-sep\fR \fIseparator\fP
-
-.PP
-Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' as a
-separator:
-
-.PP
-.RS
-
-.nf
-echo "a|b|c|d|e" | rofi -sep '|' -dmenu
-
-.fi
-.RE
-
-.PP
-\fB\fC-p\fR \fIprompt\fP
-
-.PP
-Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey',
-a,b,c,d, or e.
-
-.PP
-.RS
-
-.nf
-echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
-