-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
bug: zellij: It is not clear how to configure keyboard bindings #4659
Comments
After writing this I found #4160, looks like there isn't a solution yet. But when the solution is found, it should be clearly documented... |
Yeah the problem here is that |
Oh, that explains my confusion. I wasn't aware zellij changed formats. |
Yeah they did, in version 0.32.0, although we should probably document this in the module somewhere, not just as a code comment — it can break things, and users should be aware of that |
I have added documentation: #4665 Feedback welcome ! |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
I think this is still a concern. There is a proposal in #4465 to resolve, but looks like that has stalled too :-(. |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
Still an issue |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
Still a thing. |
Can we get a textual I guess that figuring out the best way to transform nix values into KDL configs in a more generic way is going to take a while. EDIT: We have a generic conversion into KDL already, home-manager/modules/programs/zellij.nix Line 69 in 60bb110
The problem seems to be how to configure things. It'd be neat to have an example that sets up a bunch of common things like theme, keybinds and plugins. I'll take a stab at it tomorrow. EDIT2: From a quick look I'm missing the trailing semicolons to set up bindings and I don't see them on the test to the KDL conversion. Figuring this out and/or fixing this seems to need a dive into that commit. programs = {
zellij = {
enable = true;
# Generates ~/.config/zellij/config.kdl
settings = {
# https://zellij.dev/documentation/configuration
theme = "nord"; # https://zellij.dev/documentation/options#theme
# https://github.com/zellij-org/zellij/blob/main/zellij-utils/assets/config/default.kdl
keybinds = {
locked = {
"bind 'Ctrl h'" = {
SwitchToMode = "Normal";
};
};
};
}; # ..programs.zellij.settings
}; # ..programs.zellij
}; # ..programs
|
Have a look at the KDL spec: https://kdl.dev/ I think though the terminating semicolon may not be important. when there is only one node. Or nodes a separated by new lines. But what is wrong, is we have to represent a list of nodes with a attrset. {
SwitchToMode = "Normal";
}; But it isn't a attrset...
An example of a valid KDL document is:
A array for list of nodes would be better. I suspect what is happened is that On the positive side though, I think zellij is the only program that uses My feeling is we should support something like: keybinds = {
locked = [
{
name = "bind";
args=["Ctrl h"];
children=[{ name="SwitchToMode"; args=["Normal"]; }];
}
]
];
}; (apologies if there are syntax errors here...) Not sure if children have to appear last or if they can appear anywhere in the list. I believe they have to be at the end, meaning having I think this would be sufficient for zellij. It hasn't yet addressed properties, which are supported in KDL but maybe not used by zellij:
This can be solved with: [
{
name = "author";
args = [ "Alex Monad"];
properties = { email="alex@example.com"; active=true; };
}
] Assuming order of properties is not important. Or type annotations (I can't actually wrap my head around why you might want these):
|
To be fair their websites call their https://github.com/kdl-org/kdl/blob/main/SPEC.md a living one, and while it's now at version
I believe so too. KDL's FAQ asks "Why yet another document language?" and "Have you seen that one XKCD comic about standards?", but I guess that comic #9271 wasn't strong enough to avoid having another language around that just introduces new syntax without expressiveness worth its weight (tooling, debugger, libraries, it's expensive to have your own language). Beyond what I believe, you seem to be right too, here's a search for KDL on the repo, it only mentions the new files to handle KDL and home-manager/modules/programs/zellij.nix is the only user of all the KDL machinery. Footnotes
|
This allows working around [nix-community#4659](nix-community#4659) While fixing `toKDL` might be fun, I just don't think it's a good use of anyone's time.
This allows working around [nix-community#4659](nix-community#4659) While fixing `toKDL` might be fun, I just don't think it's a good use of anyone's time.
This allows working around [nix-community#4659](nix-community#4659) While fixing `toKDL` might be fun, I just don't think it's a good use of anyone's time.
This allows working around [nix-community#4659](nix-community#4659) While fixing `toKDL` might be fun, I just don't think it's a good use of anyone's time. --- This is still untested.
This allows working around [nix-community#4659](nix-community#4659) While fixing `toKDL` might be fun, I just don't think it's a good use of anyone's time. --- This is still untested.
This allows working around [nix-community#4659](nix-community#4659) While fixing `toKDL` might be fun, I just don't think it's a good use of anyone's time. --- This is still untested.
This allows working around [nix-community#4659](nix-community#4659) While fixing `toKDL` might be fun, I just don't think it's a good use of anyone's time. --- This is still untested.
This allows working around [nix-community#4659](nix-community#4659) While fixing `toKDL` might be fun, I just don't think it's a good use of anyone's time. --- This is still untested.
Are you following the right branch?
Is there an existing issue for this?
Issue description
From the docs zellij keyboard bindings look like:
But it is far from clear what I have to set the
settings
to to generate this. And I can't see any documentation either.I have seen bug #4054, but this hasn't really helped.
Maintainer CC
@mainr
System information
The text was updated successfully, but these errors were encountered: