unite extension tweak

This commit is contained in:
davedatum
2020-02-13 15:19:05 +00:00
parent 564a1ab727
commit f073ad433d
211 changed files with 4790 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
const GObject = imports.gi.GObject
const Main = imports.ui.main
const Unite = imports.misc.extensionUtils.getCurrentExtension()
const PanelManager = Unite.imports.panel.PanelManager
const LayoutManager = Unite.imports.layout.LayoutManager
const WindowManager = Unite.imports.window.WindowManager
var UniteExtension = GObject.registerClass(
class UniteExtension extends GObject.Object {
_init() {
this.panelManager = new PanelManager()
this.layoutManager = new LayoutManager()
this.windowManager = new WindowManager()
}
get focusWindow() {
return this.windowManager.focusWindow
}
activate() {
this.panelManager.activate()
this.layoutManager.activate()
this.windowManager.activate()
Main.panel._addStyleClassName('unite-shell')
}
destroy() {
this.panelManager.destroy()
this.layoutManager.destroy()
this.windowManager.destroy()
Main.panel._removeStyleClassName('unite-shell')
}
}
)
function enable() {
global.unite = new UniteExtension()
global.unite.activate()
}
function disable() {
global.unite.destroy()
global.unite = null
}