Aylur / ags

A customizable and extensible shell
GNU General Public License v3.0
2.11k stars 109 forks source link

Update "First Widgets" section of the wiki #353

Closed Davido264 closed 6 months ago

Davido264 commented 6 months ago

I recently started to learn ags, I read the wiki and viewed some configs.

I found that the "First Widgets" section of the wiki says that the content of config.js contains:

App.config({
    windows: [
         ...
    ]
})

But in some configs I saw, the content of config.js contains:

export default {
     windows: [
         ...
    ]
}

Both of them work.

In adition, when using an lsp for type checking, App.config gives an error due to config not specified as a property on the type App.

I think it would be a good idea to update the wiki and state that the configuration can be set with export default {} as an alternative to App.config({})

Aylur commented 6 months ago

In adition, when using an lsp for type checking, App.config gives an error due to config not specified as a property on the type App

this is either because your ags version is out of date, or you are using nix, and your types are out of date

its not an alternative, export default {} has been deprecated in favor of App.config in 1.8.0, which ags should warn you about