-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
[FEAT]: Static configuration loading #427
Comments
This commit is a first pass at the implementation of a static JSON configuration loader. An example config.json based on my own configuration file has been added with this commit, but should be removed later. Presently, there is no support for starting with 'komorebic start'- users must start the application in the foreground with 'komorebi.exe -c config.json' and keep that terminal window open. A lot of work still to be done, but for now the application-specific configurations can be loaded directly from a file, and basic workspace configuration can be defined declaratively in the JSON. Two big outstanding pieces are the generation of a JSONSchema that can be used in VSCode etc to autocomplete configuration options, and accompanying documentation. I think that some work also needs to be done on the consistency of enum casing when serializing and deserializing between the CLI and the static JSON config. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. re #427
This commit is a first pass at the implementation of a static JSON configuration loader. An example config.json based on my own configuration file has been added with this commit, but should be removed later. Presently, there is no support for starting with 'komorebic start'- users must start the application in the foreground with 'komorebi.exe -c config.json' and keep that terminal window open. A lot of work still to be done, but for now the application-specific configurations can be loaded directly from a file, and basic workspace configuration can be defined declaratively in the JSON. Two big outstanding pieces are the generation of a JSONSchema that can be used in VSCode etc to autocomplete configuration options, and accompanying documentation. I think that some work also needs to be done on the consistency of enum casing when serializing and deserializing between the CLI and the static JSON config. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. re #427
This commit is a first pass at the implementation of a static JSON configuration loader. An example config.json based on my own configuration file has been added with this commit, but should be removed later. Presently, there is no support for starting with 'komorebic start'- users must start the application in the foreground with 'komorebi.exe -c config.json' and keep that terminal window open. A lot of work still to be done, but for now the application-specific configurations can be loaded directly from a file, and basic workspace configuration can be defined declaratively in the JSON. Two big outstanding pieces are the generation of a JSONSchema that can be used in VSCode etc to autocomplete configuration options, and accompanying documentation. I think that some work also needs to be done on the consistency of enum casing when serializing and deserializing between the CLI and the static JSON config. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. re #427
This commit is a first pass at the implementation of a static JSON configuration loader. An example config.json based on my own configuration file has been added with this commit, but should be removed later. A lot of work still to be done, but for now the application-specific configurations can be loaded directly from a file, and basic workspace configuration can be defined declaratively in the JSON. Two big outstanding pieces are the generation of a JSONSchema that can be used in VSCode etc to autocomplete configuration options, and accompanying documentation. I think that some work also needs to be done on the consistency of enum casing when serializing and deserializing between the CLI and the static JSON config. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. re #427
This commit is a first pass at the implementation of a static JSON configuration loader. An example config.json based on my own configuration file has been added with this commit, but should be removed later. A lot of work still to be done, but for now the application-specific configurations can be loaded directly from a file, and basic workspace configuration can be defined declaratively in the JSON. Two big outstanding pieces are the generation of a JSONSchema that can be used in VSCode etc to autocomplete configuration options, and accompanying documentation. I think that some work also needs to be done on the consistency of enum casing when serializing and deserializing between the CLI and the static JSON config. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json based on my own configuration file has been added with this commit, but should be removed later. A lot of work still to be done, but for now the application-specific configurations can be loaded directly from a file, and basic workspace configuration can be defined declaratively in the JSON. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. I think that some work also needs to be done on the consistency of enum casing when serializing and deserializing between the CLI and the static JSON config. Some enums also require docstrings to come through on the JSONSchema. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json based on my own configuration file has been added with this commit, but should be removed later. A lot of work still to be done, but for now the application-specific configurations can be loaded directly from a file, and basic workspace configuration can be defined declaratively in the JSON. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. I think that some work also needs to be done on the consistency of enum casing when serializing and deserializing between the CLI and the static JSON config. Some enums also require docstrings to come through on the JSONSchema. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. re #427
Video on the development of this feature and how to use it while it's still being worked on: https://www.youtube.com/watch?v=ucQ1eBdAZqU |
This commit is an implementation of a static JSON configuration loader. An example komorebi.json based on my own configuration file has been added with this commit, but should be removed later. For now the application-specific configurations can be loaded directly from a file, and basic workspace configuration can be defined declaratively in the JSON. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. re #427
On the feature/static-config branch you can now start whkd directly from the komorebic start so you end up with... # ❯ komorebic start -c C:\Users\LGUG2Z\komorebi.json --whkd
Start-Process 'komorebi.exe' -ArgumentList '--config=C:\Users\LGUG2Z\komorebi.json' -WindowStyle hidden
# Waiting for komorebi.exe to start...Started!
if (!(Get-Process whkd -ErrorAction SilentlyContinue))
{
Start-Process whkd -WindowStyle hidden
} This means you don't need a You can also use this JSON Schema to autocomplete (with documentation!) your I'll be looking at updating the quickstart guide and readme soon to reflect these changes, and I think this is the last thing that needs to be done before merging this into the |
This commit is an implementation of a static JSON configuration loader. An example komorebi.json based on my own configuration file has been added with this commit, but may be removed later. For now the application-specific configurations can be loaded directly from a file, and basic workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json based on my own configuration file has been added with this commit, but may be removed later. For now the application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. re #427
The latest version of this branch now also automatically watches the |
This commit is an implementation of a static JSON configuration loader. An example komorebi.json based on my own configuration file has been added with this commit, but may be removed later. For now the application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. re #427
The latest version of this branch includes a new command, https://www.youtube.com/watch?v=2PK1ie-R1Z8 // ❯ komorebic generate-static-config
{
"resize_delta": 50,
"window_container_behaviour": "Create",
"cross_monitor_move_behaviour": "Insert",
"unmanaged_window_operation_behaviour": "Op",
"mouse_follows_focus": true,
"border_width": 20,
"active_window_border": true,
"default_workspace_padding": 10,
"default_container_padding": 20,
"monitors": [
{
"workspaces": [
{
"name": "personal",
"layout": "UltrawideVerticalStack",
"layout_rules": {
"0": "UltrawideVerticalStack"
},
"initial_workspace_rules": [
{
"kind": "Exe",
"id": "firefox.exe"
}
]
},
{
"name": "work",
"layout": "BSP",
"layout_rules": {},
"initial_workspace_rules": [
{
"kind": "Exe",
"id": "chrome.exe"
}
]
},
{
"name": "music",
"layout": "BSP",
"layout_rules": {},
"initial_workspace_rules": [
{
"kind": "Exe",
"id": "Plexamp.exe"
},
{
"kind": "Exe",
"id": "Spotify.exe"
}
]
}
]
},
{
"workspaces": [
{
"name": "chat",
"layout": "Rows",
"layout_rules": {},
"workspace_padding": 20,
"initial_workspace_rules": [
{
"kind": "Exe",
"id": "Beeper.exe"
},
{
"kind": "Exe",
"id": "Discord.exe"
},
{
"kind": "Exe",
"id": "Slack.exe"
}
]
}
]
}
],
"alt_focus_hack": true,
"window_hiding_behaviour": "Cloak"
} |
This commit is an implementation of a static JSON configuration loader. An example komorebi.json based on my own configuration file has been added with this commit, but may be removed later. For now the application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
The latest version of this branch includes a new command,
|
This commit is an implementation of a static JSON configuration loader. An example komorebi.json based on my own configuration file has been added with this commit, but may be removed later. For now the application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json configuration file has been added. The application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json configuration file has been added. The application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json configuration file has been added. The application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json configuration file has been added. The application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json configuration file has been added. The application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json configuration file has been added. The application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json configuration file has been added. The application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json configuration file has been added. The application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
This commit is an implementation of a static JSON configuration loader. An example komorebi.json configuration file has been added. The application-specific configurations can be loaded directly from a file, and workspace configuration can be defined declaratively in the JSON. Individual rules etc. can also be added directly in the static configuration as one-offs. A JSONSchema can be generated using komorebic's static-config-schema command. This should be added to something like SchemaStore later. Loading from static configuration is significantly faster on startup, as the lock does not have to be reacquired for every command that is sent over the socket. When loading configuration from a static JSON file, a hotwatch instance will automatically be created to listen to file changes and apply any updates to both the global and window manager configuration state. A new --whkd flag has been added to the komorebic start command to optionally start whkd in a background process. A new komorebic command 'generate-static-config' has been added to help existing users migrate to a static JSON config file. Currently, custom layout file path information can not be automatically populated in the output of this command and must be added manually by the user if required. A new komorebic command 'fetch-asc' has been added to help users update to the latest version of the application-specific configurations in-place. re #427
Is your feature request related to a problem? Please describe.
Not necessarily a problem for me, but I see many users express a preference for other tiling window managers that allow the loading of static configuration from YAML/TOML/etc files. Allowing similar static configuration loading could reduce friction for users who are not confident using PowerShell or AHK to configure
komorebi
.Describe the solution you'd like
Expose a flag and/or an environment variable which points to a static configuration file that can be loaded at startup. Ideally, this would also allow users to consume a reference to an
applications.yaml
(ie. allowing them to pin to a specific revision) for app-specific fixes.A JSONSchema file should also be published so that users can benefit from autocompletions when editing this static configuration file.
Describe alternatives you've considered
Improve education on runtime configuration, though I don't think this will really change the minds of people who are dead set on using static configuration files.
The text was updated successfully, but these errors were encountered: