diff --git a/README.md b/README.md index 3c114e1..3e5e9e0 100644 --- a/README.md +++ b/README.md @@ -12,19 +12,21 @@ Supports custom button layouts and css theming! -Configure with `gnome-shell-extension-prefs` (GNOME 3.4) or by editing `extension.js` (GNOME 3.2). +Configure with `gnome-shell-extension-prefs` (GNOME 3.4+) or by editing `extension.js` (GNOME 3.2). -Author: biox (Josiah Messiah) -Maintainers: mathematical.coffee - arkan duthrey +**Author**: biox (Josiah Messiah) +**Maintainers**: mathematical.coffee +**Contributors**: [Many (thankyou!)](https://github.com/mathematicalcoffee/Gnome-Shell-Window-Buttons-Extension/contributors) -Note - the [mathematicalcoffee fork](https://github.com/mathematicalcoffee/Gnome-Shell-Window-Buttons-Extension) of this extension is where development happens, and it all then gets pushed to the original [biox repository](https://github.com/biox/Gnome-Shell-Window-Buttons-Extension). +Note - the [mathematicalcoffee fork](https://github.com/mathematicalcoffee/Gnome-Shell-Window-Buttons-Extension) of this extension is where development happens, and it all then gets pushed to the original [biox repository](https://github.com/biox/Gnome-Shell-Window-Buttons-Extension) when stable. Installation ------------ -(NEW: hopefully, you can install from extensions.gnome.org). +**NEW**: Install it from [extensions.gnome.org](https://extensions.gnome.org/extension/426/window-buttons/). -### GNOME 3.4 +If you wish to install manually (i.e. from the repository): + +### GNOME 3.4, 3.6, 3.8 Either download the .zip file from the [Downloads page](https://github.com/biox/Gnome-Shell-Window-Buttons-Extension/downloads) or checkout the code to the `gnome3.4` branch. If you have the .zip file, go to Gnome tweak tools --> Shell Extensions --> Install from zip file --> choose the zip file. @@ -32,8 +34,9 @@ If you have the .zip file, go to Gnome tweak tools --> Shell Extensions --> Inst If you have the source code, copy the folder to the appropriate place: $ cp window_buttons@biox.github.com ~/.local/share/gnome-shell/extensions/ + $ gnome-shell-extension-tool -e window_buttons@biox.github.com -Configure using `gnome-shell-extension-prefs`. No shell restarts required. +Configure using `gnome-shell-extension-prefs`. ### GNOME 3.2 As above (but if you are checking out the code, use the `gnome3.2` branch). @@ -155,7 +158,17 @@ See `themes/default/style.css` for more information. Changelog --------- -v5/v5 on e.g.o: +v10 on e.g.o: +* GNOME 3.8 support added +* maximized windows that are minimized shouldn't count towards WINDOWS_MAXIMIZED (#9; deadalnix) +* fixed phantom space when no buttons are showing (#10; deadalnix) + +v7/8/9 on e.g.o: + +* quick fixes to get disable/re-enable working +* typos + +v5/v6 on e.g.o: * Buttons hide in the Overview (cfclavijo; #6) * New theme Ambiance-Blue (cfclavijo; #6) diff --git a/README_DEVELOPERS b/README_DEVELOPERS new file mode 100644 index 0000000..59f5dfb --- /dev/null +++ b/README_DEVELOPERS @@ -0,0 +1,15 @@ +There are four branches: +* master [dev for gnome3.4+] +* gnome3.4 [stable for gnome3.4+ (--3.8 currently)] +* gnome3.2 [stable for gnome3.2] +* gnome3.2-dev [dev for gnome3.2] + +The gnome3.2 and gnome3.4 branches are where the *stable* code for these respective versions of the extension live. They are quite different (for example GNOME 3.4 version can use gnome-shell-extension-prefs, whereas GNOME 3.2 you're stuck with editing the extensin.js file). + +The master branch is for DEVELOPMENT of GNOME 3.4+ code. Push to branch gnome3.4+ when stable. + +The gnome3.2-dev branch is for DEVELOPMENT of GNOME 3.2 code. Push to branch gnome3.2 when stable. + +I can't quite remember how pushing between gnome3.2-dev and master works (i.e. applying universal changes to both branches)... I'm sure doing it in one direction will work better than the other but this currently escapes me. + +Note - the way I (m.c) am playing it at the moment is as follows: mathematicalcoffee fork of this extension is where development happens, and it all then gets pushed to the biox repository. diff --git a/window_buttons@biox.github.com/extension.js b/window_buttons@biox.github.com/extension.js index 3e5314c..b178c45 100644 --- a/window_buttons@biox.github.com/extension.js +++ b/window_buttons@biox.github.com/extension.js @@ -427,7 +427,8 @@ WindowButtons.prototype = { // show iff *any* window is (fully) maximized case ShowButtonsWhen.ANY_WINDOW_MAXIMIZED: for (let i = 0; i < windows.length; ++i) { - if (windows[i].get_maximized() === Meta.MaximizeFlags.BOTH) { + if (windows[i].get_maximized() === Meta.MaximizeFlags.BOTH && + !windows[i].minimized) { show = true; break; } @@ -448,17 +449,22 @@ WindowButtons.prototype = { } } - // if the actors already match `show` don't do anything. - if (show === this.leftActor.visible && - show === this.rightActor.visible) { - return false; + var showLeft = show && (this.leftBox.get_children().length > 0); + if (showLeft !== this.leftActor.visible) { + if (showLeft) { + this.leftActor.show(); + } else { + this.leftActor.hide(); + } } - if (show) { - this.leftActor.show(); - this.rightActor.show(); - } else { - this.leftActor.hide(); - this.rightActor.hide(); + + var showRight = show && (this.rightBox.get_children().length > 0); + if (showRight !== this.rightActor.visible) { + if (showRight) { + this.rightActor.show(); + } else { + this.rightActor.hide(); + } } return false; },