App
This is the main Gtk.Application instance that is running.
signals
window-toggled:(windowName: string, visible: boolean)config-parsed: emitted on startup
properties
windows:Gtk.Window[]configDir:stringpath to the config directoryiconTheme:stringcursorTheme:stringgtkTheme:string
methods
addWindow:(window: Gtk.Window) => voidremoveWindow:(window: Gtk.Window) => voidgetWindow:(name: string) => Gtk.WindowcloseWindow:(name: string) => voidopenWindow:(name: string) => voidtoggleWindow:(name: string) => voidquit:() => voidresetCss:() => voidapplyCss:(path: string) => voidaddIcons:(path: string) => void
Window toggled signal
// this is only signaled for windows exported in config.js// or added with App.addWindowconst label = Widget.Label() .hook(App, (self, windowName, visible) => { self.label = `${windowName} is ${visible ? 'visible' : 'not visible'}`; }, 'window-toggled')});Applying CSS
If you want to change the style sheet on runtime
specifying a css file
App.applyCss('/path/to/file.css');applying a stylesheet
App.applyCss(`window { background-color: transparent;}`)to reset applied stylesheets
App.resetCss();