Introduce the GET_CONFIG IPC request
This introduces memory usage by one copy of the config file, which is an acceptable trade-off for being able to easily revert data loss. The default config is 6KB, user configs will be in the same ballpark. fixes #2856
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
typedef struct Config Config;
|
||||
typedef struct Barconfig Barconfig;
|
||||
extern char *current_configpath;
|
||||
extern char *current_config;
|
||||
extern Config config;
|
||||
extern SLIST_HEAD(modes_head, Mode) modes;
|
||||
extern TAILQ_HEAD(barconfig_head, Barconfig) barconfigs;
|
||||
|
@ -54,6 +54,9 @@ typedef struct i3_ipc_header {
|
||||
/** Request a list of configured binding modes. */
|
||||
#define I3_IPC_MESSAGE_TYPE_GET_BINDING_MODES 8
|
||||
|
||||
/** Request the raw last loaded i3 config. */
|
||||
#define I3_IPC_MESSAGE_TYPE_GET_CONFIG 9
|
||||
|
||||
/*
|
||||
* Messages from i3 to clients
|
||||
*
|
||||
@ -67,6 +70,7 @@ typedef struct i3_ipc_header {
|
||||
#define I3_IPC_REPLY_TYPE_BAR_CONFIG 6
|
||||
#define I3_IPC_REPLY_TYPE_VERSION 7
|
||||
#define I3_IPC_REPLY_TYPE_BINDING_MODES 8
|
||||
#define I3_IPC_REPLY_TYPE_CONFIG 9
|
||||
|
||||
/*
|
||||
* Events from i3 to clients. Events have the first bit set high.
|
||||
|
Reference in New Issue
Block a user