Closed chaojian-zhang closed 3 years ago
Similarly, it would be ideal if attributes like autostart can be turned on and off during run-time
You can programmatically auto-start applications via ex your src/client/index.js
file, as well as a configuration option:
https://github.com/os-js/osjs-client/blob/d120d1439ad50e0365044625da21fbb1844b6aaf/src/config.js#L84
Configuration of Application Menu to Show/Hide Items
This could be added as a configuration option, ex:
disabled: ['Filemanager']
in https://github.com/os-js/osjs-client/blob/d120d1439ad50e0365044625da21fbb1844b6aaf/src/config.js#L78
Note All of this config stuff can be overridden in your distro under src/client/config.js
.
I guess if #106 is resolved then the same effect can be achieved by directly uninstall the app.
You can do this right now with npm remove <package>
and npm run package:discover
.
I've released a new version of @osjs/client
(3.2.1
) that supports the following configuration entry:
// src/client/config.js
{
packages: {
hidden: ['Xterm']
}
}
This also works for hiding themes via ex Settings app.
I also updated the following article to reflect this: https://manual.os-js.org/guide/cli/#disabling-packages
Noticed that "disabling packages" was missing from the menu on the left, so added that as well.
Thanks for opening this issue. This is a nice feature to have :)
This issue is similar to #106 but somewhat different.
Basically, I wish there to be a way to organize application menus to hide unnecessary applications so it won't confuse the user.
For instance, my dist will come with a Calculator and some games pre-installed but I want to enable users to hide/show different apps through some settings (which will be provided by a separate application or incorporated into the Settings app).
Similarly, it would be ideal if attributes like
autostart
can be turned on and off during run-time. The thing is, currently it seemed to make modifications directly insidedist/metadata.json
(which was not advised anyway), e.g. by adding attributes likeautostart
anddisabled
will not work.I guess if #106 is resolved then the same effect can be achieved by directly uninstall the app.
Thanks!