Merge gaps support as-is
This code was copied over unmodified from https://github.com/Airblader/i3-gaps. I have split out the differences between i3-gaps and i3 into three areas: 1. Gaps 2. i3bar height 3. rgba colors
This commit is contained in:
committed by
Michael Stapelberg
parent
0b89d4b2a7
commit
b825dc124a
@ -47,6 +47,7 @@ typedef struct Con Con;
|
||||
typedef struct Match Match;
|
||||
typedef struct Assignment Assignment;
|
||||
typedef struct Window i3Window;
|
||||
typedef struct gaps_t gaps_t;
|
||||
typedef struct mark_t mark_t;
|
||||
|
||||
/******************************************************************************
|
||||
@ -80,11 +81,20 @@ typedef enum { ADJ_NONE = 0,
|
||||
ADJ_UPPER_SCREEN_EDGE = (1 << 2),
|
||||
ADJ_LOWER_SCREEN_EDGE = (1 << 4) } adjacent_t;
|
||||
|
||||
typedef enum { SMART_BORDERS_OFF,
|
||||
SMART_BORDERS_ON,
|
||||
SMART_BORDERS_NO_GAPS } smart_borders_t;
|
||||
|
||||
typedef enum { SMART_GAPS_OFF,
|
||||
SMART_GAPS_ON,
|
||||
SMART_GAPS_INVERSE_OUTER } smart_gaps_t;
|
||||
|
||||
typedef enum { HEBM_NONE = ADJ_NONE,
|
||||
HEBM_VERTICAL = ADJ_LEFT_SCREEN_EDGE | ADJ_RIGHT_SCREEN_EDGE,
|
||||
HEBM_HORIZONTAL = ADJ_UPPER_SCREEN_EDGE | ADJ_LOWER_SCREEN_EDGE,
|
||||
HEBM_BOTH = HEBM_VERTICAL | HEBM_HORIZONTAL,
|
||||
HEBM_SMART = (1 << 5) } hide_edge_borders_mode_t;
|
||||
HEBM_SMART = (1 << 5),
|
||||
HEBM_SMART_NO_GAPS = (1 << 6) } hide_edge_borders_mode_t;
|
||||
|
||||
typedef enum { MM_REPLACE,
|
||||
MM_ADD } mark_mode_t;
|
||||
@ -137,6 +147,14 @@ typedef enum {
|
||||
POINTER_WARPING_NONE = 1
|
||||
} warping_t;
|
||||
|
||||
struct gaps_t {
|
||||
int inner;
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
int left;
|
||||
};
|
||||
|
||||
/**
|
||||
* Focus wrapping modes.
|
||||
*/
|
||||
@ -204,12 +222,13 @@ struct deco_render_params {
|
||||
};
|
||||
|
||||
/**
|
||||
* Stores which workspace (by name or number) goes to which output.
|
||||
* Stores which workspace (by name or number) goes to which output and its gaps config.
|
||||
*
|
||||
*/
|
||||
struct Workspace_Assignment {
|
||||
char *name;
|
||||
char *output;
|
||||
gaps_t gaps;
|
||||
|
||||
TAILQ_ENTRY(Workspace_Assignment) ws_assignments;
|
||||
};
|
||||
@ -645,6 +664,9 @@ struct Con {
|
||||
* workspace is not a named workspace (for named workspaces, num == -1) */
|
||||
int num;
|
||||
|
||||
/** Only applicable for containers of type CT_WORKSPACE. */
|
||||
gaps_t gaps;
|
||||
|
||||
struct Con *parent;
|
||||
|
||||
/* The position and size for this con. These coordinates are absolute. Note
|
||||
|
Reference in New Issue
Block a user