]> git.sur5r.net Git - i3/i3/commitdiff
Add configuration option to turn off workspace bar
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 13 Mar 2010 18:15:28 +0000 (19:15 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 13 Mar 2010 18:15:28 +0000 (19:15 +0100)
include/config.h
src/cfgparse.l
src/cfgparse.y

index 627fe525c43291e104b0857c14b3dd2712e60ceb..d80fbb96b0240ead5bbddc4bc8f0520dbd07f7d9 100644 (file)
@@ -98,6 +98,12 @@ struct Config {
          * It is not planned to add any different focus models. */
         bool disable_focus_follows_mouse;
 
+        /** By default, a workspace bar is drawn at the bottom of the screen.
+         * If you want to have a more fancy bar, it is recommended to replace
+         * the whole bar by dzen2, for example using the i3-wsbar script which
+         * comes with i3. Thus, you can turn it off entirely. */
+        bool disable_workspace_bar;
+
         const char *default_border;
 
         /** The modifier which needs to be pressed in combination with your mouse
index 67a41300d28c8f6cc4a8fd90a8814994a4e832f1..755065dd567194398b66d401da6f0d3b5a3f909c 100644 (file)
@@ -93,6 +93,7 @@ ipc_socket                      { BEGIN(BIND_AWS_COND); return TOKIPCSOCKET; }
 new_container                   { return TOKNEWCONTAINER; }
 new_window                      { return TOKNEWWINDOW; }
 focus_follows_mouse             { return TOKFOCUSFOLLOWSMOUSE; }
+workspace_bar                   { return TOKWORKSPACEBAR; }
 default                         { yylval.number = MODE_DEFAULT; return TOKCONTAINERMODE; }
 stacking                        { yylval.number = MODE_STACK; return TOKCONTAINERMODE; }
 tabbed                          { yylval.number = MODE_TABBED; return TOKCONTAINERMODE; }
index 9ed17ea1dd7314d68968ac80e8d3a572dc814c89..b9fae726c9dbfc7802d23f59383a3d03e0200432 100644 (file)
@@ -221,6 +221,7 @@ void parse_file(const char *f) {
 %token TOKNEWCONTAINER "new_container"
 %token TOKNEWWINDOW "new_window"
 %token TOKFOCUSFOLLOWSMOUSE "focus_follows_mouse"
+%token TOKWORKSPACEBAR "workspace_bar"
 %token TOKCONTAINERMODE "default/stacking/tabbed"
 %token TOKSTACKLIMIT "stack-limit"
 
@@ -239,6 +240,7 @@ line:
         | new_container
         | new_window
         | focus_follows_mouse
+        | workspace_bar
         | workspace
         | assign
         | ipcsocket
@@ -429,6 +431,14 @@ focus_follows_mouse:
         }
         ;
 
+workspace_bar:
+        TOKWORKSPACEBAR WHITESPACE bool
+        {
+                DLOG("workspace bar = %d\n", $<number>3);
+                config.disable_workspace_bar = !($<number>3);
+        }
+        ;
+
 workspace:
         TOKWORKSPACE WHITESPACE NUMBER WHITESPACE TOKOUTPUT WHITESPACE OUTPUT optional_workspace_name
         {