DEPRECATED: gnome-shell already has this feature.
GNOME Shell extension and library that adds a margin around new windows.
This module's source uses ES6 classes and modules, to build it into an ES5 UMD
module run npm run build
.
This module can be used as a standalone extension or as a library.
To use as an extension, just clone this repo:
git clone https://github.com/rliang/gnome-shell-center-windows ~/.local/share/gnome-shell/extensions/center-windows@rliang.github.com
To use as a library, include the UMD module or use a module bundler like Webpack.
import WindowCentering from 'gnome-shell-center-windows';
class CustomCentering extends WindowCentering {
constructor() {
super(0.1);
}
center(win) {
if (win.get_wm_class() === 'gnome-terminal')
return;
super.center(win);
}
}
const centering = new CustomCentering();
export function enable() {
centering.enable();
}
export function disable() {
centering.disable();
}
For now, the JSDoc annotations in the source.