]> code.delx.au - spectrwm/commitdiff
Add 'maximize_hide_bar' to also hide the bar when maximing a window.
authorYuri D'Elia <yuri.delia@eurac.edu>
Sat, 6 Sep 2014 13:43:55 +0000 (15:43 +0200)
committerMarco Peereboom <marco@peereboom.us>
Tue, 17 Feb 2015 18:48:59 +0000 (12:48 -0600)
spectrwm.1
spectrwm.c
spectrwm.conf

index 837b5dbf1f76fa646d2b17a8bfdc3235eae187ab..048b5895bb292c6421bcf24ea4c6822ec0d2d934 100644 (file)
@@ -315,6 +315,11 @@ and changes to layout.
 .It Ar manual
 Set window focus on window interaction only.
 .El
+.It Ic maximize_hide_bar
+When set to 1,
+.Ic maximize_toggle
+will also hide/restore the bar visibility of the affected workspace.
+Defaults to 0.
 .It Ic java_workaround
 Workaround a Java GUI rendering issue on non-reparenting window managers by
 impersonating the LG3D window manager, written by Sun.
index 680f5c1b6242be19590aeaed7782e6208cf09bd5..c5f7d1cf9239e4f61d7141a73810ee64602ba9e7 100644 (file)
@@ -404,6 +404,7 @@ char                 *bar_format = NULL;
 bool            stack_enabled = true;
 bool            clock_enabled = true;
 bool            iconic_enabled = false;
+bool            maximize_hide_bar = false;
 bool            urgent_enabled = false;
 bool            urgent_collapse = false;
 char           *clock_format = NULL;
@@ -4654,7 +4655,7 @@ update_floater(struct ws_win *win)
 
                win->g = r->g;
 
-               if (bar_enabled && ws->bar_enabled) {
+               if (bar_enabled && ws->bar_enabled && !maximize_hide_bar) {
                        if (!bar_at_bottom)
                                Y(win) += bar_height;
                        HEIGHT(win) -= bar_height;
@@ -8036,6 +8037,7 @@ enum {
        SWM_S_FOCUS_MODE,
        SWM_S_ICONIC_ENABLED,
        SWM_S_JAVA_WORKAROUND,
+       SWM_S_MAXIMIZE_HIDE_BAR,
        SWM_S_REGION_PADDING,
        SWM_S_SPAWN_ORDER,
        SWM_S_SPAWN_TERM,
@@ -8209,6 +8211,9 @@ setconfvalue(const char *selector, const char *value, int flags)
        case SWM_S_JAVA_WORKAROUND:
                java_workaround = (atoi(value) != 0);
                break;
+       case SWM_S_MAXIMIZE_HIDE_BAR:
+               maximize_hide_bar = atoi(value);
+               break;
        case SWM_S_REGION_PADDING:
                region_padding = atoi(value);
                if (region_padding < 0)
@@ -8624,6 +8629,7 @@ struct config_option configopt[] = {
        { "focus_mode",                 setconfvalue,   SWM_S_FOCUS_MODE },
        { "iconic_enabled",             setconfvalue,   SWM_S_ICONIC_ENABLED },
        { "java_workaround",            setconfvalue,   SWM_S_JAVA_WORKAROUND },
+       { "maximize_hide_bar",          setconfvalue,   SWM_S_MAXIMIZE_HIDE_BAR },
        { "keyboard_mapping",           setkeymapping,  0 },
        { "layout",                     setlayout,      0 },
        { "modkey",                     setconfmodkey,  0 },
index a15898f0eacce2898704b9e20337e5e64e0402cf..36c8fc8c694fddf9290986f0988fdbf6b66abf9a 100644 (file)
@@ -43,6 +43,7 @@
 # clock_enabled                = 1
 # clock_format         = %a %b %d %R %Z %Y
 # iconic_enabled       = 0
+# maximize_hide_bar    = 0
 # window_class_enabled = 0
 # window_instance_enabled      = 0
 # window_name_enabled  = 0