Replies: 7 comments 27 replies
-
I don't think it's a good idea to use scary words like "raw" for the thing you actually want to use most of the time. |
Beta Was this translation helpful? Give feedback.
-
With v2 making the string look nicer and additional erroring, I think already defaulting towards the avoidance of the overhead and leaning towards the use of 'spawn' is correct as is. Doesn't break anything and using 'spawn-sh' is a simple enough toggle for anyone needing parameter expansion to remember. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I'm very much in favor of This is precisely why And i agree with breaking But i think I also think that
(on a more technical note, this representation is a bit friendlier to "merge", which niri doesn't currently do but other tools like wacky exploration:This also naturally lends itself to move We don't need to conform to a subset (strict or otherwise) of the bind actions, though. We can e.g. make the hotkey overlay the default, and have |
Beta Was this translation helpful? Give feedback.
-
I don't like that I found a couple of examples of approaching for specifying shell/languages in different projects that I liked:
How these will look in niri:
|
Beta Was this translation helpful? Give feedback.
-
Couldn't you introduce config migrations, so that for example |
Beta Was this translation helpful? Give feedback.
-
How about removing all distinction of For the sake of not making most things unnecessarily more verbose, we probably should allow a plain float-or-int in most places that currently accept a fixed size in logical pixels. This allows existing configs to not need to add units everywhere. But we should encourage specifying a unit of We could also require the unit. This has a utility from the documentation perspective: Some users who are not familiar with layouts, but who know what a pixel is, might think that dimensionless lengths are just in pixels. "oh this is a low level program that deals with pixels, of course it wants pixels". As such, a lot of documentation repeats that whatever dimensionless quantity is actually in logical pixels, and the current Anything that is named
The Most Another candidate for adding units is for the easing animation. it takes a We should also allow (enforce?) a unit of |
Beta Was this translation helpful? Give feedback.
-
We're getting KDLv2: #1139
And it works in such a way that niri will accept both a KDLv2 config and a KDLv1 config, preserving full backwards compatibility for old configs. This gives us a unique opportunity to do some breaking changes, but only in the new KDLv2 config, so that KDLv1 configs remain working exactly as they did before.
I listed some ideas before in #447. However, thinking about it now, some of these ideas (renames) might be more appropriate for a full backwards compat break rather than a "soft" break like here.
So, here are my current ideas for what to change for KDLv2. Smaller changes from the issue above:
active-color 255 0 0 0
. These are all representable in the CSS syntax.linear duration-ms=200 curve="ease-out-quad"
.Now, for what I mainly wanted to get feedback on.
There's a lot of confusion about
spawn
andspawn-at-startup
: they don't use a shell, so you have to do weird argument quoting, and can't use shell variables and expansions. The reason for this is to avoid the (small, but several ms long) overhead of starting a shell for every bind.KDLv2 makes this a bit nicer on the one hand by removing most of the quotes, on the other hand some problems remain:
So I wanted to add a new
spawn-sh
(spawn-sh-at-startup
) command that accepts a single argument and passes it to the shell.The reason for accepting a single argument is that shells accept their command as a single argument, and do their own parsing and word splitting. While we could accept multiple arguments and join them back with whitespace, I don't think it's a good idea because it would appear as though you can pass one argument
"like this"
, but you actually cannot (it will all be re-split by the shell).Now, this is not a breaking change by itself. The breaking change part is that I want to also rename
spawn
tospawn-raw
(spawn-raw-at-startup
). This is to remove the bias towardsspawn
: I don't want to guide people to unknowingly using (raw)spawn
and having it not work. But I still want it to remain easily accessible if you don't want the shell overhead. And I don't want to straight up replacespawn
itself with a shell because it will make the migration more difficult.So, what do you think? Both about the "spawn" ideas, and about maybe doing some other changes for KDLv2, since we have this opportunity.
Beta Was this translation helpful? Give feedback.
All reactions