slight restructuration

This commit is contained in:
baskerville 2012-08-04 21:24:47 +02:00
parent f22a3635b0
commit 8f920ecabb
5 changed files with 24 additions and 20 deletions

View file

@ -48,10 +48,6 @@
+-------------------------+ +-------------------------+
- Each container node is a split rectangle.
- The splitting method of a container node is either *automatic* or *manual*.
- In the *automatic* splitting mode, the split type is vertical if the width of
the rectangle of the node is greater that its height and horizontal
otherwise.
- Several tree transformations will be provided: directional leaf swap, node
pulling, rotation, contraction, dilatation...

View file

@ -1,4 +1,8 @@
-- normal_border_color = "#654321"
--
-- bspwm configuration file
--
normal_border_color = "#654321"
active_border_color = "#456"
locked_border_color = "#123"
urgent_border_color = "#156"
@ -6,7 +10,8 @@ inner_border_color = "#222222"
outer_border_width = 1
inner_border_width = 2
smart_surroundings = true
split_ratio = 0.333
window_gap = 2
padding = { top = 24 }
-- vim: set ft=lua:

View file

@ -26,19 +26,11 @@ void load_settings(void)
void apply_settings(lua_State *L)
{
normal_border_color = string_expr(L, "normal_border_color", NORMAL_BORDER_COLOR);
split_ratio = double_expr(L, "split_ratio", SPLIT_RATIO);
smart_surroundings = bool_expr(L, "smart_surroundings", SMART_SURROUNDINGS);
outer_border_width = int_expr(L, "outer_border_width", OUTER_BORDER_WIDTH);
inner_border_width = int_expr(L, "inner_border_width", INNER_BORDER_WIDTH);
inner_border_color = string_expr(L, "inner_border_color", INNER_BORDER_COLOR);
border_width = inner_border_width + outer_border_width;
/* printf("split ratio: %f\n", split_ratio); */
/* printf("outer_border_width: %i\n", outer_border_width); */
/* printf("inner_border_color: %s\n", inner_border_color); */
/* printf("normal_border_color: %s\n", normal_border_color); */
/* printf("default normal_border_color: %s\n", NORMAL_BORDER_COLOR); */
/* printf("outer_border_color: %s\n", outer_border_color); */
/* printf("smart_surroundings: %i\n", smart_surroundings); */
}
void get_setting(lua_State *L, char* rsp)

View file

@ -16,16 +16,21 @@
#define NORMAL_BORDER_COLOR "#333333"
#define ACTIVE_BORDER_COLOR "#DDDDDD"
#define INNER_BORDER_COLOR "#111111"
#define LOCKED_BORDER_COLOR "#333333"
#define URGENT_BORDER_COLOR "#333333"
char *normal_border_color;
char *active_border_color;
char *locked_border_color;
char *urgent_border_color;
char *inner_border_color;
int outer_border_width;
int inner_border_width;
int border_width;
int window_gap;
bool smart_surroundings;
double split_ratio;
void load_settings(void);
void apply_settings(lua_State *);

16
types.h
View file

@ -21,6 +21,11 @@ typedef enum {
MODE_ROTATE_CCWISE
} split_mode_t;
typedef enum {
FIRST_CHILD,
SECOND_CHILD
} pair_polarity_t;
typedef enum {
DIR_LEFT,
DIR_UP,
@ -44,8 +49,8 @@ typedef struct {
typedef struct {
split_type_t split_type;
double split_ratio;
split_mode_t split_mode;
xcb_rectangle_t rectangle;
pair_polarity_t pair_polarity;
struct Node *first_child;
struct Node *second_child;
struct Node *parent;
@ -67,11 +72,12 @@ typedef Layer FloatingLayer;
typedef struct {
char *name;
layout_t layout;
layer_t focus;
TilingLayer tiling_layer;
FloatingLayer floating_layer;
Layer tiling_layer;
Layer floating_layer;
layer_t selected_layer;
layout_t tiling_layout;
insertion_strategy_t insertion_strategy;
split_mode_t split_mode;
struct Desktop *previous;
struct Desktop *next;
} Desktop;