Merge pull request #3087 from RedSoxFan/side-gaps

Implement per side and per direction outer gaps
This commit is contained in:
Ryan Dwyer 2018-11-08 22:41:14 +10:00 committed by GitHub
commit aad2f444f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 278 additions and 106 deletions

View file

@ -167,6 +167,16 @@ struct output_config {
enum config_dpms dpms_state;
};
/**
* Stores size of gaps for each side
*/
struct side_gaps {
int top;
int right;
int bottom;
int left;
};
/**
* Stores configuration for a workspace, regardless of whether the workspace
* exists.
@ -175,7 +185,7 @@ struct workspace_config {
char *workspace;
char *output;
int gaps_inner;
int gaps_outer;
struct side_gaps gaps_outer;
};
struct bar_config {
@ -398,7 +408,7 @@ struct sway_config {
bool smart_gaps;
int gaps_inner;
int gaps_outer;
struct side_gaps gaps_outer;
list_t *config_chain;
const char *current_config_path;

View file

@ -32,9 +32,9 @@ struct sway_workspace {
enum sway_container_layout layout;
enum sway_container_layout prev_split_layout;
int current_gaps;
struct side_gaps current_gaps;
int gaps_inner;
int gaps_outer;
struct side_gaps gaps_outer;
struct sway_output *output; // NULL if no outputs are connected
list_t *floating; // struct sway_container