aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/commands.h4
-rw-r--r--include/sway/config.h46
-rw-r--r--include/sway/ipc-json.h1
-rw-r--r--include/sway/ipc-server.h4
-rw-r--r--include/sway/layers.h2
-rw-r--r--include/sway/output.h1
6 files changed, 21 insertions, 37 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 9ff18823..1291d5fb 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -74,6 +74,9 @@ void free_cmd_results(struct cmd_results *results);
*/
const char *cmd_results_to_json(struct cmd_results *results);
+struct cmd_results *add_color(const char *name,
+ char *buffer, const char *color);
+
typedef struct cmd_results *sway_cmd(int argc, char **argv);
sway_cmd cmd_assign;
@@ -138,6 +141,7 @@ sway_cmd cmd_splith;
sway_cmd cmd_splitt;
sway_cmd cmd_splitv;
sway_cmd cmd_sticky;
+sway_cmd cmd_swaybg_command;
sway_cmd cmd_unmark;
sway_cmd cmd_workspace;
sway_cmd cmd_ws_auto_back_and_forth;
diff --git a/include/sway/config.h b/include/sway/config.h
index 7fdd0be0..ac1105b4 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -1,17 +1,18 @@
#ifndef _SWAY_CONFIG_H
#define _SWAY_CONFIG_H
-
#define PID_WORKSPACE_TIMEOUT 60
-
#include <libinput.h>
#include <stdint.h>
#include <string.h>
+#include <time.h>
#include <wlr/types/wlr_box.h>
#include <xkbcommon/xkbcommon.h>
-#include <time.h>
#include "list.h"
#include "tree/layout.h"
#include "tree/container.h"
+#include "wlr-layer-shell-unstable-v1-protocol.h"
+
+// TODO: Refactor this shit
/**
* Describes a variable created via the `set` command.
@@ -152,24 +153,13 @@ struct bar_config {
char *id;
uint32_t modifier;
list_t *outputs;
- //enum desktop_shell_panel_position position; // TODO
+ char *position;
list_t *bindings;
char *status_command;
bool pango_markup;
char *swaybar_command;
char *font;
int height; // -1 not defined
-
-#ifdef ENABLE_TRAY
- // Tray
- char *tray_output;
- char *icon_theme;
- uint32_t tray_padding;
- uint32_t activate_button;
- uint32_t context_button;
- uint32_t secondary_button;
-#endif
-
bool workspace_buttons;
bool wrap_scroll;
char *separator_symbol;
@@ -292,6 +282,7 @@ struct sway_config {
list_t *active_bar_modifiers;
struct sway_mode *current_mode;
struct bar_config *current_bar;
+ char *swaybg_command;
uint32_t floating_mod;
uint32_t dragging_key;
uint32_t resizing_key;
@@ -420,11 +411,6 @@ void apply_output_config(struct output_config *oc,
struct sway_container *output);
void free_output_config(struct output_config *oc);
-/**
- * Updates the list of active bar modifiers
- */
-void update_active_bar_modifiers(void);
-
int workspace_output_cmp_workspace(const void *a, const void *b);
int sway_binding_cmp(const void *a, const void *b);
@@ -433,27 +419,17 @@ int sway_binding_cmp_keys(const void *a, const void *b);
void free_sway_binding(struct sway_binding *sb);
struct sway_binding *sway_binding_dup(struct sway_binding *sb);
-int sway_mouse_binding_cmp(const void *a, const void *b);
-int sway_mouse_binding_cmp_qsort(const void *a, const void *b);
-int sway_mouse_binding_cmp_buttons(const void *a, const void *b);
-void free_sway_mouse_binding(struct sway_mouse_binding *smb);
-
+/* Bar stuff */
void load_swaybars();
+void invoke_swaybar(struct bar_config *bar);
void terminate_swaybg(pid_t pid);
-
-/**
- * Allocate and initialize default bar configuration.
- */
struct bar_config *default_bar_config(void);
+void free_bar_config(struct bar_config *bar);
-/**
- * Global config singleton.
- */
+/* Global config singleton. */
extern struct sway_config *config;
-/**
- * Config file currently being read.
- */
+/* Config file currently being read */
extern const char *current_config_path;
#endif
diff --git a/include/sway/ipc-json.h b/include/sway/ipc-json.h
index 3d2fdc4f..7d87d377 100644
--- a/include/sway/ipc-json.h
+++ b/include/sway/ipc-json.h
@@ -9,5 +9,6 @@ json_object *ipc_json_get_version();
json_object *ipc_json_describe_container(struct sway_container *c);
json_object *ipc_json_describe_container_recursive(struct sway_container *c);
json_object *ipc_json_describe_input(struct sway_input_device *device);
+json_object *ipc_json_describe_bar_config(struct bar_config *bar);
#endif
diff --git a/include/sway/ipc-server.h b/include/sway/ipc-server.h
index d73006dc..c3389fe8 100644
--- a/include/sway/ipc-server.h
+++ b/include/sway/ipc-server.h
@@ -12,6 +12,10 @@ void ipc_terminate(void);
struct sockaddr_un *ipc_user_sockaddr(void);
+void ipc_event_workspace(struct sway_container *old,
+ struct sway_container *new, const char *change);
void ipc_event_window(struct sway_container *window, const char *change);
+void ipc_event_barconfig_update(struct bar_config *bar);
+void ipc_event_mode(const char *mode);
#endif
diff --git a/include/sway/layers.h b/include/sway/layers.h
index 22054be1..ee47c5ad 100644
--- a/include/sway/layers.h
+++ b/include/sway/layers.h
@@ -14,8 +14,6 @@ struct sway_layer_surface {
struct wl_listener unmap;
struct wl_listener surface_commit;
struct wl_listener output_destroy;
- struct wl_listener output_mode;
- struct wl_listener output_transform;
bool configured;
struct wlr_box geo;
diff --git a/include/sway/output.h b/include/sway/output.h
index f899230f..6fb79987 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -21,6 +21,7 @@ struct sway_output {
struct wl_listener frame;
struct wl_listener destroy;
struct wl_listener mode;
+ struct wl_listener transform;
pid_t bg_pid;
};