* comes with i3. Thus, you can turn it off entirely. */
bool disable_workspace_bar;
- const char *default_border;
+ /** The default border style for new windows. */
+ border_style_t default_border;
/** The modifier which needs to be pressed in combination with your mouse
* buttons to do things with floating windows (move, resize) */
*****************************************************************************/
typedef enum { D_LEFT, D_RIGHT, D_UP, D_DOWN } direction_t;
typedef enum { NO_ORIENTATION = 0, HORIZ, VERT } orientation_t;
+typedef enum { BS_NORMAL = 0, BS_NONE = 1, BS_1PIXEL = 3 } border_style_t;
enum {
BIND_NONE = 0,
enum { CF_NONE = 0, CF_OUTPUT = 1, CF_GLOBAL = 2 } fullscreen_mode;
enum { L_DEFAULT = 0, L_STACKED = 1, L_TABBED = 2 } layout;
- enum { BS_NORMAL = 0, BS_NONE = 1, BS_1PIXEL = 3 } border_style;
+ border_style_t border_style;
/** floating? (= not in tiling layout) This cannot be simply a bool
* because we want to keep track of whether the status was set by the
* application (by setting _NET_WM_WINDOW_TYPE appropriately) or by the
restart_state { BEGIN(BIND_AWS_COND); return TOKRESTARTSTATE; }
new_container { return TOKNEWCONTAINER; }
new_window { return TOKNEWWINDOW; }
+normal { return TOK_NORMAL; }
+none { return TOK_NONE; }
+1pixel { return TOK_1PIXEL; }
focus_follows_mouse { return TOKFOCUSFOLLOWSMOUSE; }
workspace_bar { return TOKWORKSPACEBAR; }
default { /* yylval.number = MODE_DEFAULT; */return TOKCONTAINERMODE; }
%token TOKMODE "mode"
%token TOKNEWCONTAINER "new_container"
%token TOKNEWWINDOW "new_window"
+%token TOK_NORMAL "normal"
+%token TOK_NONE "none"
+%token TOK_1PIXEL "1pixel"
%token TOKFOCUSFOLLOWSMOUSE "focus_follows_mouse"
%token TOKWORKSPACEBAR "workspace_bar"
%token TOKCONTAINERMODE "default/stacking/tabbed"
;
new_window:
- TOKNEWWINDOW WHITESPACE WORD
+ TOKNEWWINDOW WHITESPACE border_style
{
- DLOG("new windows should start in mode %s\n", $<string>3);
- config.default_border = sstrdup($<string>3);
+ DLOG("new windows should start with border style %d\n", $<number>3);
+ config.default_border = $<number>3;
}
;
+border_style:
+ TOK_NORMAL { $<number>$ = BS_NORMAL; }
+ | TOK_NONE { $<number>$ = BS_NONE; }
+ | TOK_1PIXEL { $<number>$ = BS_1PIXEL; }
+ ;
+
bool:
NUMBER
{
TAILQ_INSERT_TAIL(&all_cons, new, all_cons);
new->type = CT_CON;
new->name = strdup("");
+ new->border_style = config.default_border;
static int cnt = 0;
LOG("opening window %d\n", cnt);
if (con->parent->layout == L_STACKED)
return BS_NORMAL;
+ if (con->parent->layout == L_TABBED && con->border_style != BS_NORMAL)
+ return con_num_children(con->parent) == 1 ? con->border_style : BS_NORMAL;
+
return con->border_style;
}
INIT_COLOR(config.bar.urgent, "#2f343a", "#900000", "#ffffff");
config.restart_state_path = "~/.i3/_restart.json";
+ config.default_border = BS_NORMAL;
parse_configuration(override_configpath);