-
-
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
i3: add module #79
i3: add module #79
Conversation
c32091d
to
1a63dae
Compare
51aae58
to
cfd631b
Compare
I think it's pretty much ready for merge. One of my goals was to make it possible to enable module via My personal configuration that uses almost all options: https://pastebin.com/QTUnEuBX. Default values were taken from here: https://github.com/i3/i3/blob/next/etc/config. @rycee if I understand correctly you are using xmonad, but maybe you look at this PR from a general perspective? I would appreciate any feedback. For now, I put the code in a separate |
titlebar = mkOption { | ||
type = types.bool; | ||
default = cfg.package != pkgs.i3-gaps; | ||
defaultText = "cfg.package != pkgs.i3-gaps (titlebar should be disabled for i3-gaps)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "cfg" here isn't very understandable for a user reading the documentation. Unfortunately will need something more extensive like "xsession.wm.i3.package != pkgs.i3-gaps" (maybe even change "pkgs" to "nixpkgs"?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
Wow! This is quite the module! 😄 I just had a very quick look right now. I'll try to look it over a bit more carefully tomorrow, although as you pointed out I'm an xmonad user so I'll avoid looking at the particulars of i3. I'll then also add a news entry saying that the |
Thank you! Yes, I think we can wait until October 31, I think more people will likely to use home-manager if we will not break anything unexpectedly :) Hopefully, some i3 users will also show-up to test this module in the meantime :) |
I tested the module and was delighted to see that I was able to migrate 99% of my config to home-manager. Just one thing: I didn't find the "focus_follows_mouse" option in the i3 module. Is there a way to set this option (its on by default - I like it off). Also, it (auto-)generates |
Thank you for testing it out @pmiddend ! Let me know if you think some option names or submodules structure is confusing, we can still discuss it and change while it's not merged yet. Good point about the default font; fixed that. I also added |
Works like a charm, thanks! |
defaultText = "xsession.wm.i3.package != nixpkgs.i3-gaps (titlebar should be disabled for i3-gaps)"; | ||
description = "Whether to show window titlebars."; | ||
}; | ||
border = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I think it's nice to have an empty line between options. You have such separators above but not below.
I think the module is just fine. The single concern I may raise is that the number of options is so large that it might make the module cumbersome to maintain and the documentation cluttered. But if you are willing to maintain it then I think it is OK to merge :-) |
I see your point about a number of options and cluttered documentation. The reason I wrote the module in this way is that for my use-case it is very convenient to have this level of flexibility. At the same time, I was also trying to make this module useful for simpler cases. Since I use i3 on daily bases, I don't mind to maintain this module. One way I see to simplify the module and significantly reduce the documentation size (by 30%) is to change
I see two downsides to this approach:
I'm personally fine with both of the downsides if you think this would improve the module @rycee. |
About the colors, maybe could do something similar to the vim module? I.e., set |
I made |
I squashed commits to prepare for the rebase. Note that the module still using |
No worries. I'll switch over the windowManager option shortly and will take care of xmonad at the same time. I'll ping in this PR once it's done :-) |
Thank you! :-) |
@uvNikita Ok, now it should be sorted. |
Great! I now modified the commit to use |
Looks good. Feel free to merge whenever you are happy with it. |
Rebased into master 467b774. Thanks to all who participated in the PR! |
Wonderful work! Thanks for the patience in getting this in 👍 |
Hello @uvNikita I ask this because I am currently adapting the |
@GaetanLepage It's been awhile, I don't really remember why titlebar had to be disabled for i3-gaps... |
OK, I found it, see comment here: #3563 (comment) |
All right ! Thank you for the quick answer :) |
I think
And
|
You are right, I had missed those :) |
As for the
So I think that's the reason of not including |
Note: this is work in progress PR, created merely to identify that the new module is being developed, and to prevent duplicating work.While the code is currently in active development, comments, ideas, and feedback on the module API are highly appreciated. Be aware that commits might be amended and rebased in the process.Progress:
variables(we can just use nix for that)