diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands.c | 10 | ||||
-rw-r--r-- | sway/commands.h | 4 | ||||
-rw-r--r-- | sway/config.c | 14 | ||||
-rw-r--r-- | sway/config.h | 32 | ||||
-rw-r--r-- | sway/layout.h | 48 | ||||
-rw-r--r-- | sway/list.h | 6 | ||||
-rw-r--r-- | sway/log.c | 2 | ||||
-rw-r--r-- | sway/log.h | 8 |
8 files changed, 62 insertions, 62 deletions
diff --git a/sway/commands.c b/sway/commands.c index 5ed5e070..af24cc95 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -79,10 +79,10 @@ int cmd_exec(struct sway_config *config, int argc, char **argv) { return 1; } - if (config->reloading) { - sway_log(L_DEBUG, "Ignoring exec %s due to reload", join_args(argv, argc)); - return 0; - } + if (config->reloading) { + sway_log(L_DEBUG, "Ignoring exec %s due to reload", join_args(argv, argc)); + return 0; + } if (fork() == 0) { char *args = join_args(argv, argc); @@ -190,7 +190,7 @@ int cmd_reload(struct sway_config *config, int argc, char **argv) { if (!f) { sway_log(L_ERROR, "Sway config file not found, aborting reload!"); free(temp); - return 1; + return 1; } free(temp); config = read_config(f, true); diff --git a/sway/commands.h b/sway/commands.h index f99a5201..42b39f27 100644 --- a/sway/commands.h +++ b/sway/commands.h @@ -4,8 +4,8 @@ #include "config.h" struct cmd_handler { - char *command; - int (*handle)(struct sway_config *config, int argc, char **argv); + char *command; + int (*handle)(struct sway_config *config, int argc, char **argv); }; int handle_command(struct sway_config *config, char *command); diff --git a/sway/config.c b/sway/config.c index da4fac84..280900ca 100644 --- a/sway/config.c +++ b/sway/config.c @@ -18,16 +18,16 @@ void config_defaults(struct sway_config *config) { // Flags config->focus_follows_mouse = true; config->mouse_warping = true; - config->reloading = false; + config->reloading = false; } struct sway_config *read_config(FILE *file, bool is_active) { struct sway_config *config = malloc(sizeof(struct sway_config)); config_defaults(config); - if (is_active) { - config->reloading = true; - } + if (is_active) { + config->reloading = true; + } bool success = true; @@ -61,9 +61,9 @@ _continue: exit(1); } - if (is_active) { - config->reloading = true; - } + if (is_active) { + config->reloading = true; + } return config; } diff --git a/sway/config.h b/sway/config.h index 6a50c445..733aaaae 100644 --- a/sway/config.h +++ b/sway/config.h @@ -6,31 +6,31 @@ #include "list.h" struct sway_variable { - char *name; - char *value; + char *name; + char *value; }; struct sway_binding { - list_t *keys; - uint32_t modifiers; - char *command; + list_t *keys; + uint32_t modifiers; + char *command; }; struct sway_mode { - char *name; - list_t *bindings; + char *name; + list_t *bindings; }; struct sway_config { - list_t *symbols; - list_t *modes; - struct sway_mode *current_mode; - - // Flags - bool focus_follows_mouse; - bool mouse_warping; - - bool reloading; + list_t *symbols; + list_t *modes; + struct sway_mode *current_mode; + + // Flags + bool focus_follows_mouse; + bool mouse_warping; + + bool reloading; }; struct sway_config *read_config(FILE *file, bool is_active); diff --git a/sway/layout.h b/sway/layout.h index b0aec42f..3a8f8902 100644 --- a/sway/layout.h +++ b/sway/layout.h @@ -5,38 +5,38 @@ #include "list.h" struct sway_container { - wlc_handle handle; + wlc_handle handle; - enum { - C_ROOT, - C_OUTPUT, - C_WORKSPACE, - C_CONTAINER, - C_VIEW - } type; + enum { + C_ROOT, + C_OUTPUT, + C_WORKSPACE, + C_CONTAINER, + C_VIEW + } type; - enum { - L_NONE, - L_HORIZ, - L_VERT, - L_STACKED, - L_TABBED, - L_FLOATING - } layout; + enum { + L_NONE, + L_HORIZ, + L_VERT, + L_STACKED, + L_TABBED, + L_FLOATING + } layout; - // Not including borders or margins - int width, height; + // Not including borders or margins + int width, height; - int x, y; + int x, y; - int weight; + int weight; - char *name; + char *name; - list_t *children; + list_t *children; - struct sway_container *parent; - struct sway_container *focused; + struct sway_container *parent; + struct sway_container *focused; }; typedef struct sway_container swayc_t; diff --git a/sway/list.h b/sway/list.h index 93649fd5..e035ec4c 100644 --- a/sway/list.h +++ b/sway/list.h @@ -2,9 +2,9 @@ #define _SWAY_LIST_H typedef struct { - int capacity; - int length; - void **items; + int capacity; + int length; + void **items; } list_t; list_t *create_list(); @@ -18,7 +18,7 @@ void init_log(int verbosity) { } void sway_log_colors(int mode) { - colored = (mode == 1) ? 1 : 0; + colored = (mode == 1) ? 1 : 0; } void sway_abort(char *format, ...) { @@ -2,10 +2,10 @@ #define _SWAY_LOG_H typedef enum { - L_SILENT = 0, - L_ERROR = 1, - L_INFO = 2, - L_DEBUG = 3, + L_SILENT = 0, + L_ERROR = 1, + L_INFO = 2, + L_DEBUG = 3, } log_importance_t; void init_log(int verbosity); |