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

Adding support for config file #120

Open
esjeon opened this issue Oct 23, 2020 · 2 comments
Open

Adding support for config file #120

esjeon opened this issue Oct 23, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@esjeon
Copy link
Owner

esjeon commented Oct 23, 2020

This ticket is created to combine all related issues.

Rationale

KWin allows scripts to provide a custom configuration dialog, which can be accessed through "KWin Scripts" panel in System Settings. However, KWin only accepts Qt Designer UI file for this purpose, which is mostly static and doesn't allow any programming logic inside. This imposes a significant limitation on how scripts can be configured.

Here, accepting external config files opens up many possibilities, including the ones already employed by independent applications. For example:

Technical Aspect

Krohnkite is a "declarative script", that is based on QML, and QML provides XMLHttpRequest function, which can be used to access local files. Combining this with JSON interface built into the Javascript engine, it should be possible to read an external JSON file as a config file with a minimum effort.

Possible Security Concern

While this feature itself won't cause any security problems, the fact that KWin extension scripts can read local files is a security problem. QML-based scripts also can access network using various modules, and this means scripts can both read local data and transmit it over the network. This is enough to create a malware capable of stealing user credentials and probing system configuration.

@esjeon esjeon added the enhancement New feature or request label Oct 23, 2020
@Ethergeist
Copy link

I like this idea. My main reason for using Krohnkite is a lack of a decent compositor for i3 and using the kwin script settings to configure tiling is a concession I made (I very much liked the config file approach i3 uses) in order to get proper vsync without screen tearing.

@ilkerhk
Copy link

ilkerhk commented Nov 2, 2020

Yes, setting the default layout would be a nice addition.
Thanks.

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

No branches or pull requests

3 participants