A text-based bookmark manager rendered in a web page
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

527 lines
49 KiB

<html>
<head>
<title> Configuration - bakkeby/dmenu GitHub Wiki </title>
<style>
#main {
max-width: 38rem;
margin: auto;
overflow-wrap: break-word;
min-width: 0;
background-color: white;
}
body {
background-image: url('/callToAction.svg');
}
img {
max-width: 100%;
height: auto;
}
#header_button {
position: sticky;
top: 0;
padding: 10px;
border-style: ridge;
border-color: lightgrey;
border-width: thin;
color: red;
font-weight: bold;
background-color: honeydew;
font-size: large;
}
#header_button p {
margin-bottom: 0;
margin-top: 0;
}
#header_info {
padding: 10px;
border-style: ridge;
border-color: lightgrey;
border-width: thin;
color: red;
font-weight: bold;
background-color: honeydew;
font-size: large;
}
#content,
#index {
padding-left: 10px;
padding-right: 10px;
}
#footer_info {
position: sticky;
bottom: 0;
padding: 10px;
border-style: ridge;
border-color: lightgrey;
border-width: thin;
color: red;
font-weight: bold;
background-color: honeydew;
}
#footer_info .blocks {
background: black;
color: white;
/* outline: 1px solid blue; */
padding: .1em .2em;
}
/* Hide useless-parts of transcluded HTML */
.width-full.input-group {
display: none;
}
h5:nth-last-child(2) {
display: none;
}
.Box-row.wiki-more-pages-link {
display: none;
}
.filter-bar {
display: none;
}
.Box-title>.octicon {
display: none;
}
.anchor {
display: none;
}
pre {
overflow: auto;
}
#main {
word-wrap: break-word;
}
.Counter {
background-color: lightgray;
border-radius: 20px;
padding: 0 10px;
}
table {
max-width: 100%;
overflow: auto;
width: 100%;
display: block;
}
.js-wiki-sidebar-toc-toggle-chevron-button {
display: none;
}
a.visit_url_button {
display: inline-block;
padding: 0.4em 0.4em;
margin: 0em 0.3em 0.3em 0;
border-radius: 01.15em;
box-sizing: border-box;
text-decoration: none;
font-family: sans-serif;
text-transform: uppercase;
font-size: 1.7em;
font-weight: 800;
color: #FFFFFF;
background-color: #3369ff;
box-shadow: inset 0 -0.6em 0 -0.3em rgba(0, 0, 0, 0.17);
text-align: center;
/* position: relative; */
width: 100%;
}
a.visit_url_button:active {
top: 0.1em;
}
a.visit_url_button:hover {
background-color: #678ffd;
/* border-color: rgba(255, 255, 255, 1); */
}
@media all and (max-width:30em) {
a.visit_url_button {
display: block;
margin: 0.4em auto;
}
}
/* Broken Images */
img:before {
content: "⚠️ MISSING OR BROKEN IMAGE RENDERING ERROR: PLEASE VIEW ORIGINAL PAGE ON GITHUB.COM ⚠️";
display: block;
margin-bottom: 10px;
}
@font-face {
font-family: "color-emoji";
src: local("Apple Color Emoji"),
local("Segoe UI Emoji"),
local("Segoe UI Symbol"),
local("Noto Color Emoji");
}
.emoji {
font-family: "color-emoji";
}
table,
th,
td {
border: 1px solid black;
}
.visit_url_link {
font-size: xx-large;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:type" content="website">
<meta property="og:title" content="Configuration - bakkeby/dmenu GitHub Wiki">
</head>
<body>
<div id="main">
<nav id="header_button">
<p>⚠️ The <a href="https://en.wiktionary.org/wiki/indexable">indexable</a> preview below may have
<em>rendering errors</em>, <em>broken links</em>, and <em>missing images</em>. <a href="https://github.com/bakkeby/dmenu/wiki/Configuration"> Please view the original page on GitHub.com and not this indexable
preview if you intend to <em>use</em> this content. </a></p>
</nav>
<aside id="header_info">
<a href="https://github.com/bakkeby/dmenu/wiki/Configuration" class="visit_url_button">Click / TAP HERE TO View Page on GitHub.com ➡️</a>
<p>📄 URL: <a href="https://github.com/bakkeby/dmenu/wiki/Configuration" class="visit_url_link">https://github.com/bakkeby/dmenu/wiki/Configuration</a>
</p>
<p>There are <em>no ads</em> in this search engine enabler service. The button and/or link above will take
you <em>directly</em> to GitHub.</p>
<p>📅 Last Modified: Wed, 29 Mar 2023 09:57:03 GMT</p></aside>
<article id="content">
<h1>Configuration - bakkeby/dmenu GitHub Wiki</h1>
<div id="mirrored"> <html><head></head><body><div class="markdown-body">
<p>This section outlines the various configuration options in <code>config.h</code>, what they do and what to
refer to.</p>
<p>The general principle here is that the configuration defines the default behaviour of dmenu while
most features and functionality can be enabled (or disabled) using command line arguments.</p>
<div class="markdown-heading"><h3 class="heading-element">fonts</h3><a class="anchor" id="user-content-fonts" aria-label="Permalink: fonts" href="#fonts"><svg viewBox="0 0 16 16" class="octicon octicon-link" version="1.1" width="16" aria-hidden="true" height="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* -fn option overrides fonts[0]; default X11 font or font set */
static char *fonts[] =
{
&quot;monospace:size=10&quot;
};"><pre><span class="pl-c">/* -fn option overrides fonts[0]; default X11 font or font set */</span>
<span class="pl-k">static</span> <span class="pl-smi">char</span> <span class="pl-c1">*</span><span class="pl-s1">fonts</span>[] <span class="pl-c1">=</span>
{
<span class="pl-s">"monospace:size=10"</span>
};</pre></div>
<p>The <code>fonts</code> config is a list of font names that the dmenu will use for displaying text.</p>
<p>The first in the list will be the primary font while the rest will be fallback fonts that are used
should the primary font does not have a specific glyph (character).</p>
<p>The font names can generally be found by using the <code>fc-list</code> command in a terminal.</p>
<p>Keep in mind that not all fonts are created equally. When combining different fonts they may have
to be set to different sizes to appear roughly the same.</p>
<p>If text size is significantly different to the size of symbols then you can try setting <code>pixelsize</code>
instead of <code>size</code> in the font string.</p>
<p>Refer to the <a href="ColorEmoji">ColorEmoji</a> functionality if you plan to enable coloured emoji in the bar.</p>
<p>Refer to the fontconfig page for details when it comes to system configuration:</p>
<ul>
<li><a href="https://freedesktop.org/software/fontconfig/fontconfig-user.html" rel="nofollow ugc">https://freedesktop.org/software/fontconfig/fontconfig-user.html</a></li>
</ul>
<div class="markdown-heading"><h3 class="heading-element">prompt</h3><a class="anchor" href="#prompt" id="user-content-prompt" aria-label="Permalink: prompt"><svg viewBox="0 0 16 16" height="16" version="1.1" aria-hidden="true" width="16" class="octicon octicon-link"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static char *prompt = NULL; /* -p option; prompt to the left of input field */"><pre><span class="pl-k">static</span> <span class="pl-smi">char</span> <span class="pl-c1">*</span><span class="pl-s1">prompt</span> <span class="pl-c1">=</span> <span class="pl-c1">NULL</span>; <span class="pl-c">/* -p option; prompt to the left of input field */</span></pre></div>
<p>The <code>prompt</code> setting controls the default leading prompt indicating what kind of options dmenu is
presenting. This is more commonly set via the <code>-p</code> (or <code>-prompt</code>) command line option.</p>
<p>Here is an example setting a prompt of "Files:" when running dmenu:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ls | dmenu -p &quot;Files:&quot;"><pre>$ ls <span class="pl-k">|</span> dmenu -p <span class="pl-s"><span class="pl-pds">"</span>Files:<span class="pl-pds">"</span></span></pre></div>
<p>Which shows up like:</p>
<p><img src="https://github.com/bakkeby/dmenu/wiki/configuration/prompt.jpg" alt="prompt.jpg"></p>
<div class="markdown-heading"><h3 class="heading-element">dynamic</h3><a class="anchor" aria-label="Permalink: dynamic" id="user-content-dynamic" href="#dynamic"><svg class="octicon octicon-link" version="1.1" width="16" height="16" aria-hidden="true" viewBox="0 0 16 16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static const char *dynamic = NULL; /* -dy option; dynamic command to run on input change */"><pre><span class="pl-k">static</span> <span class="pl-k">const</span> <span class="pl-smi">char</span> <span class="pl-c1">*</span><span class="pl-s1">dynamic</span> <span class="pl-c1">=</span> <span class="pl-c1">NULL</span>; <span class="pl-c">/* -dy option; dynamic command to run on input change */</span></pre></div>
<p>The <code>dynamic</code> setting controls the default command that is executed on every input change to update
the current options. This is more commonly set via the <code>-dy</code> command line option.</p>
<p>For more information refer to the <a href="Dynamic_Options">Dynamic Options</a> page.</p>
<div class="markdown-heading"><h3 class="heading-element">symbols</h3><a class="anchor" id="user-content-symbols" href="#symbols" aria-label="Permalink: symbols"><svg height="16" class="octicon octicon-link" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static const char *lsymbol = &quot;<&quot;; // shown when there are more items on the left
static const char *rsymbol = &quot;>&quot;; // shown when there are more items on the right"><pre><span class="pl-k">static</span> <span class="pl-k">const</span> <span class="pl-smi">char</span> <span class="pl-c1">*</span><span class="pl-s1">lsymbol</span> <span class="pl-c1">=</span> <span class="pl-s">"&lt;"</span>; <span class="pl-c">// shown when there are more items on the left</span>
<span class="pl-k">static</span> <span class="pl-k">const</span> <span class="pl-smi">char</span> <span class="pl-c1">*</span><span class="pl-s1">rsymbol</span> <span class="pl-c1">=</span> <span class="pl-s">"&gt;"</span>; <span class="pl-c">// shown when there are more items on the right</span></pre></div>
<p>The left and right symbols (<code>lsymbol</code> and <code>rsymbol</code> settings respectively) are shown when there
are more items present in the given direction. These are configurable as per the
<a rel="nofollow ugc" href="https://tools.suckless.org/dmenu/patches/symbols/">symbols</a> patch for dmenu.</p>
<p><img alt="symbols.jpg" src="https://github.com/bakkeby/dmenu/wiki/configuration/symbols.jpg"></p>
<div class="markdown-heading"><h3 class="heading-element">powerline</h3><a href="#powerline" class="anchor" aria-label="Permalink: powerline" id="user-content-powerline"><svg version="1.1" aria-hidden="true" viewBox="0 0 16 16" class="octicon octicon-link" height="16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div data-snippet-clipboard-copy-content="/* Powerline options, one of:
* PwrlNone, PwrlRightArrow, PwrlLeftArrow, PwrlForwardSlash or PwrlBackslash */
static int powerline = PwrlNone;
/* By default the powerline separator will take up the full space between dmenu items.
* This option allows for the size to be reduced by a number of pixels, e.g. a value of 3
* will shave off three pixels on each side of the separator. This can be used to adjust
* the angle of a powerline slash or arrow. */
static int powerline_size_reduction_pixels = 0;" class="highlight highlight-source-c notranslate position-relative overflow-auto"><pre><span class="pl-c">/* Powerline options, one of:</span>
<span class="pl-c"> * PwrlNone, PwrlRightArrow, PwrlLeftArrow, PwrlForwardSlash or PwrlBackslash */</span>
<span class="pl-k">static</span> <span class="pl-smi">int</span> <span class="pl-s1">powerline</span> <span class="pl-c1">=</span> <span class="pl-s1">PwrlNone</span>;
<span class="pl-c">/* By default the powerline separator will take up the full space between dmenu items.</span>
<span class="pl-c"> * This option allows for the size to be reduced by a number of pixels, e.g. a value of 3</span>
<span class="pl-c"> * will shave off three pixels on each side of the separator. This can be used to adjust</span>
<span class="pl-c"> * the angle of a powerline slash or arrow. */</span>
<span class="pl-k">static</span> <span class="pl-smi">int</span> <span class="pl-s1">powerline_size_reduction_pixels</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>;</pre></div>
<p>This option allows for powerline separators to be drawn between dmenu items in the form of arrows
or slashes.</p>
<p>The <code>powerline_size_reduction_pixels</code> setting allows for the width of the powerline separator to be
reduced in order to adjust the angle of the slash or arrow.</p>
<p><img src="https://github.com/bakkeby/dmenu/wiki/configuration/powerline.jpg" alt="powerline.jpg"></p>
<div class="markdown-heading"><h3 class="heading-element">functionality</h3><a class="anchor" aria-label="Permalink: functionality" id="user-content-functionality" href="#functionality"><svg class="octicon octicon-link" viewBox="0 0 16 16" height="16" aria-hidden="true" version="1.1" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div data-snippet-clipboard-copy-content="/* Functionality that is enabled by default, see util.h for options */
static unsigned long functionality = 0
|Alpha // enables transparency
|CaseSensitive // makes dmenu case sensitive by default
// |Centered // dmenu appears in the center of the screen
// |ColorEmoji // enables color emoji support (removes Xft workaround)
// |ContinuousOutput // makes dmenu print out selected items immediately rather than at the end
|FuzzyMatch // allows fuzzy-matching of items in dmenu
// |HighlightAdjacent // makes dmenu highlight items adjacent to the selected item
// |Incremental // makes dmenu print out the current text each time a key is pressed
// |InstantReturn // makes dmenu select an item immediately if there is only one matching option left
// |Managed // allow dmenu to be managed by window managers (disables override_redirect)
// |PasswordInput // indicates that the input is a password and should be masked
// |PrintIndex // makes dmenu print out the 0-based index instead of the matched text itself
// |PrintInputText // makes dmenu print the input text instead of the selected item
// |PromptIndent // makes dmenu indent items at the same level as the prompt on multi-line views
// |RejectNoMatch // makes dmenu reject input if it would result in no matching item
// |RestrictReturn // disables Shift-Return and Ctrl-Return to restrict dmenu to only output one item
// |ShowNumbers // makes dmenu display the number of matched and total items in the top right corner
|Sort // allow dmenu to sort menu items after matching
|TopBar // dmenu appears at the top of the screen
|Xresources // makes dmenu read X resources at startup
;" class="highlight highlight-source-c notranslate position-relative overflow-auto"><pre><span class="pl-c">/* Functionality that is enabled by default, see util.h for options */</span>
<span class="pl-k">static</span> <span class="pl-smi">unsigned long</span> <span class="pl-s1">functionality</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>
|<span class="pl-s1">Alpha</span> <span class="pl-c">// enables transparency</span>
|<span class="pl-s1">CaseSensitive</span> <span class="pl-c">// makes dmenu case sensitive by default</span>
<span class="pl-c">// |Centered // dmenu appears in the center of the screen</span>
<span class="pl-c">// |ColorEmoji // enables color emoji support (removes Xft workaround)</span>
<span class="pl-c">// |ContinuousOutput // makes dmenu print out selected items immediately rather than at the end</span>
|<span class="pl-s1">FuzzyMatch</span> <span class="pl-c">// allows fuzzy-matching of items in dmenu</span>
<span class="pl-c">// |HighlightAdjacent // makes dmenu highlight items adjacent to the selected item</span>
<span class="pl-c">// |Incremental // makes dmenu print out the current text each time a key is pressed</span>
<span class="pl-c">// |InstantReturn // makes dmenu select an item immediately if there is only one matching option left</span>
<span class="pl-c">// |Managed // allow dmenu to be managed by window managers (disables override_redirect)</span>
<span class="pl-c">// |PasswordInput // indicates that the input is a password and should be masked</span>
<span class="pl-c">// |PrintIndex // makes dmenu print out the 0-based index instead of the matched text itself</span>
<span class="pl-c">// |PrintInputText // makes dmenu print the input text instead of the selected item</span>
<span class="pl-c">// |PromptIndent // makes dmenu indent items at the same level as the prompt on multi-line views</span>
<span class="pl-c">// |RejectNoMatch // makes dmenu reject input if it would result in no matching item</span>
<span class="pl-c">// |RestrictReturn // disables Shift-Return and Ctrl-Return to restrict dmenu to only output one item</span>
<span class="pl-c">// |ShowNumbers // makes dmenu display the number of matched and total items in the top right corner</span>
|<span class="pl-s1">Sort</span> <span class="pl-c">// allow dmenu to sort menu items after matching</span>
|<span class="pl-s1">TopBar</span> <span class="pl-c">// dmenu appears at the top of the screen</span>
|<span class="pl-s1">Xresources</span> <span class="pl-c">// makes dmenu read X resources at startup</span>
;</pre></div>
<p>The <code>functionality</code> setting controls whether specific features are enabled or disabled.</p>
<p>The user can control which features are enabled by uncommenting or commenting out listed options
in this list.</p>
<p>Refer to the <a href="Functionality">Functionality</a> page for more details.</p>
<div class="markdown-heading"><h3 class="heading-element">alpha</h3><a class="anchor" aria-label="Permalink: alpha" href="#alpha" id="user-content-alpha"><svg class="octicon octicon-link" version="1.1" aria-hidden="true" viewBox="0 0 16 16" height="16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* Alpha values. You only need to add colour schemes here if you want different levels of
* transparency per scheme. The default values are defined in the alpha_default array in drw.c. */
static const unsigned int alphas[SchemeLast][2] = {
/* fg bg */
[SchemeNorm] = { OPAQUE, 0xd0 },
};"><pre><span class="pl-c">/* Alpha values. You only need to add colour schemes here if you want different levels of</span>
<span class="pl-c"> * transparency per scheme. The default values are defined in the alpha_default array in drw.c. */</span>
<span class="pl-k">static</span> <span class="pl-k">const</span> <span class="pl-smi">unsigned <span class="pl-smi">int</span></span> <span class="pl-s1">alphas</span>[<span class="pl-s1">SchemeLast</span>][<span class="pl-c1">2</span>] <span class="pl-c1">=</span> {
<span class="pl-c">/* fg bg */</span>
[<span class="pl-s1">SchemeNorm</span>] <span class="pl-c1">=</span> { <span class="pl-c1">OPAQUE</span>, <span class="pl-c1">0xd0</span> },
};</pre></div>
<p>The alpha configuration controls the transparency levels of colours used in the dmenu window and
this is defined on a per colour scheme basis.</p>
<p>If a colour scheme is not explicitly listed in the <code>alphas</code> array above then they will default to
having an opaque foreground and a background opacity of <code>0xd0</code>.</p>
<p>In other words you do not need to add colour schemes here unless you want something that has more
or less opacity than the defaults.</p>
<p><code>SchemeNorm</code> is listed here primarily as an example for how to configure this, but also because many
compilers do not like empty initialisers.</p>
<p>The foreground (fg) colour transparency is used for text and is by default opaque.</p>
<p>The background (bg) colour transparency is by default <code>0xd0</code> (about 82% opacity).</p>
<p>Should you, for whatever reason, want to change the default alpha values then refer to the following
variable in <code>drw.c</code>:</p>
<div data-snippet-clipboard-copy-content="static const unsigned int alpha_default[] = { 0xffU, 0xd0U };" class="highlight highlight-source-c notranslate position-relative overflow-auto"><pre><span class="pl-k">static</span> <span class="pl-k">const</span> <span class="pl-smi">unsigned <span class="pl-smi">int</span></span> <span class="pl-s1">alpha_default</span>[] <span class="pl-c1">=</span> { <span class="pl-c1">0xffU</span>, <span class="pl-c1">0xd0U</span> };</pre></div>
<div class="markdown-heading"><h3 class="heading-element">colors</h3><a href="#colors" class="anchor" id="user-content-colors" aria-label="Permalink: colors"><svg viewBox="0 0 16 16" width="16" class="octicon octicon-link" height="16" aria-hidden="true" version="1.1"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static char *colors[SchemeLast][ColCount] = {
/* fg bg resource prefix */
[SchemeNorm] = { &quot;#bbbbbb&quot;, &quot;#222222&quot;, &quot;norm&quot; },
[SchemeSel] = { &quot;#eeeeee&quot;, &quot;#005577&quot;, &quot;sel&quot; },
[SchemeOut] = { &quot;#000000&quot;, &quot;#00ffff&quot;, &quot;out&quot; },
[SchemeBorder] = { &quot;#000000&quot;, &quot;#005577&quot;, &quot;border&quot; },
[SchemePrompt] = { &quot;#eeeeee&quot;, &quot;#005577&quot;, &quot;prompt&quot; },
[SchemeAdjacent] = { &quot;#eeeeee&quot;, &quot;#770000&quot;, &quot;adjacent&quot; },
[SchemeSelHighlight] = { &quot;#ffc978&quot;, &quot;#005577&quot;, &quot;selhl&quot; },
[SchemeNormHighlight] = { &quot;#ffc978&quot;, &quot;#222222&quot;, &quot;normhl&quot; },
[SchemeHp] = { &quot;#bbbbbb&quot;, &quot;#333333&quot;, &quot;hp&quot; },
};"><pre><span class="pl-k">static</span> <span class="pl-smi">char</span> <span class="pl-c1">*</span><span class="pl-s1">colors</span>[<span class="pl-s1">SchemeLast</span>][<span class="pl-s1">ColCount</span>] <span class="pl-c1">=</span> {
<span class="pl-c">/* fg bg resource prefix */</span>
[<span class="pl-s1">SchemeNorm</span>] <span class="pl-c1">=</span> { <span class="pl-s">"#bbbbbb"</span>, <span class="pl-s">"#222222"</span>, <span class="pl-s">"norm"</span> },
[<span class="pl-s1">SchemeSel</span>] <span class="pl-c1">=</span> { <span class="pl-s">"#eeeeee"</span>, <span class="pl-s">"#005577"</span>, <span class="pl-s">"sel"</span> },
[<span class="pl-s1">SchemeOut</span>] <span class="pl-c1">=</span> { <span class="pl-s">"#000000"</span>, <span class="pl-s">"#00ffff"</span>, <span class="pl-s">"out"</span> },
[<span class="pl-s1">SchemeBorder</span>] <span class="pl-c1">=</span> { <span class="pl-s">"#000000"</span>, <span class="pl-s">"#005577"</span>, <span class="pl-s">"border"</span> },
[<span class="pl-s1">SchemePrompt</span>] <span class="pl-c1">=</span> { <span class="pl-s">"#eeeeee"</span>, <span class="pl-s">"#005577"</span>, <span class="pl-s">"prompt"</span> },
[<span class="pl-s1">SchemeAdjacent</span>] <span class="pl-c1">=</span> { <span class="pl-s">"#eeeeee"</span>, <span class="pl-s">"#770000"</span>, <span class="pl-s">"adjacent"</span> },
[<span class="pl-s1">SchemeSelHighlight</span>] <span class="pl-c1">=</span> { <span class="pl-s">"#ffc978"</span>, <span class="pl-s">"#005577"</span>, <span class="pl-s">"selhl"</span> },
[<span class="pl-s1">SchemeNormHighlight</span>] <span class="pl-c1">=</span> { <span class="pl-s">"#ffc978"</span>, <span class="pl-s">"#222222"</span>, <span class="pl-s">"normhl"</span> },
[<span class="pl-s1">SchemeHp</span>] <span class="pl-c1">=</span> { <span class="pl-s">"#bbbbbb"</span>, <span class="pl-s">"#333333"</span>, <span class="pl-s">"hp"</span> },
};</pre></div>
<p>The <code>colors</code> array defines the colours used for the dmenu window including the border.</p>
<p>Each colour scheme consists of a foreground colour which is used for text and a background colour
that is used for the background in the bar.</p>
<p>The resource prefix is used in relation to loading / overwriting the colour schemes via Xresources.
Refer to the <a href="Xresources">Xresources</a> functionality for more information on that.</p>
<p>Should you need to add your own custom colour schemes then you can do so by expanding on the
corresponding enum in dmenu.c. Start by searching for "SchemeNorm".</p>
<div class="markdown-heading"><h3 class="heading-element">lines</h3><a id="user-content-lines" class="anchor" aria-label="Permalink: lines" href="#lines"><svg viewBox="0 0 16 16" width="16" class="octicon octicon-link" aria-hidden="true" version="1.1" height="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div data-snippet-clipboard-copy-content="/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
static unsigned int lines = 0;" class="highlight highlight-source-c notranslate position-relative overflow-auto"><pre><span class="pl-c">/* -l option; if nonzero, dmenu uses vertical list with given number of lines */</span>
<span class="pl-k">static</span> <span class="pl-smi">unsigned <span class="pl-smi">int</span></span> <span class="pl-s1">lines</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>;</pre></div>
<p>The <code>lines</code> setting allows for dmenu to display options on separate lines rather than horizontally.</p>
<p>This is more commonly enabled using the <code>-l</code> command line option.</p>
<p>Example having dmenu present items over five lines:</p>
<div data-snippet-clipboard-copy-content="$ ls | dmenu -c -l 5" class="highlight highlight-source-shell notranslate position-relative overflow-auto"><pre>$ ls <span class="pl-k">|</span> dmenu -c -l 5</pre></div>
<p><img src="https://github.com/bakkeby/dmenu/wiki/configuration/lines.jpg" alt="lines.jpg"></p>
<p>Note that the left and right symbols do not show when presenting items across multiple lines.</p>
<div class="markdown-heading"><h3 class="heading-element">columns</h3><a class="anchor" id="user-content-columns" href="#columns" aria-label="Permalink: columns"><svg aria-hidden="true" version="1.1" viewBox="0 0 16 16" class="octicon octicon-link" height="16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div data-snippet-clipboard-copy-content="/* -g option; if nonzero, dmenu uses a grid comprised of columns and lines */
static unsigned int columns = 0;" class="highlight highlight-source-c notranslate position-relative overflow-auto"><pre><span class="pl-c">/* -g option; if nonzero, dmenu uses a grid comprised of columns and lines */</span>
<span class="pl-k">static</span> <span class="pl-smi">unsigned <span class="pl-smi">int</span></span> <span class="pl-s1">columns</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>;</pre></div>
<p>The <code>columns</code> setting allow for dmenu to display items in a grid. This is most commonly enabled
using the <code>-g</code> command line option and this must be combined with lines (<code>-l</code>) to work.</p>
<p>The <code>-g</code> option is short for "grid" and this is used to be consistent with the original
<a href="https://tools.suckless.org/dmenu/patches/grid/" rel="nofollow ugc">grid</a> patch for dmenu and because other and perhaps
more intuitive flags are reserved for different functionalities.</p>
<p>Example having dmenu present items over a 5x3 grid:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ls | dmenu -c -l 5 -g 3"><pre>$ ls <span class="pl-k">|</span> dmenu -c -l 5 -g 3</pre></div>
<p><img src="https://github.com/bakkeby/dmenu/wiki/configuration/grid.jpg" alt="grid.jpg"></p>
<div class="markdown-heading"><h3 class="heading-element">lineheight</h3><a class="anchor" id="user-content-lineheight" aria-label="Permalink: lineheight" href="#lineheight"><svg version="1.1" width="16" viewBox="0 0 16 16" height="16" aria-hidden="true" class="octicon octicon-link"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static unsigned int lineheight = 0; /* -h option; minimum height of a menu line */"><pre><span class="pl-k">static</span> <span class="pl-smi">unsigned <span class="pl-smi">int</span></span> <span class="pl-s1">lineheight</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>; <span class="pl-c">/* -h option; minimum height of a menu line */</span></pre></div>
<p>By default the minimum line height will be the size of the font height + 2 pixels (as in one
additional pixel space above and below the text).</p>
<p>The <code>lineheight</code> setting controls the height of the dmenu bar, or the height of the dmenu lines
when items are presented across multiple lines, provided that this is greater than the minimum.</p>
<p>If <code>lineheight</code> is <code>0</code> then the default line height is used.</p>
<p>If <code>lineheight</code> is <code>-1</code> then the line height will be 2.5 times that of the font height:</p>
<p><img src="https://github.com/bakkeby/dmenu/wiki/configuration/lineheight_minus_one.jpg" alt="lineheight_minus_one.jpg"></p>
<p>The <code>-h</code> command line option can be used to specify the line height. This will have no effect if
the provided value is less than the minimum (which depends on the font size).</p>
<p>Example having dmenu present items over a 5x3 grid with a line height of 60 pixels:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ls | dmenu -c -l 5 -g 3 -h 60"><pre>$ ls <span class="pl-k">|</span> dmenu -c -l 5 -g 3 -h 60</pre></div>
<p><img alt="lineheight.jpg" src="https://github.com/bakkeby/dmenu/wiki/configuration/lineheight.jpg"></p>
<div class="markdown-heading"><h3 class="heading-element">min_width</h3><a class="anchor" aria-label="Permalink: min_width" id="user-content-min_width" href="#min_width"><svg version="1.1" viewBox="0 0 16 16" aria-hidden="true" height="16" width="16" class="octicon octicon-link"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static unsigned int min_width = 500; /* minimum width when centered */"><pre><span class="pl-k">static</span> <span class="pl-smi">unsigned <span class="pl-smi">int</span></span> <span class="pl-s1">min_width</span> <span class="pl-c1">=</span> <span class="pl-c1">500</span>; <span class="pl-c">/* minimum width when centered */</span></pre></div>
<p>The <code>min_width</code> setting controls the default (minimum) width of dmenu when centered. In practice
this controls the size of dmenu when centered. It is possible to override this size by using the
<code>-w</code> command line option to set the width of dmenu.</p>
<p>Also refer to the <a href="Centered">Centered</a> functionality.</p>
<div class="markdown-heading"><h3 class="heading-element">history</h3><a aria-label="Permalink: history" class="anchor" href="#history" id="user-content-history"><svg aria-hidden="true" class="octicon octicon-link" version="1.1" viewBox="0 0 16 16" width="16" height="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div data-snippet-clipboard-copy-content="static unsigned int maxhist = 15;
static int histnodup = 1; /* if 0, record repeated histories */" class="highlight highlight-source-c notranslate position-relative overflow-auto"><pre><span class="pl-k">static</span> <span class="pl-smi">unsigned <span class="pl-smi">int</span></span> <span class="pl-s1">maxhist</span> <span class="pl-c1">=</span> <span class="pl-c1">15</span>;
<span class="pl-k">static</span> <span class="pl-smi">int</span> <span class="pl-s1">histnodup</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>; <span class="pl-c">/* if 0, record repeated histories */</span></pre></div>
<p>These options originate from the <a href="https://tools.suckless.org/dmenu/patches/navhistory/" rel="nofollow ugc">navhistory</a>
patch for dmenu. The <code>maxhist</code> setting controls how many previous selections to remember while the
<code>histnodup</code> controls whether to allow duplicate values in the history or not.</p>
<p>This is to be combined with the <code>-H histfile</code> command line option which specifies the history file
to use.</p>
<p>Example using dmenu with a history file:</p>
<div data-snippet-clipboard-copy-content="$ ls | dmenu -H histfile.dat" class="highlight highlight-source-shell notranslate position-relative overflow-auto"><pre>$ ls <span class="pl-k">|</span> dmenu -H histfile.dat</pre></div>
<p>When using dmenu like this the selected item is stored in the given file <code>histfile.dat</code>.</p>
<div data-snippet-clipboard-copy-content="$ cat histfile.dat
config.h
config.mk
arg.h" class="highlight highlight-source-shell notranslate position-relative overflow-auto"><pre>$ cat histfile.dat
config.h
config.mk
arg.h</pre></div>
<p>Exceptions to this:</p>
<ul>
<li>when selecting multiple items only the last selected item will be stored</li>
<li>when selecting items using the mouse no item will be stored in the history</li>
</ul>
<p>When using dmenu that has a history file like this then <code>Alt+p</code> and <code>Alt+n</code> keybindings can be used
to navigate the history of previously chosen items.</p>
<div class="markdown-heading"><h3 class="heading-element">worddelimiters</h3><a class="anchor" aria-label="Permalink: worddelimiters" id="user-content-worddelimiters" href="#worddelimiters"><svg viewBox="0 0 16 16" width="16" version="1.1" aria-hidden="true" height="16" class="octicon octicon-link"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div data-snippet-clipboard-copy-content="/*
* Characters not considered part of a word while deleting words
* for example: &quot; /?\&quot;&amp;[]&quot;
*/
static const char worddelimiters[] = &quot; &quot;;" class="highlight highlight-source-c notranslate position-relative overflow-auto"><pre><span class="pl-c">/*</span>
<span class="pl-c"> * Characters not considered part of a word while deleting words</span>
<span class="pl-c"> * for example: " /?\"&amp;[]"</span>
<span class="pl-c"> */</span>
<span class="pl-k">static</span> <span class="pl-k">const</span> <span class="pl-smi">char</span> <span class="pl-s1">worddelimiters</span>[] <span class="pl-c1">=</span> <span class="pl-s">" "</span>;</pre></div>
<p>dmenu comes with a few built-in keybindings that work with words:</p>
<ul>
<li>
<code>Ctrl+w</code> - delete the word on the left</li>
<li>
<code>Alt+b</code> (or <code>Ctrl+Left</code>) - move cursor to the start of the current word</li>
<li>
<code>Alt+f</code> (or <code>Ctrl+Right</code>) - move cursor to the end of the current word</li>
</ul>
<p>The <code>worddelimiters</code> setting controls what characters are considered as word boundaries.</p>
<div class="markdown-heading"><h3 class="heading-element">border_width</h3><a class="anchor" id="user-content-border_width" href="#border_width" aria-label="Permalink: border_width"><svg aria-hidden="true" viewBox="0 0 16 16" class="octicon octicon-link" width="16" height="16" version="1.1"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* Default size of the window border */
static unsigned int border_width = 0;"><pre><span class="pl-c">/* Default size of the window border */</span>
<span class="pl-k">static</span> <span class="pl-smi">unsigned <span class="pl-smi">int</span></span> <span class="pl-s1">border_width</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>;</pre></div>
<p>The <code>border_width</code> setting controls the width of the border around dmenu. A border width of 0 means
that dmenu is to be drawn with no border. This can also be set using the <code>-bw</code> command line option.</p>
<p>This feature originates from the <a href="https://tools.suckless.org/dmenu/patches/border/" rel="nofollow ugc">border</a> patch
for dmenu.</p>
<p>Example having a border width of 0:</p>
<div data-snippet-clipboard-copy-content="$ ls | dmenu -c -bw 5" class="highlight highlight-source-shell notranslate position-relative overflow-auto"><pre>$ ls <span class="pl-k">|</span> dmenu -c -bw 5</pre></div>
<p><img alt="borderw5.jpg" src="https://github.com/bakkeby/dmenu/wiki/configuration/borderw5.jpg"></p>
<p>Example having a border width of 5:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ls | dmenu -c -bw 0"><pre>$ ls <span class="pl-k">|</span> dmenu -c -bw 0</pre></div>
<p><img src="https://github.com/bakkeby/dmenu/wiki/configuration/borderw0.jpg" alt="borderw0.jpg"></p>
<div class="markdown-heading"><h3 class="heading-element">padding</h3><a href="#padding" class="anchor" aria-label="Permalink: padding" id="user-content-padding"><svg height="16" version="1.1" aria-hidden="true" class="octicon octicon-link" viewBox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* Vertical and horizontal padding of dmenu in relation to monitor border */
static int vertpad = 0;
static int sidepad = 0;"><pre><span class="pl-c">/* Vertical and horizontal padding of dmenu in relation to monitor border */</span>
<span class="pl-k">static</span> <span class="pl-smi">int</span> <span class="pl-s1">vertpad</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>;
<span class="pl-k">static</span> <span class="pl-smi">int</span> <span class="pl-s1">sidepad</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>;</pre></div>
<p>The <code>vertpad</code> and <code>sidepad</code> options allows for dmenu to be placed with an offset to the monitor
border. This is intended to allow for dmenu to be placed on top of the bar in dwm when the
<code>barpadding</code> patch for dwm, which adds a gap between the bar and the edge of the monitor, has been
applied.</p>
<p>This can also be controlled using the command line arguments of <code>-xpad</code> and <code>-ypad</code> if preferred.</p>
<p>If the position of dmenu is specified using the <code>-x</code> or <code>-y</code> command line arguments, or if dmenu is
centered, then the vertical and horizontal padding will not be taken into account.</p>
</div>
<div id="wiki-footer" class="mt-5 mb-0 wiki-footer gollum-markdown-content">
<div class="Box Box--condensed color-bg-subtle color-shadow-small">
<div class="Box-body markdown-body">
<p><a href="Configuration">Configuration</a> | <a href="Features">Features</a> | <a href="Functionality">Functionality</a></p>
</div>
</div>
</div>
<h6>⚠️ **GitHub.com Fallback** ⚠️</h6><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" data-cf-beacon='{"rayId":"860d475b7ad4026d","version":"2024.2.4","r":1,"token":"4645764ca8384bfc86034b71f1dafd76","b":1}' crossorigin="anonymous"></script>
</body></html> </div>
</article>
<nav id="index">
<a href="/m/bakkeby/dmenu/wiki_index">🗂️ Page Index for this GitHub Wiki</a>
</nav>
<aside id="footer_info">
<p><a href="/"><span class="emoji">ℹ️</span>About GitHub Wiki SEE, a search engine enabler for GitHub Wikis
as <span class="blocks">GitHub blocks most GitHub Wikis from search engines.</span></a></p>
</aside>
</div>
</body>
</html>