Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration of Application Menu to Show/Hide Items #137

Closed
chaojian-zhang opened this issue Dec 22, 2020 · 4 comments
Closed

Configuration of Application Menu to Show/Hide Items #137

chaojian-zhang opened this issue Dec 22, 2020 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@chaojian-zhang
Copy link

chaojian-zhang commented Dec 22, 2020

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 inside dist/metadata.json (which was not advised anyway), e.g. by adding attributes like autostart and disabled will not work.

I guess if #106 is resolved then the same effect can be achieved by directly uninstall the app.

Thanks!

@andersevenrud
Copy link
Member

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:

application: {

Configuration of Application Menu to Show/Hide Items

This could be added as a configuration option, ex:

disabled: ['Filemanager']

in

packages: {

Note All of this config stuff can be overridden in your distro under src/client/config.js.

@andersevenrud
Copy link
Member

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 .

@andersevenrud andersevenrud added enhancement New feature or request question Further information is requested labels Dec 23, 2020
@andersevenrud
Copy link
Member

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.

@andersevenrud
Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants