]> code.delx.au - spectrwm/commitdiff
Bring border behavior back to normal default. Use knob when a knob...
authorMarco Peereboom <marco@conformal.com>
Thu, 1 Jul 2010 23:44:16 +0000 (23:44 +0000)
committerMarco Peereboom <marco@conformal.com>
Thu, 1 Jul 2010 23:44:16 +0000 (23:44 +0000)
scrotwm.1
scrotwm.c
scrotwm.conf

index 07d9ab3f30a7a7db5c5bb223108355bab82340af..007aa098daab3a58c13fbcda52ea9b887f96aed0 100644 (file)
--- a/scrotwm.1
+++ b/scrotwm.1
@@ -145,6 +145,8 @@ Mod1 is generally the ALT key and Mod4 is the windows key on a PC.
 .It Cm focus_mode
 Using a value of follow_cursor will make the window manager focus the window
 under the mouse when switching workspaces and creating windows.
+.It Cm disable_border
+Remove border when bar is disabled and there is only one window on the screen.
 .It Cm program Ns Bq Ar p
 Define new action to spawn a program
 .Ar p .
index 9f6d7ff8a57e7b4277ce7b8c38db7a413d8fe4d9..a8a4f31f2d6ef25a351cdccd6e0abf78761cd4c7 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -206,6 +206,7 @@ char                        *clock_format = NULL;
 int                    title_name_enabled = 0;
 int                    title_class_enabled = 0;
 int                    focus_mode = SWM_FOCUS_DEFAULT;
+int                    disable_border = 0;
 pid_t                  bar_pid;
 GC                     bar_gc;
 XGCValues              bar_gcv;
@@ -2113,7 +2114,7 @@ stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip)
                        win_g.y += last_h + 2;
 
                bzero(&wc, sizeof wc);
-               if (bar_enabled == 0 && winno == 1){
+               if (disable_border && bar_enabled == 0 && winno == 1){
                        wc.border_width = 0;
                        win_g.w += 2;
                        win_g.h += 2;
@@ -3514,8 +3515,8 @@ enum      { SWM_S_BAR_DELAY, SWM_S_BAR_ENABLED, SWM_S_STACK_ENABLED,
          SWM_S_CLOCK_ENABLED, SWM_S_CLOCK_FORMAT, SWM_S_CYCLE_EMPTY,
          SWM_S_CYCLE_VISIBLE, SWM_S_SS_ENABLED, SWM_S_TERM_WIDTH,
          SWM_S_TITLE_CLASS_ENABLED, SWM_S_TITLE_NAME_ENABLED,
-         SWM_S_FOCUS_MODE, SWM_S_BAR_FONT, SWM_S_BAR_ACTION, SWM_S_SPAWN_TERM,
-         SWM_S_SS_APP, SWM_S_DIALOG_RATIO
+         SWM_S_FOCUS_MODE, SWM_S_DISABLE_BORDER, SWM_S_BAR_FONT,
+         SWM_S_BAR_ACTION, SWM_S_SPAWN_TERM, SWM_S_SS_APP, SWM_S_DIALOG_RATIO
        };
 
 int
@@ -3569,6 +3570,9 @@ setconfvalue(char *selector, char *value, int flags)
                else
                        err(1, "focus_mode");
                break;
+       case SWM_S_DISABLE_BORDER:
+               disable_border = atoi(value);
+               break;
        case SWM_S_BAR_FONT:
                free(bar_fonts[0]);
                if ((bar_fonts[0] = strdup(value)) == NULL)
@@ -3661,6 +3665,7 @@ struct config_option configopt[] = {
        { "title_class_enabled",        setconfvalue,   SWM_S_TITLE_CLASS_ENABLED },
        { "title_name_enabled",         setconfvalue,   SWM_S_TITLE_NAME_ENABLED },
        { "focus_mode",                 setconfvalue,   SWM_S_FOCUS_MODE },
+       { "disable_border",             setconfvalue,   SWM_S_DISABLE_BORDER },
 };
 
 
index 3eb5baf850333b8d20ae8a92ac1464fb2d09e571..1b79c7a7fa6e383f674a6d4f54523f376d832d89 100644 (file)
@@ -18,6 +18,7 @@ clock_enabled         = 1
 title_name_enabled     = 0
 title_class_enabled    = 0
 #focus_mode            = default
+#disable_border                = 1
 
 # spawn app
 # program[term]                = xterm