-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
i3 workspace/bindsym ordering #695
Comments
Nice catch @arcnmx, thanks for reporting the issue! If I'm not mistaken, a common way to solve such issue in nix is to transform keybindings type from |
Hm, I'm not sure? A list could however work with a type like |
I was thinking to do something similar to the I guess one way to achieve this would be to set the keybindings type to something like this:
This will allow to pass either unordered attributes that will be converted to a list of keybindings module or an ordered list right away. |
It does kind of do that, though "Note, if the order of rules matter then this must be a list" means that specifying even a single block as a named attr can break the expected ordering. The point here I guess though is specifically only the workspace bindings are important to order, so that's fine as long as the default also specifies those as a list I think? Also: the use of a list will inhibit default overrides and
I was going to suggest that, but thought it may not be worth it over just using something closer to the existing type: let keybind = attrsOf (nullOr str); in coercedTo keybind singleton (listOf keybind) and {
config.keybindings = [
{ "a" = "b"; }
etc
];
} In which case you don't really have to worry about the inconsistency of the "action = " syntax only being usable in list form. There are a few ways to accomplish this though, and a This probably makes the default overriding problem even worse, though, hm... Anywhere a list is introduced, whether it's |
This is also an issue for sway. |
Could we maybe use the
|
Thank you for your contribution! I marked this issue as stale due to inactivity. If this remains inactive for another 7 days, I will close 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 issuesIf you have nothing of substance to add, please refrain from commenting and allow the bot close the issue. Also, don'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. |
Mean bot, afaik this is still a relevant issue. |
Maybe we can change the keybinding type from:
to
(I know that's not the exact syntax, just trying to get an idea out there.) Then, we can convert all of the ones that are |
I can't find use-cases other then the default workspace where the order of keybindings is relevant, so with the merge of a few days ago, this can maybe be closed? |
I believe the ordering of all workspace keybindings still matter, I'm not sure whether a singular "default workspace" is enough? Certainly not for multiple monitor setups. |
It seems like the thing for multi-monitor users would be to extend the |
I maybe found something interesting, which could maybe a workaround: We have |
I believe this is still an issue for users with multiple monitors. It should work if we can make the |
The order that keybinds appear in i3's config file is relied on by i3 to make a decision of what workspaces to use at startup.
keybindings
being an attrset doesn't allow for explicit ordering to control or fix this.I'm running into this while adding a tenth
0 -> 10
workspace bind, which ends up sorted in the config file before 1/2/3 that I want it to start with. A solution is to remove all the default workspace bindings and reset them with an explicit order inextraConfig
- I'm mostly just filing this issue to record the need for ordering and see if there may be any other solutions. Perhaps an improvement tokeybindings
could change the type to accept more than just a plain string as an action - it's currently missing the ability to properly specify release keybindings - and allow order customization?The text was updated successfully, but these errors were encountered: