From f290d0fc3b587d2ea53e7e6c37d1cdd2a5a77a0f Mon Sep 17 00:00:00 2001 From: speedie Date: Sun, 2 Apr 2023 01:37:37 +0200 Subject: [PATCH] add a pango section to the documentation, fix some mistakes in the markdown syntax --- docs/docs.md | 308 +++++++++++++++++++++++---------------- docs/example.Xresources | 2 +- spmenu.1 | 310 ++++++++++++++++++++++++---------------- 3 files changed, 367 insertions(+), 253 deletions(-) diff --git a/docs/docs.md b/docs/docs.md index 2134735..68a3319 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -34,379 +34,379 @@ Arguments You may use long, descriptive arguments or the shorter arguments. -`-mh, --lineheight height ` +`-mh, --lineheight height` : Set spmenu line height to height -`-mw, --min-width width ` +`-mw, --min-width width` : Set minimum width to width -`-g, --columns grid ` +`-g, --columns grid` : Set the number of grids to grid -`-gc, --generate-cache ` +`-gc, --generate-cache` : Generate image cache -`-ngc, --no-generate-cache ` +`-ngc, --no-generate-cache` : Don't generate image cache -`-mc, --max-cache size ` +`-mc, --max-cache size` : Set max image cache size to size -`-rw, --relative-width ` +`-rw, --relative-width` : Enable relative input width -`-nrw, --no-relative-width ` +`-nrw, --no-relative-width` : Disable relative input width -`-f, --fast ` +`-f, --fast` : Grabs keyboard before reading stdin -`-F, --fuzzy ` +`-F, --fuzzy` : Enable fuzzy matching -`-NF, --no-fuzzy ` +`-NF, --no-fuzzy` : Disable fuzzy matching -`-P, --password ` +`-P, --password` : Hide characters -`-p, --prompt text ` +`-p, --prompt text` : Set spmenu prompt text to text -`-ip, --indent ` +`-ip, --indent` : Indent items to prompt width -`-nip, --no-indent ` +`-nip, --no-indent` : Don't indent items to prompt width -`-ci, --color-items ` +`-ci, --color-items` : Color items -`-nci, --no-color-items ` +`-nci, --no-color-items` : Don't color items -`-a, --alpha ` +`-a, --alpha` : Enable alpha -`-na, --no-alpha ` +`-na, --no-alpha` : Disable alpha -`-tp, --allow-typing ` +`-tp, --allow-typing` : Allow the user to type -`-nt, --no-allow-typing ` +`-nt, --no-allow-typing` : Don't allow typing, the user must select an option -`-x, --x-position x offset ` +`-x, --x-position x offset` : Offset spmenu x position by x offset -`-y, --y-position y offset ` +`-y, --y-position y offset` : Offset spmenu y position by y offset -`-n, --preselect line ` -: Preselect line in the list of items +`-n, --preselect line` +: Preselect line line in the list of items -`-z, --width width ` +`-z, --width width` : Width of the spmenu window -`-nmt, --normal-mode-text text ` +`-nmt, --normal-mode-text text` : Set normal mode text to text -`-imt, --insert-mode-text text ` +`-imt, --insert-mode-text text` : Set insert mode text to text -`-bw, --border-width width ` +`-bw, --border-width width` : Set width of the border to width . 0 will disable the border -`-so, --sort ` +`-so, --sort` : Sort matches -`-nso, --no-sort ` +`-nso, --no-sort` : Don't sort matches -`-pri, --priority pri1,pri2,pri3 ` +`-pri, --priority pri1,pri2,pri3` : Specify a list of items that take priority -`-s, --case-sensitive ` +`-s, --case-sensitive` : Use case-sensitive matching -`-ns, --case-insensitive ` +`-ns, --case-insensitive` : Use case-insensitive matching -`-nm, --normal ` +`-nm, --normal` : Start spmenu in normal mode -`-im, --insert ` +`-im, --insert` : Start spmenu in insert mode -`-t, --top ` +`-t, --top` : Position spmenu at the top of the screen -`-b, --bottom ` +`-b, --bottom` : Position spmenu at the bottom of the screen -`-c, --center ` +`-c, --center` : Position spmenu at the center of the screen -`-hm, --hide-mode ` +`-hm, --hide-mode` : Hide mode indicator -`-hmc, --hide-match-count ` +`-hmc, --hide-match-count` : Hide match count -`-hla, --hide-left-arrow ` +`-hla, --hide-left-arrow` : Hide left arrow -`-hra, --hide-right-arrow ` +`-hra, --hide-right-arrow` : Hide right arrow -`-hpr, --hide-prompt ` +`-hpr, --hide-prompt` : Hide prompt -`-hip, --hide-input ` +`-hip, --hide-input` : Hide input -`-hpl, --hide-powerline ` +`-hpl, --hide-powerline` : Hide powerline -`-hc, --hide-cursor ` +`-hc, --hide-cursor` : Hide cursor -`-hhl, --hide-highlighting ` +`-hhl, --hide-highlighting` : Hide highlight -`-hi, --hide-image ` +`-hi, --hide-image` : Hide image -`-sm, --show-mode ` +`-sm, --show-mode` : Show mode indicator -`-smc, --show-match-count ` +`-smc, --show-match-count` : Show match count -`-sla, --show-left-arrow ` +`-sla, --show-left-arrow` : Show left arrow -`-sra, --show-right-arrow ` +`-sra, --show-right-arrow` : Show right arrow -`-spr, --show-prompt ` +`-spr, --show-prompt` : Show prompt -`-sin, --show-input ` +`-sin, --show-input` : Show input -`-spl, --show-powerline ` +`-spl, --show-powerline` : Show powerline -`-sc, --show-cursor ` +`-sc, --show-cursor` : Show cursor -`-shl, --show-highlighting ` +`-shl, --show-highlighting` : Show highlight -`-si, --show-image ` +`-si, --show-image` : Show image -`-xrdb, --xrdb ` +`-xrdb, --xrdb` : Load .Xresources on runtime -`-nxrdb, --no-xrdb ` +`-nxrdb, --no-xrdb` : Don't load .Xresources on runtime -`-gbc, --global-colors ` +`-gbc, --global-colors` : Recognize global colors (such as *.color1) on runtime -`-ngbc, --no-global-colors ` +`-ngbc, --no-global-colors` : Don't recognize global colors (such as *.color1) on runtime -`-m, --monitor monitor ` +`-m, --monitor monitor` : Specify a monitor to run spmenu on -`-w, --embed window id ` +`-w, --embed window id` : Embed spmenu inside window id -`-H, --hist-file hist file ` +`-H, --hist-file hist file` : Specify a path to save the history to -`-ig, --image-gaps gaps ` +`-ig, --image-gaps gaps` : Set image gaps to gaps -`-txp, --text-padding padding ` +`-txp, --text-padding padding` : Set text padding to padding -`-lp, --vertical-padding padding ` +`-lp, --vertical-padding padding` : Set the vertical padding -`-hp, --horizontal-padding padding ` +`-hp, --horizontal-padding padding` : Set the horizontal padding -`-la, --left-arrow-symbol symbol ` +`-la, --left-arrow-symbol symbol` : Set the left arrow to symbol -`-ra, --right-arrow-symbol symbol ` +`-ra, --right-arrow-symbol symbol` : Set the right arrow to symbol -`-is, --image-size size ` +`-is, --image-size size` : Image size -`-it, --image-top ` +`-it, --image-top` : Position the image at the top -`-ib, --image-bottom ` +`-ib, --image-bottom` : Position the image at the bottom -`-ic, --image-center ` +`-ic, --image-center` : Position the image in the center -`-itc, --image-topcenter ` +`-itc, --image-topcenter` : Position the image in the top center -`-wm, --managed, --x11-client ` +`-wm, --managed, --x11-client` : Spawn spmenu as a window manager controlled client/window. Useful for testing -`-nwm, --unmanaged ` +`-nwm, --unmanaged` : Don't spawn spmenu as a window manager controlled client/window. Useful for testing -`-lcfg, --load-config ` +`-lcfg, --load-config` : Load spmenu configuration (~/.spmenu or ~/.config/spmenu/spmenurc) -`-ncfg, --no-load-config ` +`-ncfg, --no-load-config` : Don't load spmenu configuration (~/.spmenu or ~/.config/spmenu/spmenurc) -`-v, --version ` +`-v, --version` : Print spmenu version to stdout -`-fn, --font font` +`-fn, --font font` : Set the spmenu font to font -`-nif, --normal-item-foreground color ` +`-nif, --normal-item-foreground color` : Set the normal item foreground color -`-nib, --normal-item-background color ` +`-nib, --normal-item-background color` : Set the normal item background color -`-sif, --selected-item-foreground color ` +`-sif, --selected-item-foreground color` : Set the selected item foreground color -`-sib, --selected-item-background color ` +`-sib, --selected-item-background color` : Set the selected item background color -`-npf, --normal-item-priority-foreground color ` +`-npf, --normal-item-priority-foreground color` : Set the normal item (high priority) foreground color -`-npb, --normal-item-priority-background color ` +`-npb, --normal-item-priority-background color` : Set the normal item (high priority) background color -`-spf, --selected-item-priority-foreground color ` +`-spf, --selected-item-priority-foreground color` : Set the selected item (high priority) foreground color -`-spb, --selected-item-priority-background color ` +`-spb, --selected-item-priority-background color` : Set the selected item (high priority) background color -`-pfg, --prompt-foreground color ` +`-pfg, --prompt-foreground color` : Set the prompt foreground color -`-pbg, --prompt-background color ` +`-pbg, --prompt-background color` : Set the prompt background color -`-ifg, --input-foreground color ` +`-ifg, --input-foreground color` : Set input foreground color -`-ibg, --input-background color ` +`-ibg, --input-background color` : Set input background color -`-mnbg, --menu-background color ` +`-mnbg, --menu-background color` : Set the menu background color -`-nhf, --normal-highlight-foreground color ` +`-nhf, --normal-highlight-foreground color` : Set the normal highlight foreground color -`-nhb, --normal-highlight-background color ` +`-nhb, --normal-highlight-background color` : Set the normal highlight background color -`-shf, --selected-highlight-foreground color ` +`-shf, --selected-highlight-foreground color` : Set the selected highlight foreground color -`-shb, --selected-highlight-background color ` +`-shb, --selected-highlight-background color` : Set the selected highlight background color -`-nfg, --number-foreground color ` +`-nfg, --number-foreground color` : Set the foreground color for the match count -`-nbg, --number-background color ` +`-nbg, --number-background color` : Set the background color for the match count -`-mfg, --mode-foreground color ` +`-mfg, --mode-foreground color` : Set the foreground color for the mode indicator -`-mbg, --mode-background color ` +`-mbg, --mode-background color` : Set the background color for the mode indicator -`-laf, --left-arrow-foreground color ` +`-laf, --left-arrow-foreground color` : Set the left arrow foreground color -`-raf, --right-arrow-foreground color ` +`-raf, --right-arrow-foreground color` : Set the right arrow foreground color -`-lab, --left-arrow-background color ` +`-lab, --left-arrow-background color` : Set the left arrow background color -`-rab, --right-arrow-background color ` +`-rab, --right-arrow-background color` : Set the right arrow background color -`-cc, --caret-foreground color ` +`-cc, --caret-foreground color` : Set the caret color -`-bc, --border-background color ` +`-bc, --border-background color` : Set the border color -`-sgr0, --sgr0 color ` +`-sgr0, --sgr0 color` : Set the SGR 0 color -`-sgr1, --sgr1 color ` +`-sgr1, --sgr1 color` : Set the SGR 1 color -`-sgr2, --sgr2 color ` +`-sgr2, --sgr2 color` : Set the SGR 2 color -`-sgr3, --sgr3 color ` +`-sgr3, --sgr3 color` : Set the SGR 3 color -`-sgr4, --sgr4 color ` +`-sgr4, --sgr4 color` : Set the SGR 4 color -`-sgr5, --sgr5 color ` +`-sgr5, --sgr5 color` : Set the SGR 5 color -`-sgr6, --sgr6 color ` +`-sgr6, --sgr6 color` : Set the SGR 6 color -`-sgr7, --sgr7 color ` +`-sgr7, --sgr7 color` : Set the SGR 7 color -`-sgr8, --sgr8 color ` +`-sgr8, --sgr8 color` : Set the SGR 8 color -`-sgr9, --sgr9 color ` +`-sgr9, --sgr9 color` : Set the SGR 9 color -`-sgr10, --sgr10 color ` +`-sgr10, --sgr10 color` : Set the SGR 10 color -`-sgr11, --sgr11 color ` +`-sgr11, --sgr11 color` : Set the SGR 11 color -`-sgr12, --sgr12 color ` +`-sgr12, --sgr12 color` : Set the SGR 12 color -`-sgr13, --sgr13 color ` +`-sgr13, --sgr13 color` : Set the SGR 13 color -`-sgr14, --sgr14 color ` +`-sgr14, --sgr14 color` : Set the SGR 14 color -`-sgr15, --sgr15 color ` +`-sgr15, --sgr15 color` : Set the SGR 15 color dmenu compatibility can be achieved using these arguments: @@ -512,6 +512,56 @@ spmenu supports most color sequences, although not true color by default There are a few arguments, you can override SGR colors on-the-fly using the `-sgrX` arguments. See 'Arguments' for more information. +Just as a tip, you can pipe your colored spmenu output +to `sed -e 's/\x1b\[[0-9;]*m//g'`. This will clear the SGR sequences from the output. +This is useful when you want to check what the output actually is. + +Pango markup +============ + +If spmenu was compiled with Pango enabled (default), you should be able to +utilize Pango markup in every part of spmenu. That is, the mode indicator, +items, input, prompt, etc. + +Pango markup allows you to style text similar to an HTML document. It also +provides the `` tag, which can be used to do surprisingly complex things. + +There are many convenient tags as well which can be used to +avoid using a `` tag, such as: + +`` +: **Bold** text (`Bold`) + +`` +: *Italic* text (`Italic`) + +`` +: Strikethrough text (`Strikethrough`) + +`` +: Underline text (`Underline`) + +`` +: Subscript (`Subscript`) + +`` +: Superscript (`Supscript`) + +`` +: Monospace font (`Monospaced font is used here`) + +`` +: Small text (`text is so small here`) + +`` +: Big text (`text is so big here`) + +Note that Pango markup is NOT escaped, and is piped to stdout. Therefore you +need to parse it manually. Doing so with `sed` is very easy. For example: +`... | spmenu ... | sed 's///g; s///g'` + +See [this page](https://docs.gtk.org/Pango/pango_markup.html) for more information. + Configuration ============= @@ -618,3 +668,9 @@ License spmenu is licensed under the MIT license because that's the original suckless license. See the included LICENSE file for more information. + +Reporting issues +================ + +Please report issues on the +[Codeberg repository](https://codeberg.org/speedie/speediegq) or alternatively email me. diff --git a/docs/example.Xresources b/docs/example.Xresources index 2dcadc5..f82bfed 100644 --- a/docs/example.Xresources +++ b/docs/example.Xresources @@ -118,7 +118,7 @@ spmenu.hideimage: 0 spmenu.prompt: spmenu.normtext: Normal spmenu.instext: Insert -spmenu.password: . +spmenu.password: * !! Pango markup toggles spmenu.pango_item: 1 diff --git a/spmenu.1 b/spmenu.1 index 15f2d67..e3579ea 100644 --- a/spmenu.1 +++ b/spmenu.1 @@ -50,384 +50,384 @@ See a list below for a list. .PP You may use long, descriptive arguments or the shorter arguments. .TP -\f[V]-mh, --lineheight height\f[R] +\f[V]-mh, --lineheight height\f[R] Set spmenu line height to height .TP -\f[V]-mw, --min-width width\f[R] +\f[V]-mw, --min-width width\f[R] Set minimum width to width .TP -\f[V]-g, --columns grid\f[R] +\f[V]-g, --columns grid\f[R] Set the number of grids to grid .TP -\f[V]-gc, --generate-cache\f[R] +\f[V]-gc, --generate-cache\f[R] Generate image cache .TP -\f[V]-ngc, --no-generate-cache\f[R] +\f[V]-ngc, --no-generate-cache\f[R] Don\[cq]t generate image cache .TP -\f[V]-mc, --max-cache size\f[R] +\f[V]-mc, --max-cache size\f[R] Set max image cache size to size .TP -\f[V]-rw, --relative-width\f[R] +\f[V]-rw, --relative-width\f[R] Enable relative input width .TP -\f[V]-nrw, --no-relative-width\f[R] +\f[V]-nrw, --no-relative-width\f[R] Disable relative input width .TP -\f[V]-f, --fast\f[R] +\f[V]-f, --fast\f[R] Grabs keyboard before reading stdin .TP -\f[V]-F, --fuzzy\f[R] +\f[V]-F, --fuzzy\f[R] Enable fuzzy matching .TP -\f[V]-NF, --no-fuzzy\f[R] +\f[V]-NF, --no-fuzzy\f[R] Disable fuzzy matching .TP -\f[V]-P, --password\f[R] +\f[V]-P, --password\f[R] Hide characters .TP -\f[V]-p, --prompt text\f[R] +\f[V]-p, --prompt text\f[R] Set spmenu prompt text to text .TP -\f[V]-ip, --indent\f[R] +\f[V]-ip, --indent\f[R] Indent items to prompt width .TP -\f[V]-nip, --no-indent\f[R] +\f[V]-nip, --no-indent\f[R] Don\[cq]t indent items to prompt width .TP -\f[V]-ci, --color-items\f[R] +\f[V]-ci, --color-items\f[R] Color items .TP -\f[V]-nci, --no-color-items\f[R] +\f[V]-nci, --no-color-items\f[R] Don\[cq]t color items .TP -\f[V]-a, --alpha\f[R] +\f[V]-a, --alpha\f[R] Enable alpha .TP -\f[V]-na, --no-alpha\f[R] +\f[V]-na, --no-alpha\f[R] Disable alpha .TP -\f[V]-tp, --allow-typing\f[R] +\f[V]-tp, --allow-typing\f[R] Allow the user to type .TP -\f[V]-nt, --no-allow-typing\f[R] +\f[V]-nt, --no-allow-typing\f[R] Don\[cq]t allow typing, the user must select an option .TP -\f[V]-x, --x-position x offset\f[R] +\f[V]-x, --x-position x offset\f[R] Offset spmenu x position by x offset .TP -\f[V]-y, --y-position y offset\f[R] +\f[V]-y, --y-position y offset\f[R] Offset spmenu y position by y offset .TP -\f[V]-n, --preselect line\f[R] -Preselect line in the list of items +\f[V]-n, --preselect line\f[R] +Preselect line line in the list of items .TP -\f[V]-z, --width width\f[R] +\f[V]-z, --width width\f[R] Width of the spmenu window .TP -\f[V]-nmt, --normal-mode-text text\f[R] +\f[V]-nmt, --normal-mode-text text\f[R] Set normal mode text to text .TP -\f[V]-imt, --insert-mode-text text\f[R] +\f[V]-imt, --insert-mode-text text\f[R] Set insert mode text to text .TP -\f[V]-bw, --border-width width\f[R] +\f[V]-bw, --border-width width\f[R] Set width of the border to width . 0 will disable the border .TP -\f[V]-so, --sort\f[R] +\f[V]-so, --sort\f[R] Sort matches .TP -\f[V]-nso, --no-sort\f[R] +\f[V]-nso, --no-sort\f[R] Don\[cq]t sort matches .TP -\f[V]-pri, --priority pri1,pri2,pri3\f[R] +\f[V]-pri, --priority pri1,pri2,pri3\f[R] Specify a list of items that take priority .TP -\f[V]-s, --case-sensitive\f[R] +\f[V]-s, --case-sensitive\f[R] Use case-sensitive matching .TP -\f[V]-ns, --case-insensitive\f[R] +\f[V]-ns, --case-insensitive\f[R] Use case-insensitive matching .TP -\f[V]-nm, --normal\f[R] +\f[V]-nm, --normal\f[R] Start spmenu in normal mode .TP -\f[V]-im, --insert\f[R] +\f[V]-im, --insert\f[R] Start spmenu in insert mode .TP -\f[V]-t, --top\f[R] +\f[V]-t, --top\f[R] Position spmenu at the top of the screen .TP -\f[V]-b, --bottom\f[R] +\f[V]-b, --bottom\f[R] Position spmenu at the bottom of the screen .TP -\f[V]-c, --center\f[R] +\f[V]-c, --center\f[R] Position spmenu at the center of the screen .TP -\f[V]-hm, --hide-mode\f[R] +\f[V]-hm, --hide-mode\f[R] Hide mode indicator .TP -\f[V]-hmc, --hide-match-count\f[R] +\f[V]-hmc, --hide-match-count\f[R] Hide match count .TP -\f[V]-hla, --hide-left-arrow\f[R] +\f[V]-hla, --hide-left-arrow\f[R] Hide left arrow .TP -\f[V]-hra, --hide-right-arrow\f[R] +\f[V]-hra, --hide-right-arrow\f[R] Hide right arrow .TP -\f[V]-hpr, --hide-prompt\f[R] +\f[V]-hpr, --hide-prompt\f[R] Hide prompt .TP -\f[V]-hip, --hide-input\f[R] +\f[V]-hip, --hide-input\f[R] Hide input .TP -\f[V]-hpl, --hide-powerline\f[R] +\f[V]-hpl, --hide-powerline\f[R] Hide powerline .TP -\f[V]-hc, --hide-cursor\f[R] +\f[V]-hc, --hide-cursor\f[R] Hide cursor .TP -\f[V]-hhl, --hide-highlighting\f[R] +\f[V]-hhl, --hide-highlighting\f[R] Hide highlight .TP -\f[V]-hi, --hide-image\f[R] +\f[V]-hi, --hide-image\f[R] Hide image .TP -\f[V]-sm, --show-mode\f[R] +\f[V]-sm, --show-mode\f[R] Show mode indicator .TP -\f[V]-smc, --show-match-count\f[R] +\f[V]-smc, --show-match-count\f[R] Show match count .TP -\f[V]-sla, --show-left-arrow\f[R] +\f[V]-sla, --show-left-arrow\f[R] Show left arrow .TP -\f[V]-sra, --show-right-arrow\f[R] +\f[V]-sra, --show-right-arrow\f[R] Show right arrow .TP -\f[V]-spr, --show-prompt\f[R] +\f[V]-spr, --show-prompt\f[R] Show prompt .TP -\f[V]-sin, --show-input\f[R] +\f[V]-sin, --show-input\f[R] Show input .TP -\f[V]-spl, --show-powerline\f[R] +\f[V]-spl, --show-powerline\f[R] Show powerline .TP -\f[V]-sc, --show-cursor\f[R] +\f[V]-sc, --show-cursor\f[R] Show cursor .TP -\f[V]-shl, --show-highlighting\f[R] +\f[V]-shl, --show-highlighting\f[R] Show highlight .TP -\f[V]-si, --show-image\f[R] +\f[V]-si, --show-image\f[R] Show image .TP -\f[V]-xrdb, --xrdb\f[R] +\f[V]-xrdb, --xrdb\f[R] Load .Xresources on runtime .TP -\f[V]-nxrdb, --no-xrdb\f[R] +\f[V]-nxrdb, --no-xrdb\f[R] Don\[cq]t load .Xresources on runtime .TP -\f[V]-gbc, --global-colors\f[R] +\f[V]-gbc, --global-colors\f[R] Recognize global colors (such as *.color1) on runtime .TP -\f[V]-ngbc, --no-global-colors\f[R] +\f[V]-ngbc, --no-global-colors\f[R] Don\[cq]t recognize global colors (such as *.color1) on runtime .TP -\f[V]-m, --monitor monitor\f[R] +\f[V]-m, --monitor monitor\f[R] Specify a monitor to run spmenu on .TP -\f[V]-w, --embed window id\f[R] +\f[V]-w, --embed window id\f[R] Embed spmenu inside window id .TP -\f[V]-H, --hist-file hist file\f[R] +\f[V]-H, --hist-file hist file\f[R] Specify a path to save the history to .TP -\f[V]-ig, --image-gaps gaps\f[R] +\f[V]-ig, --image-gaps gaps\f[R] Set image gaps to gaps .TP -\f[V]-txp, --text-padding padding\f[R] +\f[V]-txp, --text-padding padding\f[R] Set text padding to padding .TP -\f[V]-lp, --vertical-padding padding\f[R] +\f[V]-lp, --vertical-padding padding\f[R] Set the vertical padding .TP -\f[V]-hp, --horizontal-padding padding\f[R] +\f[V]-hp, --horizontal-padding padding\f[R] Set the horizontal padding .TP -\f[V]-la, --left-arrow-symbol symbol\f[R] +\f[V]-la, --left-arrow-symbol symbol\f[R] Set the left arrow to symbol .TP -\f[V]-ra, --right-arrow-symbol symbol\f[R] +\f[V]-ra, --right-arrow-symbol symbol\f[R] Set the right arrow to symbol .TP -\f[V]-is, --image-size size\f[R] +\f[V]-is, --image-size size\f[R] Image size .TP -\f[V]-it, --image-top\f[R] +\f[V]-it, --image-top\f[R] Position the image at the top .TP -\f[V]-ib, --image-bottom\f[R] +\f[V]-ib, --image-bottom\f[R] Position the image at the bottom .TP -\f[V]-ic, --image-center\f[R] +\f[V]-ic, --image-center\f[R] Position the image in the center .TP -\f[V]-itc, --image-topcenter\f[R] +\f[V]-itc, --image-topcenter\f[R] Position the image in the top center .TP -\f[V]-wm, --managed, --x11-client\f[R] +\f[V]-wm, --managed, --x11-client\f[R] Spawn spmenu as a window manager controlled client/window. Useful for testing .TP -\f[V]-nwm, --unmanaged\f[R] +\f[V]-nwm, --unmanaged\f[R] Don\[cq]t spawn spmenu as a window manager controlled client/window. Useful for testing .TP -\f[V]-lcfg, --load-config\f[R] +\f[V]-lcfg, --load-config\f[R] Load spmenu configuration (\[ti]/.spmenu or \[ti]/.config/spmenu/spmenurc) .TP -\f[V]-ncfg, --no-load-config\f[R] +\f[V]-ncfg, --no-load-config\f[R] Don\[cq]t load spmenu configuration (\[ti]/.spmenu or \[ti]/.config/spmenu/spmenurc) .TP -\f[V]-v, --version\f[R] +\f[V]-v, --version\f[R] Print spmenu version to stdout .TP -\f[V]-fn, --font font\f[R] +\f[V]-fn, --font font\f[R] Set the spmenu font to font .TP -\f[V]-nif, --normal-item-foreground color\f[R] +\f[V]-nif, --normal-item-foreground color\f[R] Set the normal item foreground color .TP -\f[V]-nib, --normal-item-background color\f[R] +\f[V]-nib, --normal-item-background color\f[R] Set the normal item background color .TP -\f[V]-sif, --selected-item-foreground color\f[R] +\f[V]-sif, --selected-item-foreground color\f[R] Set the selected item foreground color .TP -\f[V]-sib, --selected-item-background color\f[R] +\f[V]-sib, --selected-item-background color\f[R] Set the selected item background color .TP -\f[V]-npf, --normal-item-priority-foreground color\f[R] +\f[V]-npf, --normal-item-priority-foreground color\f[R] Set the normal item (high priority) foreground color .TP -\f[V]-npb, --normal-item-priority-background color\f[R] +\f[V]-npb, --normal-item-priority-background color\f[R] Set the normal item (high priority) background color .TP -\f[V]-spf, --selected-item-priority-foreground color\f[R] +\f[V]-spf, --selected-item-priority-foreground color\f[R] Set the selected item (high priority) foreground color .TP -\f[V]-spb, --selected-item-priority-background color\f[R] +\f[V]-spb, --selected-item-priority-background color\f[R] Set the selected item (high priority) background color .TP -\f[V]-pfg, --prompt-foreground color\f[R] +\f[V]-pfg, --prompt-foreground color\f[R] Set the prompt foreground color .TP -\f[V]-pbg, --prompt-background color\f[R] +\f[V]-pbg, --prompt-background color\f[R] Set the prompt background color .TP -\f[V]-ifg, --input-foreground color\f[R] +\f[V]-ifg, --input-foreground color\f[R] Set input foreground color .TP -\f[V]-ibg, --input-background color\f[R] +\f[V]-ibg, --input-background color\f[R] Set input background color .TP -\f[V]-mnbg, --menu-background color\f[R] +\f[V]-mnbg, --menu-background color\f[R] Set the menu background color .TP -\f[V]-nhf, --normal-highlight-foreground color\f[R] +\f[V]-nhf, --normal-highlight-foreground color\f[R] Set the normal highlight foreground color .TP -\f[V]-nhb, --normal-highlight-background color\f[R] +\f[V]-nhb, --normal-highlight-background color\f[R] Set the normal highlight background color .TP -\f[V]-shf, --selected-highlight-foreground color\f[R] +\f[V]-shf, --selected-highlight-foreground color\f[R] Set the selected highlight foreground color .TP -\f[V]-shb, --selected-highlight-background color\f[R] +\f[V]-shb, --selected-highlight-background color\f[R] Set the selected highlight background color .TP -\f[V]-nfg, --number-foreground color\f[R] +\f[V]-nfg, --number-foreground color\f[R] Set the foreground color for the match count .TP -\f[V]-nbg, --number-background color\f[R] +\f[V]-nbg, --number-background color\f[R] Set the background color for the match count .TP -\f[V]-mfg, --mode-foreground color\f[R] +\f[V]-mfg, --mode-foreground color\f[R] Set the foreground color for the mode indicator .TP -\f[V]-mbg, --mode-background color\f[R] +\f[V]-mbg, --mode-background color\f[R] Set the background color for the mode indicator .TP -\f[V]-laf, --left-arrow-foreground color\f[R] +\f[V]-laf, --left-arrow-foreground color\f[R] Set the left arrow foreground color .TP -\f[V]-raf, --right-arrow-foreground color\f[R] +\f[V]-raf, --right-arrow-foreground color\f[R] Set the right arrow foreground color .TP -\f[V]-lab, --left-arrow-background color\f[R] +\f[V]-lab, --left-arrow-background color\f[R] Set the left arrow background color .TP -\f[V]-rab, --right-arrow-background color\f[R] +\f[V]-rab, --right-arrow-background color\f[R] Set the right arrow background color .TP -\f[V]-cc, --caret-foreground color\f[R] +\f[V]-cc, --caret-foreground color\f[R] Set the caret color .TP -\f[V]-bc, --border-background color\f[R] +\f[V]-bc, --border-background color\f[R] Set the border color .TP -\f[V]-sgr0, --sgr0 color\f[R] +\f[V]-sgr0, --sgr0 color\f[R] Set the SGR 0 color .TP -\f[V]-sgr1, --sgr1 color\f[R] +\f[V]-sgr1, --sgr1 color\f[R] Set the SGR 1 color .TP -\f[V]-sgr2, --sgr2 color\f[R] +\f[V]-sgr2, --sgr2 color\f[R] Set the SGR 2 color .TP -\f[V]-sgr3, --sgr3 color\f[R] +\f[V]-sgr3, --sgr3 color\f[R] Set the SGR 3 color .TP -\f[V]-sgr4, --sgr4 color\f[R] +\f[V]-sgr4, --sgr4 color\f[R] Set the SGR 4 color .TP -\f[V]-sgr5, --sgr5 color\f[R] +\f[V]-sgr5, --sgr5 color\f[R] Set the SGR 5 color .TP -\f[V]-sgr6, --sgr6 color\f[R] +\f[V]-sgr6, --sgr6 color\f[R] Set the SGR 6 color .TP -\f[V]-sgr7, --sgr7 color\f[R] +\f[V]-sgr7, --sgr7 color\f[R] Set the SGR 7 color .TP -\f[V]-sgr8, --sgr8 color\f[R] +\f[V]-sgr8, --sgr8 color\f[R] Set the SGR 8 color .TP -\f[V]-sgr9, --sgr9 color\f[R] +\f[V]-sgr9, --sgr9 color\f[R] Set the SGR 9 color .TP -\f[V]-sgr10, --sgr10 color\f[R] +\f[V]-sgr10, --sgr10 color\f[R] Set the SGR 10 color .TP -\f[V]-sgr11, --sgr11 color\f[R] +\f[V]-sgr11, --sgr11 color\f[R] Set the SGR 11 color .TP -\f[V]-sgr12, --sgr12 color\f[R] +\f[V]-sgr12, --sgr12 color\f[R] Set the SGR 12 color .TP -\f[V]-sgr13, --sgr13 color\f[R] +\f[V]-sgr13, --sgr13 color\f[R] Set the SGR 13 color .TP -\f[V]-sgr14, --sgr14 color\f[R] +\f[V]-sgr14, --sgr14 color\f[R] Set the SGR 14 color .TP -\f[V]-sgr15, --sgr15 color\f[R] +\f[V]-sgr15, --sgr15 color\f[R] Set the SGR 15 color .PP dmenu compatibility can be achieved using these arguments: @@ -535,6 +535,59 @@ spmenu supports most color sequences, although not true color by default There are a few arguments, you can override SGR colors on-the-fly using the \f[V]-sgrX\f[R] arguments. See `Arguments' for more information. +.PP +Just as a tip, you can pipe your colored spmenu output to +\f[V]sed -e \[aq]s/\[rs]x1b\[rs][[0-9;]*m//g\[aq]\f[R]. +This will clear the SGR sequences from the output. +This is useful when you want to check what the output actually is. +.SH Pango markup +.PP +If spmenu was compiled with Pango enabled (default), you should be able +to utilize Pango markup in every part of spmenu. +That is, the mode indicator, items, input, prompt, etc. +.PP +Pango markup allows you to style text similar to an HTML document. +It also provides the \f[V]\f[R] tag, which can be used to do +surprisingly complex things. +.PP +There are many convenient tags as well which can be used to avoid using +a \f[V]\f[R] tag, such as: +.TP +\f[V]\f[R] +\f[B]Bold\f[R] text (\f[V]Bold\f[R]) +.TP +\f[V]\f[R] +\f[I]Italic\f[R] text (\f[V]Italic\f[R]) +.TP +\f[V]\f[R] +Strikethrough text (\f[V]Strikethrough\f[R]) +.TP +\f[V]\f[R] +Underline text (\f[V]Underline\f[R]) +.TP +\f[V]\f[R] +Subscript (\f[V]Subscript\f[R]) +.TP +\f[V]\f[R] +Superscript (\f[V]Supscript\f[R]) +.TP +\f[V]\f[R] +Monospace font (\f[V]Monospaced font is used here\f[R]) +.TP +\f[V]\f[R] +Small text (\f[V]text is so small here\f[R]) +.TP +\f[V]\f[R] +Big text (\f[V]text is so big here\f[R]) +.PP +Note that Pango markup is NOT escaped, and is piped to stdout. +Therefore you need to parse it manually. +Doing so with \f[V]sed\f[R] is very easy. +For example: +\f[V]... | spmenu ... | sed \[aq]s///g; s///g\[aq]\f[R] +.PP +See this page (https://docs.gtk.org/Pango/pango_markup.html) for more +information. .SH Configuration .PP spmenu has .Xresources (xrdb) support built in. @@ -654,3 +707,8 @@ Report any weird issues you may have. spmenu is licensed under the MIT license because that\[cq]s the original suckless license. See the included LICENSE file for more information. +.SH Reporting issues +.PP +Please report issues on the Codeberg +repository (https://codeberg.org/speedie/speediegq) or alternatively +email me.