0.0.5 • Published 9 years ago
gnome-shell-center-windows v0.0.5
gnome-shell-center-windows
DEPRECATED: gnome-shell already has this feature.
GNOME Shell extension and library that adds a margin around new windows.
Building
This module's source uses ES6 classes and modules, to build it into an ES5 UMD
module run npm run build.
Usage
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.comTo 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();
}Documentation
For now, the JSDoc annotations in the source.