i3
config_directives.c
Go to the documentation of this file.
1 #undef I3__FILE__
2 #define I3__FILE__ "config_directives.c"
3 /*
4  * vim:ts=4:sw=4:expandtab
5  *
6  * i3 - an improved dynamic tiling window manager
7  * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
8  *
9  * config_directives.c: all config storing functions (see config_parser.c)
10  *
11  */
12 #include <float.h>
13 #include <stdarg.h>
14 
15 #include "all.h"
16 
17 /*******************************************************************************
18  * Criteria functions.
19  ******************************************************************************/
20 
22 
23 /*
24  * Initializes the specified 'Match' data structure and the initial state of
25  * commands.c for matching target windows of a command.
26  *
27  */
28 CFGFUN(criteria_init, int _state) {
29  criteria_next_state = _state;
30 
31  DLOG("Initializing criteria, current_match = %p, state = %d\n", current_match, _state);
33 }
34 
35 CFGFUN(criteria_pop_state) {
36  result->next_state = criteria_next_state;
37 }
38 
39 /*
40  * Interprets a ctype=cvalue pair and adds it to the current match
41  * specification.
42  *
43  */
44 CFGFUN(criteria_add, const char *ctype, const char *cvalue) {
45  DLOG("ctype=*%s*, cvalue=*%s*\n", ctype, cvalue);
46 
47  if (strcmp(ctype, "class") == 0) {
48  current_match->class = regex_new(cvalue);
49  return;
50  }
51 
52  if (strcmp(ctype, "instance") == 0) {
53  current_match->instance = regex_new(cvalue);
54  return;
55  }
56 
57  if (strcmp(ctype, "window_role") == 0) {
59  return;
60  }
61 
62  if (strcmp(ctype, "con_id") == 0) {
63  char *end;
64  long parsed = strtol(cvalue, &end, 10);
65  if (parsed == LONG_MIN ||
66  parsed == LONG_MAX ||
67  parsed < 0 ||
68  (end && *end != '\0')) {
69  ELOG("Could not parse con id \"%s\"\n", cvalue);
70  } else {
71  current_match->con_id = (Con *)parsed;
72  DLOG("id as int = %p\n", current_match->con_id);
73  }
74  return;
75  }
76 
77  if (strcmp(ctype, "id") == 0) {
78  char *end;
79  long parsed = strtol(cvalue, &end, 10);
80  if (parsed == LONG_MIN ||
81  parsed == LONG_MAX ||
82  parsed < 0 ||
83  (end && *end != '\0')) {
84  ELOG("Could not parse window id \"%s\"\n", cvalue);
85  } else {
86  current_match->id = parsed;
87  DLOG("window id as int = %d\n", current_match->id);
88  }
89  return;
90  }
91 
92  if (strcmp(ctype, "con_mark") == 0) {
93  current_match->mark = regex_new(cvalue);
94  return;
95  }
96 
97  if (strcmp(ctype, "title") == 0) {
98  current_match->title = regex_new(cvalue);
99  return;
100  }
101 
102  if (strcmp(ctype, "urgent") == 0) {
103  if (strcasecmp(cvalue, "latest") == 0 ||
104  strcasecmp(cvalue, "newest") == 0 ||
105  strcasecmp(cvalue, "recent") == 0 ||
106  strcasecmp(cvalue, "last") == 0) {
107  current_match->urgent = U_LATEST;
108  } else if (strcasecmp(cvalue, "oldest") == 0 ||
109  strcasecmp(cvalue, "first") == 0) {
110  current_match->urgent = U_OLDEST;
111  }
112  return;
113  }
114 
115  ELOG("Unknown criterion: %s\n", ctype);
116 }
117 
118 /* TODO: refactor the above criteria code into a single file (with src/commands.c). */
119 
120 /*******************************************************************************
121  * Utility functions
122  ******************************************************************************/
123 
124 static bool eval_boolstr(const char *str) {
125  return (strcasecmp(str, "1") == 0 ||
126  strcasecmp(str, "yes") == 0 ||
127  strcasecmp(str, "true") == 0 ||
128  strcasecmp(str, "on") == 0 ||
129  strcasecmp(str, "enable") == 0 ||
130  strcasecmp(str, "active") == 0);
131 }
132 
133 /*
134  * A utility function to convert a string of modifiers to the corresponding bit
135  * mask.
136  */
137 uint32_t modifiers_from_str(const char *str) {
138  /* It might be better to use strtok() here, but the simpler strstr() should
139  * do for now. */
140  uint32_t result = 0;
141  if (str == NULL)
142  return result;
143  if (strstr(str, "Mod1") != NULL)
144  result |= BIND_MOD1;
145  if (strstr(str, "Mod2") != NULL)
146  result |= BIND_MOD2;
147  if (strstr(str, "Mod3") != NULL)
148  result |= BIND_MOD3;
149  if (strstr(str, "Mod4") != NULL)
150  result |= BIND_MOD4;
151  if (strstr(str, "Mod5") != NULL)
152  result |= BIND_MOD5;
153  if (strstr(str, "Control") != NULL ||
154  strstr(str, "Ctrl") != NULL)
155  result |= BIND_CONTROL;
156  if (strstr(str, "Shift") != NULL)
157  result |= BIND_SHIFT;
158  if (strstr(str, "Mode_switch") != NULL)
159  result |= BIND_MODE_SWITCH;
160  return result;
161 }
162 
163 static char *font_pattern;
164 
165 CFGFUN(font, const char *font) {
166  config.font = load_font(font, true);
167  set_font(&config.font);
168 
169  /* Save the font pattern for using it as bar font later on */
171  font_pattern = sstrdup(font);
172 }
173 
174 CFGFUN(binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *whole_window, const char *command) {
175  configure_binding(bindtype, modifiers, key, release, whole_window, command, DEFAULT_BINDING_MODE);
176 }
177 
178 /*******************************************************************************
179  * Mode handling
180  ******************************************************************************/
181 
182 static char *current_mode;
183 
184 CFGFUN(mode_binding, const char *bindtype, const char *modifiers, const char *key, const char *release, const char *whole_window, const char *command) {
185  configure_binding(bindtype, modifiers, key, release, whole_window, command, current_mode);
186 }
187 
188 CFGFUN(enter_mode, const char *modename) {
189  if (strcasecmp(modename, DEFAULT_BINDING_MODE) == 0) {
190  ELOG("You cannot use the name %s for your mode\n", DEFAULT_BINDING_MODE);
191  exit(1);
192  }
193  DLOG("\t now in mode %s\n", modename);
195  current_mode = sstrdup(modename);
196 }
197 
198 CFGFUN(exec, const char *exectype, const char *no_startup_id, const char *command) {
199  struct Autostart *new = smalloc(sizeof(struct Autostart));
200  new->command = sstrdup(command);
201  new->no_startup_id = (no_startup_id != NULL);
202  if (strcmp(exectype, "exec") == 0) {
204  } else {
206  }
207 }
208 
209 CFGFUN(for_window, const char *command) {
211  ELOG("Match is empty, ignoring this for_window statement\n");
212  return;
213  }
214  DLOG("\t should execute command %s for the criteria mentioned above\n", command);
215  Assignment *assignment = scalloc(sizeof(Assignment));
216  assignment->type = A_COMMAND;
217  match_copy(&(assignment->match), current_match);
218  assignment->dest.command = sstrdup(command);
220 }
221 
222 CFGFUN(floating_minimum_size, const long width, const long height) {
225 }
226 
227 CFGFUN(floating_maximum_size, const long width, const long height) {
230 }
231 
232 CFGFUN(floating_modifier, const char *modifiers) {
234 }
235 
236 CFGFUN(default_orientation, const char *orientation) {
237  if (strcmp(orientation, "horizontal") == 0)
239  else if (strcmp(orientation, "vertical") == 0)
241  else
243 }
244 
245 CFGFUN(workspace_layout, const char *layout) {
246  if (strcmp(layout, "default") == 0)
248  else if (strcmp(layout, "stacking") == 0 ||
249  strcmp(layout, "stacked") == 0)
251  else
253 }
254 
255 CFGFUN(new_window, const char *windowtype, const char *border, const long width) {
256  int border_style;
257  int border_width;
258 
259  if (strcmp(border, "1pixel") == 0) {
260  border_style = BS_PIXEL;
261  border_width = 1;
262  } else if (strcmp(border, "none") == 0) {
263  border_style = BS_NONE;
264  border_width = 0;
265  } else if (strcmp(border, "pixel") == 0) {
266  border_style = BS_PIXEL;
267  border_width = width;
268  } else {
269  border_style = BS_NORMAL;
270  border_width = width;
271  }
272 
273  if (strcmp(windowtype, "new_window") == 0) {
274  DLOG("default tiled border style = %d and border width = %d (%d physical px)\n",
275  border_style, border_width, logical_px(border_width));
276  config.default_border = border_style;
277  config.default_border_width = logical_px(border_width);
278  } else {
279  DLOG("default floating border style = %d and border width = %d (%d physical px)\n",
280  border_style, border_width, logical_px(border_width));
281  config.default_floating_border = border_style;
283  }
284 }
285 
286 CFGFUN(hide_edge_borders, const char *borders) {
287  if (strcmp(borders, "vertical") == 0)
289  else if (strcmp(borders, "horizontal") == 0)
291  else if (strcmp(borders, "both") == 0)
293  else if (strcmp(borders, "none") == 0)
295  else if (eval_boolstr(borders))
297  else
299 }
300 
301 CFGFUN(focus_follows_mouse, const char *value) {
303 }
304 
305 CFGFUN(mouse_warping, const char *value) {
306  if (strcmp(value, "none") == 0)
308  else if (strcmp(value, "output") == 0)
310 }
311 
312 CFGFUN(force_xinerama, const char *value) {
314 }
315 
316 CFGFUN(force_focus_wrapping, const char *value) {
318 }
319 
320 CFGFUN(workspace_back_and_forth, const char *value) {
322 }
323 
324 CFGFUN(fake_outputs, const char *outputs) {
325  config.fake_outputs = sstrdup(outputs);
326 }
327 
328 CFGFUN(force_display_urgency_hint, const long duration_ms) {
329  config.workspace_urgency_timer = duration_ms / 1000.0;
330 }
331 
332 CFGFUN(workspace, const char *workspace, const char *output) {
333  DLOG("Assigning workspace \"%s\" to output \"%s\"\n", workspace, output);
334  /* Check for earlier assignments of the same workspace so that we
335  * don’t have assignments of a single workspace to different
336  * outputs */
337  struct Workspace_Assignment *assignment;
338  bool duplicate = false;
340  if (strcasecmp(assignment->name, workspace) == 0) {
341  ELOG("You have a duplicate workspace assignment for workspace \"%s\"\n",
342  workspace);
343  assignment->output = sstrdup(output);
344  duplicate = true;
345  }
346  }
347  if (!duplicate) {
348  assignment = scalloc(sizeof(struct Workspace_Assignment));
349  assignment->name = sstrdup(workspace);
350  assignment->output = sstrdup(output);
352  }
353 }
354 
355 CFGFUN(ipc_socket, const char *path) {
357 }
358 
359 CFGFUN(restart_state, const char *path) {
361 }
362 
363 CFGFUN(popup_during_fullscreen, const char *value) {
364  if (strcmp(value, "ignore") == 0) {
365  config.popup_during_fullscreen = PDF_IGNORE;
366  } else if (strcmp(value, "leave_fullscreen") == 0) {
367  config.popup_during_fullscreen = PDF_LEAVE_FULLSCREEN;
368  } else {
369  config.popup_during_fullscreen = PDF_SMART;
370  }
371 }
372 
373 CFGFUN(color_single, const char *colorclass, const char *color) {
374  /* used for client.background only currently */
376 }
377 
378 CFGFUN(color, const char *colorclass, const char *border, const char *background, const char *text, const char *indicator) {
379 #define APPLY_COLORS(classname) \
380  do { \
381  if (strcmp(colorclass, "client." #classname) == 0) { \
382  config.client.classname.border = get_colorpixel(border); \
383  config.client.classname.background = get_colorpixel(background); \
384  config.client.classname.text = get_colorpixel(text); \
385  if (indicator != NULL) { \
386  config.client.classname.indicator = get_colorpixel(indicator); \
387  } \
388  } \
389  } while (0)
390 
391  APPLY_COLORS(focused_inactive);
393  APPLY_COLORS(unfocused);
394  APPLY_COLORS(urgent);
395  APPLY_COLORS(placeholder);
396 
397 #undef APPLY_COLORS
398 }
399 
400 CFGFUN(assign, const char *workspace) {
402  ELOG("Match is empty, ignoring this assignment\n");
403  return;
404  }
405  DLOG("new assignment, using above criteria, to workspace %s\n", workspace);
406  Assignment *assignment = scalloc(sizeof(Assignment));
407  match_copy(&(assignment->match), current_match);
408  assignment->type = A_TO_WORKSPACE;
409  assignment->dest.workspace = sstrdup(workspace);
411 }
412 
413 /*******************************************************************************
414  * Bar configuration (i3bar)
415  ******************************************************************************/
416 
418 
419 CFGFUN(bar_font, const char *font) {
420  FREE(current_bar.font);
421  current_bar.font = sstrdup(font);
422 }
423 
424 CFGFUN(bar_separator_symbol, const char *separator) {
425  FREE(current_bar.separator_symbol);
426  current_bar.separator_symbol = sstrdup(separator);
427 }
428 
429 CFGFUN(bar_mode, const char *mode) {
430  current_bar.mode = (strcmp(mode, "dock") == 0 ? M_DOCK : (strcmp(mode, "hide") == 0 ? M_HIDE : M_INVISIBLE));
431 }
432 
433 CFGFUN(bar_hidden_state, const char *hidden_state) {
434  current_bar.hidden_state = (strcmp(hidden_state, "hide") == 0 ? S_HIDE : S_SHOW);
435 }
436 
437 CFGFUN(bar_id, const char *bar_id) {
438  current_bar.id = sstrdup(bar_id);
439 }
440 
441 CFGFUN(bar_output, const char *output) {
442  int new_outputs = current_bar.num_outputs + 1;
443  current_bar.outputs = srealloc(current_bar.outputs, sizeof(char *) * new_outputs);
444  current_bar.outputs[current_bar.num_outputs] = sstrdup(output);
445  current_bar.num_outputs = new_outputs;
446 }
447 
448 CFGFUN(bar_verbose, const char *verbose) {
449  current_bar.verbose = eval_boolstr(verbose);
450 }
451 
452 CFGFUN(bar_modifier, const char *modifier) {
453  if (strcmp(modifier, "Mod1") == 0)
454  current_bar.modifier = M_MOD1;
455  else if (strcmp(modifier, "Mod2") == 0)
456  current_bar.modifier = M_MOD2;
457  else if (strcmp(modifier, "Mod3") == 0)
458  current_bar.modifier = M_MOD3;
459  else if (strcmp(modifier, "Mod4") == 0)
460  current_bar.modifier = M_MOD4;
461  else if (strcmp(modifier, "Mod5") == 0)
462  current_bar.modifier = M_MOD5;
463  else if (strcmp(modifier, "Control") == 0 ||
464  strcmp(modifier, "Ctrl") == 0)
465  current_bar.modifier = M_CONTROL;
466  else if (strcmp(modifier, "Shift") == 0)
467  current_bar.modifier = M_SHIFT;
468 }
469 
470 CFGFUN(bar_wheel_up_cmd, const char *command) {
471  FREE(current_bar.wheel_up_cmd);
472  current_bar.wheel_up_cmd = sstrdup(command);
473 }
474 
475 CFGFUN(bar_wheel_down_cmd, const char *command) {
476  FREE(current_bar.wheel_down_cmd);
477  current_bar.wheel_down_cmd = sstrdup(command);
478 }
479 
480 CFGFUN(bar_position, const char *position) {
481  current_bar.position = (strcmp(position, "top") == 0 ? P_TOP : P_BOTTOM);
482 }
483 
484 CFGFUN(bar_i3bar_command, const char *i3bar_command) {
485  FREE(current_bar.i3bar_command);
486  current_bar.i3bar_command = sstrdup(i3bar_command);
487 }
488 
489 CFGFUN(bar_color, const char *colorclass, const char *border, const char *background, const char *text) {
490 #define APPLY_COLORS(classname) \
491  do { \
492  if (strcmp(colorclass, #classname) == 0) { \
493  if (text != NULL) { \
494  /* New syntax: border, background, text */ \
495  current_bar.colors.classname##_border = sstrdup(border); \
496  current_bar.colors.classname##_bg = sstrdup(background); \
497  current_bar.colors.classname##_text = sstrdup(text); \
498  } else { \
499  /* Old syntax: text, background */ \
500  current_bar.colors.classname##_bg = sstrdup(background); \
501  current_bar.colors.classname##_text = sstrdup(border); \
502  } \
503  } \
504  } while (0)
505 
506  APPLY_COLORS(focused_workspace);
507  APPLY_COLORS(active_workspace);
508  APPLY_COLORS(inactive_workspace);
509  APPLY_COLORS(urgent_workspace);
510 
511 #undef APPLY_COLORS
512 }
513 
514 CFGFUN(bar_socket_path, const char *socket_path) {
515  FREE(current_bar.socket_path);
516  current_bar.socket_path = sstrdup(socket_path);
517 }
518 
519 CFGFUN(bar_tray_output, const char *output) {
520  FREE(current_bar.tray_output);
521  current_bar.tray_output = sstrdup(output);
522 }
523 
524 CFGFUN(bar_color_single, const char *colorclass, const char *color) {
525  if (strcmp(colorclass, "background") == 0)
526  current_bar.colors.background = sstrdup(color);
527  else if (strcmp(colorclass, "separator") == 0)
528  current_bar.colors.separator = sstrdup(color);
529  else
530  current_bar.colors.statusline = sstrdup(color);
531 }
532 
533 CFGFUN(bar_status_command, const char *command) {
534  FREE(current_bar.status_command);
535  current_bar.status_command = sstrdup(command);
536 }
537 
538 CFGFUN(bar_binding_mode_indicator, const char *value) {
539  current_bar.hide_binding_mode_indicator = !eval_boolstr(value);
540 }
541 
542 CFGFUN(bar_workspace_buttons, const char *value) {
543  current_bar.hide_workspace_buttons = !eval_boolstr(value);
544 }
545 
546 CFGFUN(bar_strip_workspace_numbers, const char *value) {
547  current_bar.strip_workspace_numbers = eval_boolstr(value);
548 }
549 
550 CFGFUN(bar_finish) {
551  DLOG("\t new bar configuration finished, saving.\n");
552  /* Generate a unique ID for this bar if not already configured */
553  if (!current_bar.id)
554  sasprintf(&current_bar.id, "bar-%d", config.number_barconfigs);
555 
557 
558  /* If no font was explicitly set, we use the i3 font as default */
559  if (!current_bar.font && font_pattern)
560  current_bar.font = sstrdup(font_pattern);
561 
562  /* Copy the current (static) structure into a dynamically allocated
563  * one, then cleanup our static one. */
564  Barconfig *bar_config = scalloc(sizeof(Barconfig));
565  memcpy(bar_config, &current_bar, sizeof(Barconfig));
566  TAILQ_INSERT_TAIL(&barconfigs, bar_config, configs);
567 
568  memset(&current_bar, '\0', sizeof(Barconfig));
569 }
Definition: data.h:95
char * font
Font specification for all text rendered on the bar.
Definition: config.h:286
int logical_px(const int logical)
Convert a logical amount of pixels (e.g.
char * sstrdup(const char *str)
Safe-wrapper around strdup which exits if malloc returns NULL (meaning that there is no more memory a...
Definition: data.h:61
void set_font(i3Font *font)
Defines the font to be used for the forthcoming calls.
uint32_t height
Definition: data.h:33
Config config
Definition: config.c:17
int default_floating_border_width
Definition: config.h:101
bool hide_binding_mode_indicator
Hide mode button? Configuration option is 'binding_mode_indicator no' but we invert the bool for the ...
Definition: config.h:302
int32_t floating_minimum_width
Definition: config.h:183
const char * DEFAULT_BINDING_MODE
Definition: bindings.c:19
bool disable_focus_follows_mouse
By default, focus follows mouse.
Definition: config.h:110
Binding * configure_binding(const char *bindtype, const char *modifiers, const char *input_code, const char *release, const char *whole_window, const char *command, const char *modename)
Adds a binding from config parameters given as strings and returns a pointer to the binding structure...
Definition: bindings.c:51
Stores which workspace (by name or number) goes to which output.
Definition: data.h:180
i3Font font
Definition: config.h:92
int32_t floating_maximum_height
Definition: config.h:182
An Assignment makes specific windows go to a specific workspace/output or run a command for that wind...
Definition: data.h:458
static Barconfig current_bar
enum Barconfig::@5 mode
Bar display mode (hide unless modifier is pressed or show in dock mode or always hide in invisible mo...
Definition: data.h:62
int number_barconfigs
Definition: config.h:215
enum Barconfig::@8 position
Bar position (bottom by default).
char * fake_outputs
Overwrites output detection (for testing), see src/fake_outputs.c.
Definition: config.h:155
struct regex * window_role
Definition: data.h:410
struct regex * mark
Definition: data.h:409
int32_t floating_maximum_width
Maximum and minimum dimensions of a floating window.
Definition: config.h:181
struct Barconfig::bar_colors colors
bool verbose
Enable verbose mode? Useful for debugging purposes.
Definition: config.h:305
union Assignment::@17 dest
destination workspace/command, depending on the type
Definition: data.h:83
float workspace_urgency_timer
By default, urgency is cleared immediately when switching to another workspace leads to focusing the ...
Definition: config.h:168
uint32_t width
Definition: data.h:32
uint32_t modifiers_from_str(const char *str)
A utility function to convert a string of modifiers to the corresponding bit mask.
Definition: data.h:81
struct Config::config_client client
bool workspace_auto_back_and_forth
Automatic workspace back and forth switching.
Definition: config.h:161
void match_copy(Match *dest, Match *src)
Copies the data of a match from src to dest.
Definition: match.c:60
int default_orientation
Default orientation for new containers.
Definition: config.h:104
static Match current_match
Definition: data.h:93
#define DLOG(fmt,...)
Definition: libi3.h:86
struct regex * regex_new(const char *pattern)
Creates a new 'regex' struct containing the given pattern and a PCRE compiled regular expression...
Definition: regex.c:24
static int criteria_next_state
static bool verbose
Definition: log.c:36
struct regex * instance
Definition: data.h:408
int sasprintf(char **strp, const char *fmt,...)
Safe-wrapper around asprintf which exits if it returns -1 (meaning that there is no more memory avail...
Definition: data.h:94
Definition: data.h:84
char * tray_output
Output on which the tray should be shown.
Definition: config.h:236
xcb_window_t id
Definition: data.h:423
uint32_t get_colorpixel(const char *hex) __attribute__((const ))
Returns the colorpixel to use for the given hex color (think of HTML).
void workspace_back_and_forth(void)
Focuses the previously focused workspace.
Definition: workspace.c:730
char * wheel_up_cmd
Command that should be run when mouse wheel up button is pressed over i3bar to override the default b...
Definition: config.h:266
static char * font_pattern
struct outputs_head outputs
Definition: randr.c:28
Definition: data.h:82
Definition: data.h:85
char * wheel_down_cmd
Command that should be run when mouse wheel down button is pressed over i3bar to override the default...
Definition: config.h:270
Con * focused
Definition: tree.c:15
Con * con_id
Definition: data.h:427
char * id
Automatically generated ID for this bar config.
Definition: config.h:226
uint32_t background
Definition: config.h:188
warping_t mouse_warping
By default, when switching focus to a window on a different output (e.g.
Definition: config.h:120
enum Barconfig::@7 modifier
Bar modifier (to show bar when in hide mode).
struct autostarts_head autostarts
Definition: main.c:76
char * ipc_socket_path
Definition: config.h:94
struct assignments_head assignments
Definition: main.c:82
adjacent_t hide_edge_borders
Remove borders if they are adjacent to the screen edge.
Definition: config.h:126
bool strip_workspace_numbers
Strip workspace numbers? Configuration option is 'strip_workspace_numbers yes'.
Definition: config.h:298
char * i3bar_command
Command that should be run to execute i3bar, give a full path if i3bar is not in your $PATH...
Definition: config.h:279
CFGFUN(criteria_init, int _state)
static char * current_mode
char * separator_symbol
A custom separator to use instead of a vertical line.
Definition: config.h:289
const char * restart_state_path
Definition: config.h:95
bool force_focus_wrapping
Think of the following layout: Horizontal workspace with a tabbed con on the left of the screen and a...
Definition: config.h:142
#define ELOG(fmt,...)
Definition: libi3.h:81
Definition: data.h:58
enum Match::@12 urgent
#define APPLY_COLORS(classname)
border_style_t default_border
The default border style for new windows.
Definition: config.h:171
A 'Con' represents everything from the X11 root window down to a single X11 window.
Definition: data.h:496
enum Barconfig::@6 hidden_state
void * scalloc(size_t size)
Safe-wrapper around calloc which exits if malloc returns NULL (meaning that there is no more memory a...
struct regex * title
Definition: data.h:405
int default_border_width
Definition: config.h:100
char * workspace
Definition: data.h:481
bool force_xinerama
By default, use the RandR API for multi-monitor setups.
Definition: config.h:152
border_style_t default_floating_border
The default border style for new floating windows.
Definition: config.h:174
static bool eval_boolstr(const char *str)
#define TAILQ_INSERT_TAIL(head, elm, field)
Definition: queue.h:376
bool hide_workspace_buttons
Hide workspace buttons? Configuration option is 'workspace_buttons no' but we invert the bool to get ...
Definition: config.h:294
bool match_is_empty(Match *match)
Check if a match is empty.
Definition: match.c:39
Definition: data.h:71
char * command
Command, like in command mode.
Definition: data.h:298
struct barconfig_head barconfigs
Definition: config.c:19
char ** outputs
Outputs on which this bar should show up on.
Definition: config.h:232
enum Assignment::@16 type
type of this assignment:
int32_t floating_minimum_height
Definition: config.h:184
layout_t default_layout
Definition: config.h:97
void * smalloc(size_t size)
Safe-wrapper around malloc which exits if malloc returns NULL (meaning that there is no more memory a...
Match match
the criteria to check if a window matches
Definition: data.h:476
uint32_t floating_modifier
The modifier which needs to be pressed in combination with your mouse buttons to do things with float...
Definition: config.h:178
#define TAILQ_FOREACH(var, head, field)
Definition: queue.h:347
Definition: data.h:59
char * command
Definition: data.h:480
void * srealloc(void *ptr, size_t size)
Safe-wrapper around realloc which exits if realloc returns NULL (meaning that there is no more memory...
char * status_command
Command that should be run to get a statusline, for example 'i3status'.
Definition: config.h:283
Holds the status bar configuration (i3bar).
Definition: config.h:223
enum Config::@4 popup_during_fullscreen
What should happen when a new popup is opened during fullscreen mode.
char * socket_path
Path to the i3 IPC socket.
Definition: config.h:241
#define FREE(pointer)
Definition: util.h:48
struct autostarts_always_head autostarts_always
Definition: main.c:79
Holds a command specified by either an:
Definition: data.h:296
i3Font load_font(const char *pattern, const bool fallback)
Loads a font for usage, also getting its height.
struct ws_assignments_head ws_assignments
Definition: main.c:86
Definition: data.h:60
void match_init(Match *match)
Definition: match.c:28
struct regex * class
Definition: data.h:407
int num_outputs
Number of outputs in the outputs array.
Definition: config.h:229