config.h
This file
Path
config.h
248 lines · 5.3 KiB · C
Last changed by
config: add --mesg, --mesg-mode and --message-color command line optionsSlayerOfTheBadbefore adoption9fb7e6c
History of this fileTake it
The walk stopped after 200 commits: lines older than 6a4c416 point at it.
changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 1–37why, one step back1#pragma once23#include <stdint.h>4#include <stdbool.h>5#include <char32.h>67#include <wlr-layer-shell-unstable-v1.h>89#include <tllist.h>10#include <xkbcommon/xkbcommon.h>1112#define DEFINE_LIST(type) \13 type##_list { \14 size_t count; \15 type *arr; \16 }1718struct rgba {double r; double g; double b; double a;};19struct pt_or_px {int px; float pt;};2021enum dpi_aware {22 DPI_AWARE_AUTO,23 DPI_AWARE_YES,24 DPI_AWARE_NO,25};2627enum dmenu_mode {28 DMENU_MODE_TEXT,29 DMENU_MODE_INDEX,30};3132enum match_mode {33 MATCH_MODE_EXACT,34 MATCH_MODE_FZF,35 MATCH_MODE_FUZZY,36};37config: add --mesg, --mesg-mode and --message-color command line optionsSlayerOfTheBadbefore adoption9fb7e6c
lines 38–43why, one step back38enum message_mode {39 MESSAGE_MODE_WRAP,40 MESSAGE_MODE_EXPAND,41};4243changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 44–51why, one step back44enum match_fields {45 MATCH_NAME = 0x01,46 MATCH_FILENAME = 0x02,47 MATCH_GENERIC = 0x04,48 MATCH_EXEC = 0x08,49 MATCH_COMMENT = 0x10,50 MATCH_KEYWORDS = 0x20,51 MATCH_CATEGORIES = 0x40,dmenu: add support for --match-nthDaniel Eklöfbefore adoptionc006428
line 52why, one step back52 MATCH_NTH = 0x80,changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 53–104why, one step back53};5455enum anchors {56 ANCHOR_TOP_LEFT = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT,57 ANCHOR_TOP = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP,58 ANCHOR_TOP_RIGHT = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT,59 ANCHOR_LEFT = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT,60 ANCHOR_CENTER = 0,61 ANCHOR_RIGHT = ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT,62 ANCHOR_BOTTOM_LEFT = ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT,63 ANCHOR_BOTTOM = ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM,64 ANCHOR_BOTTOM_RIGHT = ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT,65};6667struct anchors_map {68 const char *name;69 enum anchors value;70};7172extern const struct anchors_map anchors_map[];7374struct config_key_modifiers {75 bool shift;76 bool alt;77 bool ctrl;78 bool super;79};8081struct config_key_binding {82 int action; /* One of the various bind_action_* enums from wayland.h */83 struct config_key_modifiers modifiers;84 union {85 /* Key bindings */86 struct {87 xkb_keysym_t sym;88 } k;8990#if 091 /* Mouse bindings */92 struct {93 int button;94 int count;95 } m;96#endif97 };9899 /* For error messages in collision handling */100 const char *path;101 int lineno;102};103DEFINE_LIST(struct config_key_binding);104config: add scaling-filter optionDaniel Eklöfbefore adoption3866f60
lines 105–116why, one step back105enum scaling_filter {106 SCALING_FILTER_NONE,107 SCALING_FILTER_NEAREST,108 SCALING_FILTER_BILINEAR,109 SCALING_FILTER_BOX,110 SCALING_FILTER_LINEAR,111 SCALING_FILTER_CUBIC,112 SCALING_FILTER_LANCZOS2,113 SCALING_FILTER_LANCZOS3,114 SCALING_FILTER_LANCZOS3_STRETCHED,115};116changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 117–121why, one step back117struct config {118 char *output;119 char32_t *prompt;120 char32_t *placeholder;121 char32_t *search_text;config: add --mesg, --mesg-mode and --message-color command line optionsSlayerOfTheBadbefore adoption9fb7e6c
lines 122–123why, one step back122 char32_t *message;123 enum message_mode message_mode;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 124–126why, one step back124 bool prompt_only;125 enum match_fields match_fields;126wayland: allow setting namespace in config and from the command linefrostybefore adoption5255c0a
lines 127–128why, one step back127 char *namespace;128changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 129–140why, one step back129 struct {130 char32_t character;131 bool enabled;132 bool character_set;133 } password_mode;134135 char *terminal;136 char *launch_prefix;137138 char *font;139 bool use_bold;140 enum dpi_aware dpi_aware;Implement gamma-correct blendingDaniel Eklöfbefore adoption2d19826
line 141why, one step back141 bool gamma_correct;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 142–151why, one step back142143 uint16_t render_worker_count;144 uint16_t match_worker_count;145146 bool filter_desktop;147148 bool icons_enabled;149 char *icon_theme;150151 bool hide_when_prompt_empty;✨ New Feature: Hide Input Line (#597)Mark Stosbergbefore adoption1ea0283
line 152why, one step back152 bool hide_prompt;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 153–174why, one step back153154 bool actions_enabled;155156 struct config_key_binding_list key_bindings;157158 enum match_mode match_mode;159 bool sort_result;160 bool match_counter;161162 uint32_t delayed_filter_ms;163 uint32_t delayed_filter_limit;164165 struct {166 size_t min_length;167 size_t max_length_discrepancy;168 size_t max_distance;169 } fuzzy;170171 struct {172 bool enabled;173 enum dmenu_mode mode;174 bool exit_immediately_if_empty;dmenu: add --only-matchDaniel Eklöfbefore adoptionce5dd7f
line 175why, one step back175 bool only_match;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
line 176why, one step back176 char delim;config: --nth-delimiter=CHRDaniel Eklöfbefore adoption2dd56d8
line 177why, one step back177 char nth_delim;Rework --accept-nth and --with-nth to accept a format stringDaniel Eklöfbefore adoption4929e73
lines 178–179why, one step back178 char *with_nth_format;179 char *accept_nth_format;dmenu: add support for --match-nthDaniel Eklöfbefore adoptionc006428
line 180why, one step back180 char *match_nth_format;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 181–190why, one step back181 } dmenu;182183 enum anchors anchor;184185 struct {186 unsigned x;187 unsigned y;188 } margin;189190 unsigned lines;Add new --minimal-flag optionMark Stosbergbefore adoption6200008
line 191why, one step back191 bool minimal_lines;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 192–204why, one step back192 unsigned chars;193 unsigned tabs; /* Tab stop every number of #spaces */194195 struct {196 unsigned x;197 unsigned y;198 unsigned inner;199 } pad;200201 struct {202 struct rgba background;203 struct rgba border;204 struct rgba text;config: add --mesg, --mesg-mode and --message-color command line optionsSlayerOfTheBadbefore adoption9fb7e6c
line 205why, one step back205 struct rgba message;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 206–218why, one step back206 struct rgba prompt;207 struct rgba input;208 struct rgba match;209 struct rgba selection;210 struct rgba selection_text;211 struct rgba selection_match;212 struct rgba counter;213 struct rgba placeholder;214 } colors;215216 struct {217 unsigned size;218 unsigned radius;feat: border radius for selected entrieswisplbefore adoption9836d81
line 219why, one step back219 } border, selection_border;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 220–221why, one step back220221 float image_size_ratio;config: add scaling-filter optionDaniel Eklöfbefore adoption3866f60
lines 222–223why, one step back222223 enum scaling_filter png_scaling_filter;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 224–228why, one step back224225 struct pt_or_px line_height;226 struct pt_or_px letter_spacing;227228 enum zwlr_layer_shell_v1_layer layer;Add `keyboard-focus=exclusive|on-demand` command line and config optionbbb651before adoption9a0a38d
line 229why, one step back229 enum zwlr_layer_surface_v1_keyboard_interactivity keyboard_focus;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 230–233why, one step back230 bool exit_on_kb_focus_loss;231232 bool list_executables_in_path;233 char *cache_path;debug: add a --print-timing-info command line optionDaniel Eklöfbefore adoption1ea01b1
line 234why, one step back234✨ Add --auto-select opt. When one entry is left, automatically select it.Mark Stosbergbefore adoption5751a65
line 235why, one step back235 bool auto_select;debug: add a --print-timing-info command line optionDaniel Eklöfbefore adoption1ea01b1
line 236why, one step back236 bool print_timing_info;feat: config/cli option to disable mouse inputGingehbefore adoption8c9e76d
lines 237–238why, one step back237238 bool enable_mouse;changelog: add missing refDaniel Eklöfbefore adoption6a4c416
lines 239–248why, one step back239};240241typedef tll(char *) config_override_t;242243bool config_load(244 struct config *conf, const char *path, const config_override_t *overrides,245 bool errors_are_fatal);246void config_free(struct config *conf);247248struct rgba conf_hex_to_rgba(uint32_t color);