13 #include <xkbcommon/xkbcommon.h> 27 DLOG(
"Ungrabbing all keys\n");
28 xcb_ungrab_key(conn, XCB_GRAB_ANY,
root, XCB_BUTTON_MASK_ANY);
51 die(
"Unable to find the configuration file (looked at " 52 "$XDG_CONFIG_HOME/i3/config, ~/.i3/config, $XDG_CONFIG_DIRS/i3/config " 53 "and " SYSCONFDIR
"/i3/config)");
56 LOG(
"Parsing configfile %s\n", path);
61 if (!use_nagbar &&
bindings == NULL) {
203 memset(&config, 0,
sizeof(config));
206 #define INIT_COLOR(x, cborder, cbackground, ctext, cindicator) \ 208 x.border = draw_util_hex_to_color(cborder); \ 209 x.background = draw_util_hex_to_color(cbackground); \ 210 x.text = draw_util_hex_to_color(ctext); \ 211 x.indicator = draw_util_hex_to_color(cindicator); \ 212 x.child_border = draw_util_hex_to_color(cbackground); \ 217 "#522702",
"#522702",
"#ffffff",
"#a6907d");
219 "#522702",
"#361a01",
"#ffffff",
"#a6907d");
221 "#522702",
"#361a01",
"#999999",
"#a6907d");
223 "#666666",
"#a6907d",
"#ce0000",
"#a6907d");
227 "#e53b27",
"#e53b27",
"#ffffff",
"#f19b90");
229 "#e53b27",
"#902519",
"#ffffff",
"#f19b90");
231 "#e53b27",
"#902519",
"#999999",
"#f19b90");
233 "#e53b27",
"#f19b90",
"#ce0000",
"#f19b90");
237 "#d05f03",
"#d05f03",
"#ffffff",
"#daa67e");
239 "#d05f03",
"#7b3702",
"#ffffff",
"#daa67e");
241 "#d05f03",
"#7b3702",
"#999999",
"#daa67e");
243 "#d05f03",
"#daa67e",
"#ce0000",
"#daa67e");
247 "#999b00",
"#999b00",
"#ffffff",
"#cacb7c");
249 "#999b00",
"#666700",
"#ffffff",
"#cacb7c");
251 "#999b00",
"#666700",
"#999999",
"#cacb7c");
253 "#999b00",
"#cacb7c",
"#ce0000",
"#cacb7c");
257 "#04af5b",
"#04af5b",
"#ffffff",
"#7dd5aa");
259 "#04af5b",
"#02713b",
"#ffffff",
"#7dd5aa");
261 "#04af5b",
"#02713b",
"#999999",
"#7dd5aa");
263 "#04af5b",
"#7dd5aa",
"#ce0000",
"#7dd5aa");
267 "#8c959f",
"#8c959f",
"#ffffff",
"#c3c8cd");
269 "#8c959f",
"#676d75",
"#ffffff",
"#c3c8cd");
271 "#8c959f",
"#676d75",
"#999999",
"#c3c8cd");
273 "#8c959f",
"#c3c8cd",
"#ce0000",
"#c3c8cd");
277 "#3384d6",
"#3384d6",
"#ffffff",
"#95bee8");
279 "#3384d6",
"#1f5082",
"#ffffff",
"#95bee8");
281 "#3384d6",
"#1f5082",
"#999999",
"#95bee8");
283 "#3384d6",
"#95bee8",
"#ce0000",
"#95bee8");
287 "#8f5cbe",
"#8f5cbe",
"#ffffff",
"#c6abdd");
289 "#8f5cbe",
"#5c3e78",
"#ffffff",
"#c6abdd");
291 "#8f5cbe",
"#5c3e78",
"#999999",
"#c6abdd");
293 "#8f5cbe",
"#c6abdd",
"#ce0000",
"#c6abdd");
297 "#595959",
"#595959",
"#ffffff",
"#a3a3a3");
299 "#595959",
"#3a3a3a",
"#ffffff",
"#a3a3a3");
301 "#595959",
"#3a3a3a",
"#999999",
"#a3a3a3");
303 "#595959",
"#a3a3a3",
"#ce0000",
"#a3a3a3");
307 "#000000",
"#0c0c0c",
"#ffffff",
"#000000");
344 if (config.
font.
type == FONT_TYPE_NONE) {
345 ELOG(
"You did not specify required configuration option \"font\"\n");
border_style_t default_border
The default border style for new windows.
int num_outputs
Number of outputs in the outputs array.
char * i3bar_command
Command that should be run to execute i3bar, give a full path if i3bar is not in your $PATH...
enum Font::@23 type
The type of font.
struct deco_render_params * deco_render_params
Cache for the decoration rendering.
int logical_px(const int logical)
Convert a logical amount of pixels (e.g.
char * socket_path
Path to the i3 IPC socket.
void update_barconfig(void)
Sends the current bar configuration as an event to all barconfig_update listeners.
struct barconfig_head barconfigs
Stores which workspace (by name or number) goes to which output.
#define SLIST_REMOVE(head, elm, type, field)
struct Barconfig::bar_colors colors
#define TAILQ_EMPTY(head)
void * scalloc(size_t num, size_t size)
Safe-wrapper around calloc which exits if malloc returns NULL (meaning that there is no more memory a...
float workspace_urgency_timer
By default, urgency is cleared immediately when switching to another workspace leads to focusing the ...
xcb_connection_t * conn
XCB connection and root screen.
void match_free(Match *match)
Frees the given match.
char * binding_mode_border
focus_wrapping_t focus_wrapping
When focus wrapping is enabled (the default), attempting to move focus past the edge of the screen (i...
void switch_mode(const char *new_mode)
Switches the key bindings to the given mode, if the mode exists.
Holds a keybinding, consisting of a keycode combined with modifiers and the command which is executed...
char * active_workspace_bg
#define SLIST_EMPTY(head)
int default_floating_border_width
#define INIT_COLOR(x, cborder, cbackground, ctext, cindicator)
struct bindings_head * bindings
char * inactive_workspace_border
void free_font(void)
Frees the resources taken by the current font.
struct assignments_head assignments
struct Config::config_bar bar
The configuration file can contain multiple sets of bindings.
Defines a mouse command to be executed instead of the default behavior when clicking on the non-statu...
struct Colortriple unfocused
void ipc_send_barconfig_update_event(Barconfig *barconfig)
For the barconfig update events, we send the serialized barconfig.
#define TAILQ_REMOVE(head, elm, field)
void grab_all_keys(xcb_connection_t *conn)
Grab the bound keys (tell X to send us keypress events for those keycodes)
#define TAILQ_FIRST(head)
char * font
Font specification for all text rendered on the bar.
#define SLIST_FIRST(head)
char ** outputs
Outputs on which this bar should show up on.
char * focused_background
enum Assignment::@18 type
type of this assignment:
char * fake_outputs
Overwrites output detection (for testing), see src/fake_outputs.c.
char * focused_workspace_border
char * active_workspace_text
char * status_command
Command that should be run to get a statusline, for example 'i3status'.
char * current_configpath
char * focused_statusline
char * sstrdup(const char *str)
Safe-wrapper around strdup which exits if malloc returns NULL (meaning that there is no more memory a...
int default_orientation
Default orientation for new containers.
char * urgent_workspace_border
void load_configuration(xcb_connection_t *conn, const char *override_configpath, bool reload)
Reads the configuration from ~/.i3/config or /etc/i3/config if not found.
struct Colortriple urgent
void binding_free(Binding *bind)
Frees the binding.
uint32_t nr_assignments
Pointers to the Assignments which were already ran for this Window (assignments run only once) ...
struct Colortriple focused_inactive
char * get_config_path(const char *override_configpath, bool use_system_paths)
Get the path of the first configuration file found.
char * focused_workspace_bg
color_t draw_util_hex_to_color(const char *color)
Parses the given color in hex format to an internal color representation.
struct all_cons_head all_cons
struct Config::config_client client[QUBE_NUM_LABELS]
char * command
The command which is to be executed for this button.
Match match
the criteria to check if a window matches
Holds the status bar configuration (i3bar).
A 'Con' represents everything from the X11 root window down to a single X11 window.
void x_deco_recurse(Con *con)
Recursively calls x_draw_decoration.
Holds part of the configuration (the part which is not already in dedicated structures in include/dat...
i3Font load_font(const char *pattern, const bool fallback)
Loads a font for usage, also getting its height.
An Assignment makes specific windows go to a specific workspace/output or run a command for that wind...
bool parse_file(const char *f, bool use_nagbar)
Parses the given file by first replacing the variables, then calling parse_config and launching i3-na...
void translate_keysyms(void)
Translates keysymbols to keycodes for all bindings which use keysyms.
struct Colortriple placeholder
char * inactive_workspace_bg
struct Colortriple unfocused
char * urgent_workspace_text
void regrab_all_buttons(xcb_connection_t *conn)
Release the button grabs on all managed windows and regrab them, reevaluating which buttons need to b...
struct Colortriple urgent
struct ws_assignments_head ws_assignments
#define SLIST_INSERT_HEAD(head, elm, field)
bool parse_configuration(const char *override_configpath, bool use_nagbar)
Finds the configuration file to use (either the one specified by override_configpath), the user’s one or the system default) and calls parse_file().
char * active_workspace_border
struct Colortriple focused
Assignment ** ran_assignments
struct bindings_head * bindings
char * urgent_workspace_bg
bool show_marks
Specifies whether or not marks should be displayed in the window decoration.
void set_font(i3Font *font)
Defines the font to be used for the forthcoming calls.
void ungrab_all_keys(xcb_connection_t *conn)
Ungrabs all keys, to be called before re-grabbing the keys because of a mapping_notify event or a con...
char * restart_state_path
char * focused_workspace_text
union Assignment::@19 dest
destination workspace/command/output, depending on the type
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_FOREACH(var, head, field)
border_style_t default_floating_border
The default border style for new floating windows.
struct Colortriple focused
char * inactive_workspace_text
char * id
Automatically generated ID for this bar config.