aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/ipc-client.c11
-rw-r--r--common/log.c16
-rw-r--r--common/util.c7
-rw-r--r--include/sway/border.h (renamed from include/border.h)0
-rw-r--r--include/sway/commands.h (renamed from include/commands.h)0
-rw-r--r--include/sway/config.h (renamed from include/config.h)0
-rw-r--r--include/sway/container.h (renamed from include/container.h)0
-rw-r--r--include/sway/criteria.h (renamed from include/criteria.h)0
-rw-r--r--include/sway/extensions.h (renamed from include/extensions.h)0
-rw-r--r--include/sway/focus.h (renamed from include/focus.h)0
-rw-r--r--include/sway/handlers.h (renamed from include/handlers.h)0
-rw-r--r--include/sway/input.h (renamed from include/input.h)0
-rw-r--r--include/sway/input_state.h (renamed from include/input_state.h)0
-rw-r--r--include/sway/ipc-json.h (renamed from include/ipc-json.h)0
-rw-r--r--include/sway/ipc-server.h (renamed from include/ipc-server.h)0
-rw-r--r--include/sway/layout.h (renamed from include/layout.h)0
-rw-r--r--include/sway/output.h (renamed from include/output.h)0
-rw-r--r--include/sway/resize.h (renamed from include/resize.h)0
-rw-r--r--include/sway/workspace.h (renamed from include/workspace.h)0
-rw-r--r--include/swaybar/bar.h (renamed from include/bar/bar.h)0
-rw-r--r--include/swaybar/config.h (renamed from include/bar/config.h)0
-rw-r--r--include/swaybar/ipc.h (renamed from include/bar/ipc.h)0
-rw-r--r--include/swaybar/render.h (renamed from include/bar/render.h)0
-rw-r--r--include/swaybar/status_line.h (renamed from include/bar/status_line.h)0
-rw-r--r--include/swaylock/swaylock.h (renamed from include/lock/lock.h)0
-rw-r--r--sway/border.c6
-rw-r--r--sway/commands.c30
-rw-r--r--sway/config.c14
-rw-r--r--sway/container.c20
-rw-r--r--sway/criteria.c6
-rw-r--r--sway/debug_log.c2
-rw-r--r--sway/extensions.c8
-rw-r--r--sway/focus.c15
-rw-r--r--sway/handlers.c35
-rw-r--r--sway/input.c4
-rw-r--r--sway/input_state.c5
-rw-r--r--sway/ipc-json.c4
-rw-r--r--sway/ipc-server.c12
-rw-r--r--sway/layout.c20
-rw-r--r--sway/main.c18
-rw-r--r--sway/output.c2
-rw-r--r--sway/resize.c10
-rw-r--r--sway/workspace.c20
-rw-r--r--swaybar/bar.c11
-rw-r--r--swaybar/config.c2
-rw-r--r--swaybar/ipc.c5
-rw-r--r--swaybar/main.c2
-rw-r--r--swaybar/render.c6
-rw-r--r--swaybar/status_line.c4
-rw-r--r--swaylock/main.c3
50 files changed, 145 insertions, 153 deletions
diff --git a/common/ipc-client.c b/common/ipc-client.c
index e155c168..106f9d86 100644
--- a/common/ipc-client.c
+++ b/common/ipc-client.c
@@ -1,16 +1,13 @@
1#include <stdint.h>
1#include <stdio.h> 2#include <stdio.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <string.h> 4#include <string.h>
4#include <getopt.h>
5#include <stdint.h>
6#include <sys/un.h>
7#include <sys/socket.h> 5#include <sys/socket.h>
6#include <sys/un.h>
8#include <unistd.h> 7#include <unistd.h>
9#include "log.h"
10#include "stringop.h"
11#include "ipc.h"
12#include "readline.h"
13#include "ipc-client.h" 8#include "ipc-client.h"
9#include "readline.h"
10#include "log.h"
14 11
15static const char ipc_magic[] = {'i', '3', '-', 'i', 'p', 'c'}; 12static const char ipc_magic[] = {'i', '3', '-', 'i', 'p', 'c'};
16static const size_t ipc_header_size = sizeof(ipc_magic)+8; 13static const size_t ipc_header_size = sizeof(ipc_magic)+8;
diff --git a/common/log.c b/common/log.c
index 1da2ba2f..4f0baa3f 100644
--- a/common/log.c
+++ b/common/log.c
@@ -1,17 +1,15 @@
1#include "log.h" 1#include <errno.h>
2#include "sway.h" 2#include <libgen.h>
3#include "readline.h" 3#include <signal.h>
4#include <stdarg.h> 4#include <stdarg.h>
5#include <stdio.h> 5#include <stdio.h>
6#include <stdlib.h> 6#include <stdlib.h>
7#include <libgen.h>
8#include <fcntl.h>
9#include <unistd.h> 7#include <unistd.h>
10#include <signal.h>
11#include <time.h>
12#include <errno.h>
13#include <string.h> 8#include <string.h>
14#include <stringop.h> 9#include <time.h>
10#include "log.h"
11#include "sway.h"
12#include "readline.h"
15 13
16static int colored = 1; 14static int colored = 1;
17static log_importance_t loglevel_default = L_ERROR; 15static log_importance_t loglevel_default = L_ERROR;
diff --git a/common/util.c b/common/util.c
index f0b0fdf0..f2302676 100644
--- a/common/util.c
+++ b/common/util.c
@@ -1,10 +1,13 @@
1#include <math.h> 1#include <math.h>
2#include <stdint.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <string.h>
4#include <stdlib.h> 4#include <stdlib.h>
5#include <string.h>
6#include <wlc/wlc.h>
7#include <xkbcommon/xkbcommon-names.h>
8#include "log.h"
5#include "readline.h" 9#include "readline.h"
6#include "util.h" 10#include "util.h"
7#include "log.h"
8 11
9int wrap(int i, int max) { 12int wrap(int i, int max) {
10 return ((i % max) + max) % max; 13 return ((i % max) + max) % max;
diff --git a/include/border.h b/include/sway/border.h
index c30c9da3..c30c9da3 100644
--- a/include/border.h
+++ b/include/sway/border.h
diff --git a/include/commands.h b/include/sway/commands.h
index cd0610f4..cd0610f4 100644
--- a/include/commands.h
+++ b/include/sway/commands.h
diff --git a/include/config.h b/include/sway/config.h
index 56deaf01..56deaf01 100644
--- a/include/config.h
+++ b/include/sway/config.h
diff --git a/include/container.h b/include/sway/container.h
index 4dd7f3a0..4dd7f3a0 100644
--- a/include/container.h
+++ b/include/sway/container.h
diff --git a/include/criteria.h b/include/sway/criteria.h
index 5c71d172..5c71d172 100644
--- a/include/criteria.h
+++ b/include/sway/criteria.h
diff --git a/include/extensions.h b/include/sway/extensions.h
index f6b0c00e..f6b0c00e 100644
--- a/include/extensions.h
+++ b/include/sway/extensions.h
diff --git a/include/focus.h b/include/sway/focus.h
index b532edc2..b532edc2 100644
--- a/include/focus.h
+++ b/include/sway/focus.h
diff --git a/include/handlers.h b/include/sway/handlers.h
index 956b98f4..956b98f4 100644
--- a/include/handlers.h
+++ b/include/sway/handlers.h
diff --git a/include/input.h b/include/sway/input.h
index 4ed9bffe..4ed9bffe 100644
--- a/include/input.h
+++ b/include/sway/input.h
diff --git a/include/input_state.h b/include/sway/input_state.h
index 903301fb..903301fb 100644
--- a/include/input_state.h
+++ b/include/sway/input_state.h
diff --git a/include/ipc-json.h b/include/sway/ipc-json.h
index 02b07a23..02b07a23 100644
--- a/include/ipc-json.h
+++ b/include/sway/ipc-json.h
diff --git a/include/ipc-server.h b/include/sway/ipc-server.h
index 1d199134..1d199134 100644
--- a/include/ipc-server.h
+++ b/include/sway/ipc-server.h
diff --git a/include/layout.h b/include/sway/layout.h
index b982365c..b982365c 100644
--- a/include/layout.h
+++ b/include/sway/layout.h
diff --git a/include/output.h b/include/sway/output.h
index e8afd5ed..e8afd5ed 100644
--- a/include/output.h
+++ b/include/sway/output.h
diff --git a/include/resize.h b/include/sway/resize.h
index 0d382994..0d382994 100644
--- a/include/resize.h
+++ b/include/sway/resize.h
diff --git a/include/workspace.h b/include/sway/workspace.h
index c268fafa..c268fafa 100644
--- a/include/workspace.h
+++ b/include/sway/workspace.h
diff --git a/include/bar/bar.h b/include/swaybar/bar.h
index a3c511d9..a3c511d9 100644
--- a/include/bar/bar.h
+++ b/include/swaybar/bar.h
diff --git a/include/bar/config.h b/include/swaybar/config.h
index 934116ca..934116ca 100644
--- a/include/bar/config.h
+++ b/include/swaybar/config.h
diff --git a/include/bar/ipc.h b/include/swaybar/ipc.h
index c11931d0..c11931d0 100644
--- a/include/bar/ipc.h
+++ b/include/swaybar/ipc.h
diff --git a/include/bar/render.h b/include/swaybar/render.h
index 114f43f4..114f43f4 100644
--- a/include/bar/render.h
+++ b/include/swaybar/render.h
diff --git a/include/bar/status_line.h b/include/swaybar/status_line.h
index 9b77e8a7..9b77e8a7 100644
--- a/include/bar/status_line.h
+++ b/include/swaybar/status_line.h
diff --git a/include/lock/lock.h b/include/swaylock/swaylock.h
index 1cf66e89..1cf66e89 100644
--- a/include/lock/lock.h
+++ b/include/swaylock/swaylock.h
diff --git a/sway/border.c b/sway/border.c
index 5cb02274..65f69411 100644
--- a/sway/border.c
+++ b/sway/border.c
@@ -1,12 +1,12 @@
1#include "border.h"
2#include <wlc/wlc-render.h> 1#include <wlc/wlc-render.h>
3#include <cairo/cairo.h> 2#include <cairo/cairo.h>
4#include <pango/pangocairo.h> 3#include <pango/pangocairo.h>
5#include <stdlib.h> 4#include <stdlib.h>
6#include <stdio.h> 5#include <stdio.h>
7#include <arpa/inet.h> 6#include <arpa/inet.h>
8#include "container.h" 7#include "sway/border.h"
9#include "config.h" 8#include "sway/container.h"
9#include "sway/config.h"
10#include "client/pango.h" 10#include "client/pango.h"
11 11
12void cairo_set_source_u32(cairo_t *cairo, uint32_t color) { 12void cairo_set_source_u32(cairo_t *cairo, uint32_t color) {
diff --git a/sway/commands.c b/sway/commands.c
index 5a5bcd22..347b463b 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -16,24 +16,24 @@
16#include <limits.h> 16#include <limits.h>
17#include <float.h> 17#include <float.h>
18#include <libinput.h> 18#include <libinput.h>
19#include "sway/layout.h"
20#include "sway/focus.h"
21#include "sway/workspace.h"
22#include "sway/commands.h"
23#include "sway/container.h"
24#include "sway/output.h"
25#include "sway/handlers.h"
26#include "sway/resize.h"
27#include "sway/input_state.h"
28#include "sway/criteria.h"
29#include "sway/ipc-server.h"
30#include "sway/input.h"
31#include "sway/border.h"
19#include "stringop.h" 32#include "stringop.h"
20#include "layout.h"
21#include "focus.h"
22#include "log.h"
23#include "util.h"
24#include "workspace.h"
25#include "commands.h"
26#include "container.h"
27#include "output.h"
28#include "handlers.h"
29#include "sway.h" 33#include "sway.h"
30#include "resize.h" 34#include "util.h"
31#include "input_state.h"
32#include "criteria.h"
33#include "ipc-server.h"
34#include "list.h" 35#include "list.h"
35#include "input.h" 36#include "log.h"
36#include "border.h"
37 37
38typedef struct cmd_results *sway_cmd(int argc, char **argv); 38typedef struct cmd_results *sway_cmd(int argc, char **argv);
39 39
diff --git a/sway/config.c b/sway/config.c
index bed233bd..a187fe3e 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -12,17 +12,17 @@
12#include <limits.h> 12#include <limits.h>
13#include <float.h> 13#include <float.h>
14#include "wayland-desktop-shell-server-protocol.h" 14#include "wayland-desktop-shell-server-protocol.h"
15#include "sway/commands.h"
16#include "sway/config.h"
17#include "sway/layout.h"
18#include "sway/input_state.h"
19#include "sway/criteria.h"
20#include "sway/input.h"
21#include "sway/border.h"
15#include "readline.h" 22#include "readline.h"
16#include "stringop.h" 23#include "stringop.h"
17#include "list.h" 24#include "list.h"
18#include "log.h" 25#include "log.h"
19#include "commands.h"
20#include "config.h"
21#include "layout.h"
22#include "input_state.h"
23#include "criteria.h"
24#include "input.h"
25#include "border.h"
26 26
27struct sway_config *config = NULL; 27struct sway_config *config = NULL;
28 28
diff --git a/sway/container.c b/sway/container.c
index c922bac3..5614293c 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -3,17 +3,17 @@
3#include <stdbool.h> 3#include <stdbool.h>
4#include <strings.h> 4#include <strings.h>
5#include <string.h> 5#include <string.h>
6#include "config.h" 6#include "sway/config.h"
7#include "stringop.h" 7#include "sway/container.h"
8#include "container.h" 8#include "sway/workspace.h"
9#include "workspace.h" 9#include "sway/focus.h"
10#include "focus.h" 10#include "sway/border.h"
11#include "border.h" 11#include "sway/layout.h"
12#include "layout.h" 12#include "sway/input_state.h"
13#include "input_state.h" 13#include "sway/ipc-server.h"
14#include "sway/output.h"
14#include "log.h" 15#include "log.h"
15#include "ipc-server.h" 16#include "stringop.h"
16#include "output.h"
17 17
18#define ASSERT_NONNULL(PTR) \ 18#define ASSERT_NONNULL(PTR) \
19 sway_assert (PTR, #PTR "must be non-null") 19 sway_assert (PTR, #PTR "must be non-null")
diff --git a/sway/criteria.c b/sway/criteria.c
index 53435d29..739a183e 100644
--- a/sway/criteria.c
+++ b/sway/criteria.c
@@ -2,12 +2,12 @@
2#include <stdio.h> 2#include <stdio.h>
3#include <stdbool.h> 3#include <stdbool.h>
4#include <regex.h> 4#include <regex.h>
5#include "criteria.h" 5#include "sway/criteria.h"
6#include "sway/container.h"
7#include "sway/config.h"
6#include "stringop.h" 8#include "stringop.h"
7#include "list.h" 9#include "list.h"
8#include "log.h" 10#include "log.h"
9#include "container.h"
10#include "config.h"
11 11
12enum criteria_type { // *must* keep in sync with criteria_strings[] 12enum criteria_type { // *must* keep in sync with criteria_strings[]
13 CRIT_CLASS, 13 CRIT_CLASS,
diff --git a/sway/debug_log.c b/sway/debug_log.c
index 7c988464..8d891a44 100644
--- a/sway/debug_log.c
+++ b/sway/debug_log.c
@@ -10,7 +10,7 @@
10#include <errno.h> 10#include <errno.h>
11#include <string.h> 11#include <string.h>
12#include <stringop.h> 12#include <stringop.h>
13#include "workspace.h" 13#include "sway/workspace.h"
14 14
15/* XXX:DEBUG:XXX */ 15/* XXX:DEBUG:XXX */
16static void container_log(const swayc_t *c, int depth) { 16static void container_log(const swayc_t *c, int depth) {
diff --git a/sway/extensions.c b/sway/extensions.c
index 4611f33e..70ec537d 100644
--- a/sway/extensions.c
+++ b/sway/extensions.c
@@ -4,11 +4,11 @@
4#include <wlc/wlc-render.h> 4#include <wlc/wlc-render.h>
5#include "wayland-desktop-shell-server-protocol.h" 5#include "wayland-desktop-shell-server-protocol.h"
6#include "wayland-swaylock-server-protocol.h" 6#include "wayland-swaylock-server-protocol.h"
7#include "layout.h" 7#include "sway/layout.h"
8#include "sway/input_state.h"
9#include "sway/extensions.h"
10#include "sway/ipc-server.h"
8#include "log.h" 11#include "log.h"
9#include "input_state.h"
10#include "extensions.h"
11#include "ipc-server.h"
12 12
13struct desktop_shell_state desktop_shell; 13struct desktop_shell_state desktop_shell;
14 14
diff --git a/sway/focus.c b/sway/focus.c
index 145e5584..9207260d 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -1,13 +1,12 @@
1#include <wlc/wlc.h> 1#include <wlc/wlc.h>
2 2#include "sway/focus.h"
3#include "focus.h" 3#include "sway/workspace.h"
4#include "sway/layout.h"
5#include "sway/config.h"
6#include "sway/input_state.h"
7#include "sway/ipc-server.h"
8#include "sway/border.h"
4#include "log.h" 9#include "log.h"
5#include "workspace.h"
6#include "layout.h"
7#include "config.h"
8#include "input_state.h"
9#include "ipc-server.h"
10#include "border.h"
11 10
12bool locked_container_focus = false; 11bool locked_container_focus = false;
13bool suspend_workspace_cleanup = false; 12bool suspend_workspace_cleanup = false;
diff --git a/sway/handlers.c b/sway/handlers.c
index 846d0005..47af7bd5 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -7,25 +7,24 @@
7#include <wlc/wlc-render.h> 7#include <wlc/wlc-render.h>
8#include <wlc/wlc-wayland.h> 8#include <wlc/wlc-wayland.h>
9#include <ctype.h> 9#include <ctype.h>
10 10#include "sway/handlers.h"
11#include "handlers.h" 11#include "sway/border.h"
12#include "border.h" 12#include "sway/layout.h"
13#include "log.h" 13#include "sway/config.h"
14#include "layout.h" 14#include "sway/commands.h"
15#include "config.h" 15#include "sway/workspace.h"
16#include "commands.h" 16#include "sway/container.h"
17#include "stringop.h" 17#include "sway/output.h"
18#include "workspace.h" 18#include "sway/focus.h"
19#include "container.h" 19#include "sway/input_state.h"
20#include "output.h" 20#include "sway/resize.h"
21#include "focus.h" 21#include "sway/extensions.h"
22#include "input_state.h" 22#include "sway/criteria.h"
23#include "resize.h" 23#include "sway/ipc-server.h"
24#include "extensions.h" 24#include "sway/input.h"
25#include "criteria.h"
26#include "ipc-server.h"
27#include "list.h" 25#include "list.h"
28#include "input.h" 26#include "stringop.h"
27#include "log.h"
29 28
30// Event should be sent to client 29// Event should be sent to client
31#define EVENT_PASSTHROUGH false 30#define EVENT_PASSTHROUGH false
diff --git a/sway/input.c b/sway/input.c
index 1f3e99e7..ae24cb49 100644
--- a/sway/input.c
+++ b/sway/input.c
@@ -4,8 +4,8 @@
4#include <stdio.h> 4#include <stdio.h>
5#include <string.h> 5#include <string.h>
6#include <libinput.h> 6#include <libinput.h>
7#include "config.h" 7#include "sway/config.h"
8#include "input.h" 8#include "sway/input.h"
9#include "list.h" 9#include "list.h"
10#include "log.h" 10#include "log.h"
11 11
diff --git a/sway/input_state.c b/sway/input_state.c
index 7e31d3d9..68df17de 100644
--- a/sway/input_state.c
+++ b/sway/input_state.c
@@ -1,10 +1,9 @@
1#include <string.h> 1#include <string.h>
2#include <stdbool.h> 2#include <stdbool.h>
3#include <ctype.h> 3#include <ctype.h>
4#include "sway/input_state.h"
5#include "sway/config.h"
4#include "log.h" 6#include "log.h"
5#include "config.h"
6
7#include "input_state.h"
8 7
9#define KEY_STATE_MAX_LENGTH 64 8#define KEY_STATE_MAX_LENGTH 64
10 9
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 1debca7b..3f03b9f1 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -2,9 +2,9 @@
2#include <ctype.h> 2#include <ctype.h>
3#include <string.h> 3#include <string.h>
4#include <stdint.h> 4#include <stdint.h>
5#include "container.h" 5#include "sway/container.h"
6#include "sway/ipc-json.h"
6#include "util.h" 7#include "util.h"
7#include "ipc-json.h"
8 8
9static json_object *ipc_json_create_rect(swayc_t *c) { 9static json_object *ipc_json_create_rect(swayc_t *c) {
10 json_object *rect = json_object_new_object(); 10 json_object *rect = json_object_new_object();
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 7039e348..70007f57 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -13,15 +13,15 @@
13#include <json-c/json.h> 13#include <json-c/json.h>
14#include <list.h> 14#include <list.h>
15#include <libinput.h> 15#include <libinput.h>
16#include "ipc-json.h" 16#include "sway/ipc-json.h"
17#include "ipc-server.h" 17#include "sway/ipc-server.h"
18#include "sway/config.h"
19#include "sway/commands.h"
20#include "sway/input.h"
21#include "stringop.h"
18#include "log.h" 22#include "log.h"
19#include "config.h"
20#include "commands.h"
21#include "list.h" 23#include "list.h"
22#include "stringop.h"
23#include "util.h" 24#include "util.h"
24#include "input.h"
25 25
26static int ipc_socket = -1; 26static int ipc_socket = -1;
27static struct wlc_event_source *ipc_event_source = NULL; 27static struct wlc_event_source *ipc_event_source = NULL;
diff --git a/sway/layout.c b/sway/layout.c
index 01c8e4e3..cf6a111e 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -2,17 +2,17 @@
2#include <stdbool.h> 2#include <stdbool.h>
3#include <math.h> 3#include <math.h>
4#include <wlc/wlc.h> 4#include <wlc/wlc.h>
5#include "extensions.h" 5#include "sway/extensions.h"
6#include "log.h" 6#include "sway/config.h"
7#include "sway/container.h"
8#include "sway/workspace.h"
9#include "sway/focus.h"
10#include "sway/output.h"
11#include "sway/ipc-server.h"
12#include "sway/border.h"
13#include "sway/layout.h"
7#include "list.h" 14#include "list.h"
8#include "config.h" 15#include "log.h"
9#include "container.h"
10#include "workspace.h"
11#include "focus.h"
12#include "output.h"
13#include "ipc-server.h"
14#include "border.h"
15#include "layout.h"
16 16
17swayc_t root_container; 17swayc_t root_container;
18list_t *scratchpad; 18list_t *scratchpad;
diff --git a/sway/main.c b/sway/main.c
index 51b12d20..972b260b 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -8,17 +8,17 @@
8#include <signal.h> 8#include <signal.h>
9#include <unistd.h> 9#include <unistd.h>
10#include <getopt.h> 10#include <getopt.h>
11#include "extensions.h" 11#include "sway/extensions.h"
12#include "layout.h" 12#include "sway/layout.h"
13#include "stringop.h" 13#include "sway/config.h"
14#include "config.h" 14#include "sway/handlers.h"
15#include "log.h" 15#include "sway/input.h"
16#include "readline.h" 16#include "sway/ipc-server.h"
17#include "handlers.h"
18#include "ipc-client.h" 17#include "ipc-client.h"
19#include "ipc-server.h" 18#include "readline.h"
20#include "input.h" 19#include "stringop.h"
21#include "sway.h" 20#include "sway.h"
21#include "log.h"
22 22
23static bool terminate_request = false; 23static bool terminate_request = false;
24static int exit_value = 0; 24static int exit_value = 0;
diff --git a/sway/output.c b/sway/output.c
index 97b8a4a6..b337b143 100644
--- a/sway/output.c
+++ b/sway/output.c
@@ -1,7 +1,7 @@
1#include <strings.h> 1#include <strings.h>
2#include <ctype.h> 2#include <ctype.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#include "output.h" 4#include "sway/output.h"
5#include "log.h" 5#include "log.h"
6#include "list.h" 6#include "list.h"
7 7
diff --git a/sway/resize.c b/sway/resize.c
index 18bb86bb..b32d2431 100644
--- a/sway/resize.c
+++ b/sway/resize.c
@@ -1,11 +1,11 @@
1#include <wlc/wlc.h> 1#include <wlc/wlc.h>
2#include <math.h> 2#include <math.h>
3#include "layout.h" 3#include "sway/layout.h"
4#include "focus.h" 4#include "sway/focus.h"
5#include "sway/input_state.h"
6#include "sway/handlers.h"
7#include "sway/resize.h"
5#include "log.h" 8#include "log.h"
6#include "input_state.h"
7#include "handlers.h"
8#include "resize.h"
9 9
10static bool set_size_floating(int new_dimension, bool use_width) { 10static bool set_size_floating(int new_dimension, bool use_width) {
11 swayc_t *view = get_focused_float(swayc_active_workspace()); 11 swayc_t *view = get_focused_float(swayc_active_workspace());
diff --git a/sway/workspace.c b/sway/workspace.c
index 9c3e69a9..7b24d7d9 100644
--- a/sway/workspace.c
+++ b/sway/workspace.c
@@ -6,18 +6,18 @@
6#include <string.h> 6#include <string.h>
7#include <strings.h> 7#include <strings.h>
8#include <sys/types.h> 8#include <sys/types.h>
9#include "ipc-server.h" 9#include "sway/ipc-server.h"
10#include "extensions.h" 10#include "sway/extensions.h"
11#include "workspace.h" 11#include "sway/workspace.h"
12#include "layout.h" 12#include "sway/layout.h"
13#include "list.h" 13#include "sway/container.h"
14#include "log.h" 14#include "sway/handlers.h"
15#include "container.h" 15#include "sway/config.h"
16#include "handlers.h" 16#include "sway/focus.h"
17#include "config.h"
18#include "stringop.h" 17#include "stringop.h"
19#include "focus.h"
20#include "util.h" 18#include "util.h"
19#include "list.h"
20#include "log.h"
21#include "ipc.h" 21#include "ipc.h"
22 22
23char *prev_workspace_name = NULL; 23char *prev_workspace_name = NULL;
diff --git a/swaybar/bar.c b/swaybar/bar.c
index e3e53622..c6596864 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -5,15 +5,14 @@
5#include <errno.h> 5#include <errno.h>
6#include <sys/wait.h> 6#include <sys/wait.h>
7#include <poll.h> 7#include <poll.h>
8 8#include "swaybar/ipc.h"
9#include "swaybar/render.h"
10#include "swaybar/config.h"
11#include "swaybar/status_line.h"
12#include "swaybar/bar.h"
9#include "ipc-client.h" 13#include "ipc-client.h"
10#include "list.h" 14#include "list.h"
11#include "log.h" 15#include "log.h"
12#include "bar/ipc.h"
13#include "bar/render.h"
14#include "bar/config.h"
15#include "bar/status_line.h"
16#include "bar/bar.h"
17 16
18static void bar_init(struct bar *bar) { 17static void bar_init(struct bar *bar) {
19 bar->config = init_config(); 18 bar->config = init_config();
diff --git a/swaybar/config.c b/swaybar/config.c
index b5dca668..c5437ee7 100644
--- a/swaybar/config.c
+++ b/swaybar/config.c
@@ -3,7 +3,7 @@
3 3
4#include "wayland-desktop-shell-client-protocol.h" 4#include "wayland-desktop-shell-client-protocol.h"
5#include "log.h" 5#include "log.h"
6#include "bar/config.h" 6#include "swaybar/config.h"
7 7
8uint32_t parse_position(const char *position) { 8uint32_t parse_position(const char *position) {
9 if (strcmp("top", position) == 0) { 9 if (strcmp("top", position) == 0) {
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index ad4f9ef8..8d62d223 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -1,11 +1,10 @@
1#include <string.h> 1#include <string.h>
2#include <json-c/json.h> 2#include <json-c/json.h>
3 3#include "swaybar/config.h"
4#include "swaybar/ipc.h"
4#include "ipc-client.h" 5#include "ipc-client.h"
5#include "list.h" 6#include "list.h"
6#include "log.h" 7#include "log.h"
7#include "bar/config.h"
8#include "bar/ipc.h"
9 8
10void ipc_send_workspace_command(const char *workspace_name) { 9void ipc_send_workspace_command(const char *workspace_name) {
11 uint32_t size = strlen("workspace ") + strlen(workspace_name) + 1; 10 uint32_t size = strlen("workspace ") + strlen(workspace_name) + 1;
diff --git a/swaybar/main.c b/swaybar/main.c
index d7534f5d..c9a554a3 100644
--- a/swaybar/main.c
+++ b/swaybar/main.c
@@ -3,9 +3,9 @@
3#include <string.h> 3#include <string.h>
4#include <stdbool.h> 4#include <stdbool.h>
5#include <getopt.h> 5#include <getopt.h>
6#include "swaybar/bar.h"
6#include "ipc-client.h" 7#include "ipc-client.h"
7#include "log.h" 8#include "log.h"
8#include "bar/bar.h"
9 9
10/* global bar state */ 10/* global bar state */
11struct bar swaybar; 11struct bar swaybar;
diff --git a/swaybar/render.c b/swaybar/render.c
index cea36f52..83b4cec7 100644
--- a/swaybar/render.c
+++ b/swaybar/render.c
@@ -5,9 +5,9 @@
5#include "client/cairo.h" 5#include "client/cairo.h"
6#include "client/pango.h" 6#include "client/pango.h"
7#include "client/window.h" 7#include "client/window.h"
8#include "bar/config.h" 8#include "swaybar/config.h"
9#include "bar/status_line.h" 9#include "swaybar/status_line.h"
10#include "bar/render.h" 10#include "swaybar/render.h"
11 11
12 12
13/* internal spacing */ 13/* internal spacing */
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index 33a8908f..c7055d4c 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -3,9 +3,9 @@
3#include <unistd.h> 3#include <unistd.h>
4#include <json-c/json.h> 4#include <json-c/json.h>
5 5
6#include "swaybar/config.h"
7#include "swaybar/status_line.h"
6#include "log.h" 8#include "log.h"
7#include "bar/config.h"
8#include "bar/status_line.h"
9#include "util.h" 9#include "util.h"
10 10
11#define I3JSON_MAXDEPTH 4 11#define I3JSON_MAXDEPTH 4
diff --git a/swaylock/main.c b/swaylock/main.c
index 3049934e..0637453c 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -12,13 +12,12 @@
12#include <signal.h> 12#include <signal.h>
13#include <stdbool.h> 13#include <stdbool.h>
14#include <unistd.h> 14#include <unistd.h>
15
16#include "client/window.h" 15#include "client/window.h"
17#include "client/registry.h" 16#include "client/registry.h"
18#include "client/cairo.h" 17#include "client/cairo.h"
18#include "swaylock/swaylock.h"
19#include "ipc-client.h" 19#include "ipc-client.h"
20#include "log.h" 20#include "log.h"
21#include "lock/lock.h"
22 21
23struct registry *registry; 22struct registry *registry;
24struct render_data render_data; 23struct render_data render_data;