config.def.h (6627B)
1 /* See LICENSE file for copyright and license details. */ 2 /* Default settings; can be overriden by command line. */ 3 4 static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ 5 #if ALPHA_PATCH 6 static int opacity = 1; /* -o option; if 0, then alpha is disabled */ 7 #endif // ALPHA_PATCH 8 #if CARET_WIDTH_PATCH 9 static int caret_width = 2; /* -cw option; set default caret width */ 10 #endif // CARET_WIDTH_PATCH 11 #if FUZZYMATCH_PATCH 12 static int fuzzy = 1; /* -F option; if 0, dmenu doesn't use fuzzy matching */ 13 #endif // FUZZYMATCH_PATCH 14 #if INCREMENTAL_PATCH 15 static int incremental = 0; /* -r option; if 1, outputs text each time a key is pressed */ 16 #endif // INCREMENTAL_PATCH 17 #if INSTANT_PATCH 18 static int instant = 0; /* -n option; if 1, selects matching item without the need to press enter */ 19 #endif // INSTANT_PATCH 20 #if CENTER_PATCH 21 static int center = 1; /* -c option; if 0, dmenu won't be centered on the screen */ 22 static int min_width = 500; /* minimum width when centered */ 23 #endif // CENTER_PATCH 24 #if BARPADDING_PATCH 25 static const int vertpad = 10; /* vertical padding of bar */ 26 static const int sidepad = 10; /* horizontal padding of bar */ 27 #endif // BARPADDING_PATCH 28 #if QUIET_PATCH 29 static int quiet = 0; /* -q option; if 1, dmenu will not show any items if the search string is empty */ 30 #endif // QUIET_PATCH 31 #if RESTRICT_RETURN_PATCH 32 static int restrict_return = 0; /* -1 option; if 1, disables shift-return and ctrl-return */ 33 #endif // RESTRICT_RETURN_PATCH 34 /* -fn option overrides fonts[0]; default X11 font or font set */ 35 #if PANGO_PATCH 36 static char *font = "monospace 10"; 37 #else 38 #if XRESOURCES_PATCH 39 static char *fonts[] = 40 #else 41 static const char *fonts[] = 42 #endif // XRESOURCES_PATCH 43 { 44 "JetBrainsMono Nerd Font:size=14" 45 }; 46 #endif // PANGO_PATCH 47 #if MANAGED_PATCH 48 static char *prompt = NULL; /* -p option; prompt to the left of input field */ 49 #else 50 static const char *prompt = NULL; /* -p option; prompt to the left of input field */ 51 #endif // MANAGED_PATCH 52 #if DYNAMIC_OPTIONS_PATCH 53 static const char *dynamic = NULL; /* -dy option; dynamic command to run on input change */ 54 #endif // DYNAMIC_OPTIONS_PATCH 55 #if SYMBOLS_PATCH 56 static const char *symbol_1 = "<"; 57 static const char *symbol_2 = ">"; 58 #endif // SYMBOLS_PATCH 59 60 #if ALPHA_PATCH 61 static const unsigned int baralpha = 0xd0; 62 static const unsigned int borderalpha = OPAQUE; 63 static const unsigned int alphas[][3] = { 64 /* fg bg border */ 65 [SchemeNorm] = { OPAQUE, baralpha, borderalpha }, 66 [SchemeSel] = { OPAQUE, baralpha, borderalpha }, 67 #if BORDER_PATCH 68 [SchemeBorder] = { OPAQUE, OPAQUE, OPAQUE }, 69 #endif // BORDER_PATCH 70 #if MORECOLOR_PATCH 71 [SchemeMid] = { OPAQUE, baralpha, borderalpha }, 72 #endif // MORECOLOR_PATCH 73 #if HIGHLIGHT_PATCH 74 [SchemeSelHighlight] = { OPAQUE, baralpha, borderalpha }, 75 [SchemeNormHighlight] = { OPAQUE, baralpha, borderalpha }, 76 #endif // HIGHLIGHT_PATCH 77 #if HIGHPRIORITY_PATCH 78 [SchemeHp] = { OPAQUE, baralpha, borderalpha }, 79 #endif // HIGHPRIORITY_PATCH 80 #if EMOJI_HIGHLIGHT_PATCH 81 [SchemeHover] = { OPAQUE, baralpha, borderalpha }, 82 [SchemeGreen] = { OPAQUE, baralpha, borderalpha }, 83 [SchemeRed] = { OPAQUE, baralpha, borderalpha }, 84 [SchemeYellow] = { OPAQUE, baralpha, borderalpha }, 85 [SchemeBlue] = { OPAQUE, baralpha, borderalpha }, 86 [SchemePurple] = { OPAQUE, baralpha, borderalpha }, 87 #endif // EMOJI_HIGHLIGHT_PATCH 88 #if VI_MODE_PATCH 89 [SchemeCursor] = { OPAQUE, baralpha, borderalpha }, 90 #endif // VI_MODE_PATCH 91 #if CARET_SCHEME_PATCH 92 [SchemeCaret] = { OPAQUE, baralpha, borderalpha }, 93 #endif // CARET_SCHEME_PATCH 94 }; 95 #endif // ALPHA_PATCH 96 97 static 98 #if !XRESOURCES_PATCH 99 const 100 #endif // XRESOURCES_PATCH 101 char *colors[][2] = { 102 /* fg bg */ 103 [SchemeNorm] = { "#2a4055", "#9CC2EC" }, 104 [SchemeSel] = { "#2a4055", "#DEC292" }, 105 [SchemeOut] = { "#2a4055", "#90B0D2" }, 106 #if BORDER_PATCH 107 [SchemeBorder] = { "#2a4055", "#DEC292" }, 108 #endif // BORDER_PATCH 109 #if MORECOLOR_PATCH 110 [SchemeMid] = { "#2a4055", "#B0C0D0" }, 111 #endif // MORECOLOR_PATCH 112 #if HIGHLIGHT_PATCH 113 [SchemeSelHighlight] = { "#1a3045", "#DEC292" }, 114 [SchemeNormHighlight] = { "#1a3045", "#9CC2EC" }, 115 #endif // HIGHLIGHT_PATCH 116 #if HIGHPRIORITY_PATCH 117 [SchemeHp] = { "#bbbbbb", "#333333" }, 118 #endif // HIGHPRIORITY_PATCH 119 #if EMOJI_HIGHLIGHT_PATCH 120 [SchemeHover] = { "#ffffff", "#353D4B" }, 121 [SchemeGreen] = { "#ffffff", "#52E067" }, 122 [SchemeRed] = { "#ffffff", "#e05252" }, 123 [SchemeYellow] = { "#ffffff", "#e0c452" }, 124 [SchemeBlue] = { "#ffffff", "#5280e0" }, 125 [SchemePurple] = { "#ffffff", "#9952e0" }, 126 #endif // EMOJI_HIGHLIGHT_PATCH 127 #if VI_MODE_PATCH 128 [SchemeCursor] = { "#222222", "#bbbbbb" }, 129 #endif // VI_MODE_PATCH 130 #if CARET_SCHEME_PATCH 131 [SchemeCaret] = { "#eeeeee", "#222222" }, 132 #endif // CARET_SCHEME_PATCH 133 }; 134 /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ 135 static unsigned int lines = 0; 136 #if GRID_PATCH 137 /* -g option; if nonzero, dmenu uses a grid comprised of columns and lines */ 138 static unsigned int columns = 0; 139 #endif // GRID_PATCH 140 #if LINE_HEIGHT_PATCH 141 static unsigned int lineheight = 0; /* -h option; minimum height of a menu line */ 142 static unsigned int min_lineheight = 8; 143 #endif // LINE_HEIGHT_PATCH 144 #if NAVHISTORY_PATCH 145 static unsigned int maxhist = 15; 146 static int histnodup = 1; /* if 0, record repeated histories */ 147 #endif // NAVHISTORY_PATCH 148 149 /* 150 * Characters not considered part of a word while deleting words 151 * for example: " /?\"&[]" 152 */ 153 #if PIPEOUT_PATCH 154 static const char startpipe[] = "#"; 155 #endif // PIPEOUT_PATCH 156 static const char worddelimiters[] = " "; 157 158 #if VI_MODE_PATCH 159 /* 160 * -vi option; if nonzero, vi mode is always enabled and can be 161 * accessed with the global_esc keysym + mod mask 162 */ 163 static unsigned int vi_mode = 1; 164 static unsigned int start_mode = 0; /* mode to use when -vi is passed. 0 = insert mode, 1 = normal mode */ 165 static Key global_esc = { XK_n, Mod1Mask }; /* escape key when vi mode is not enabled explicitly */ 166 static Key quit_keys[] = { 167 /* keysym modifier */ 168 { XK_q, 0 } 169 }; 170 #endif // VI_MODE_PATCH 171 172 #if BORDER_PATCH 173 /* Size of the window border */ 174 static unsigned int border_width = 2; 175 #endif // BORDER_PATCH 176 177 #if PREFIXCOMPLETION_PATCH 178 /* 179 * Use prefix matching by default; can be inverted with the -x flag. 180 */ 181 static int use_prefix = 1; 182 #endif // PREFIXCOMPLETION_PATCH