Replies: 22 comments 26 replies
-
I think this would make a really good addition to the wiki. Mind creating a draft of what you think needs to be mentioned? This can just be a rough outline / bullet points and I'll write a section from that. |
Beta Was this translation helpful? Give feedback.
-
Sure, I'll gladly draft something up :) Do you think it's perhaps worth waiting until I've got the module merged upstream (if it's accepted) in nix-darwin? That's the more comprehensive part (in terms of use) of these contributions. I think if we updated the documentation to simply state a Nix package is available, it may leave some users wondering where an acompanying service is |
Beta Was this translation helpful? Give feedback.
-
People here are generally open to the idea of living on the edge and running nightly/unstable software, so I don't think it's a blocker. |
Beta Was this translation helpful? Give feedback.
-
Cool, thanks for weighing in here :) I'll take some time to draft something for the wiki a little later - I imagine it'll be fairly minimal |
Beta Was this translation helpful? Give feedback.
-
I've just submitted the service module PR to nix-darwin. LnL can be pretty snappy on this stuff, so we might even see a merge on this before I sit down and write the docs for the package anyway 🤞 |
Beta Was this translation helpful? Give feedback.
-
It's now merged and generally available, short post on it here: I'll write up a draft for docs tomorrow, as I should have some time :) |
Beta Was this translation helpful? Give feedback.
-
Wiki Draft/Outline
{
services.yabai = {
enable = true;
package = pkgs.yabai;
enableScriptingAddition = true;
config = {
focus_follows_mouse = "autoraise";
mouse_follows_focus = "off";
window_placement = "second_child";
window_opacity = "off";
window_opacity_duration = "0.0";
window_topmost = "on";
window_shadow = "float";
active_window_opacity = "1.0";
normal_window_opacity = "1.0";
split_ratio = "0.50";
auto_balance = "on";
mouse_modifier = "fn";
mouse_action1 = "move";
mouse_action2 = "resize";
layout = "bsp";
top_padding = 36;
bottom_padding = 10;
left_padding = 10;
right_padding = 10;
window_gap = 10;
};
extraConfig = ''
# rules
yabai -m rule --add app='System Preferences' manage=off
# Any other arbitrary config here
'';
};
}
|
Beta Was this translation helpful? Give feedback.
-
There you go @dominiklohmann :) Hopefully that's enough to go off, but please do let me know if there's stuff you feel I need to expand on |
Beta Was this translation helpful? Give feedback.
-
thanks for the package! Is this currently bugged? :) I get some errors when trying to install from unstable right now on my M1 |
Beta Was this translation helpful? Give feedback.
-
Yep, looks like it depends on ghc-8.10.6 which isn't available for aarch64-darwin at the moment. Is there any workaround? |
Beta Was this translation helpful? Give feedback.
-
it's broken for me as well
|
Beta Was this translation helpful? Give feedback.
-
Any possibility of adding something like the nix darwin module to home-manager? 😄 |
Beta Was this translation helpful? Give feedback.
-
I don't use yabai at the moment. Why don't you try adding it, though? 😊 It should basically be a drop-in solution and could be a good learning experience |
Beta Was this translation helpful? Give feedback.
-
Hehe, I guess I'll have to try. Thanks for the quick reply! 😄 |
Beta Was this translation helpful? Give feedback.
-
Hey @cmacrae I'm a nix noob hoping that you can update the nix pkg to yabai Also +1 for home-manager support. |
Beta Was this translation helpful? Give feedback.
-
Having |
Beta Was this translation helpful? Give feedback.
-
Hello, I just finished updating my yabai derivation to version 4.0.1 and thought people here might be interested. The scripting addition fails to load for me, but otherwise its perfectly stable. The version from nixpkgs (3.3.10) had a bunch of flickering problems for me on macOS 12.5, which are entirely fixed on the new update. Definitely great to see. I haven't had much luck with the scripting stuff on earlier versions either, so I'd recommend people to still give it a shot. I do plan to PR the derivation to nixpkgs soon, I've listed myself as a maintainer on it as well so that we can hopefully get future updates merged a bit quicker :) In the meantime, here it is from my dotfiles overlay: IvarWithoutBones/dotfiles@f46f3bd For reference, this is what I get when attempting to install SE, with no errors logged to the console: When attempting to load it: ~ > yabai --load-sa
yabai: scripting-addition either failed to load or could not inject payload into Dock.app! Error: -1708
~ > yabai --check-sa
~ > echo $?
0 |
Beta Was this translation helpful? Give feedback.
-
Good news! I managed to get the scripting addition to load from the nix derivation, and opened the PR to nixpkgs :) NixOS/nixpkgs#188322 For whatever reason neither I figured this might be due to our sandbox messing up the path somehow, but Might be a hint that the installation procedure did correctly finish Im not sure what could be causing the difference between the shell command and yabai's flag. Based on this yabai should execute the thing: Line 412 in 6ef57aa Something I find odd is that |
Beta Was this translation helpful? Give feedback.
-
@IvarWithoutBones thanks for opening NixOS/nixpkgs#188322 ! I tried to build your derivation on Is it because this SDK is not supported for Silicon? |
Beta Was this translation helpful? Give feedback.
-
How do you restart |
Beta Was this translation helpful? Give feedback.
-
I've updated yabai to 5.0.1 in NixOS/nixpkgs#203504. This fixes the issues we had with the scripting addition both on Intel and M1 machines, the redesigned |
Beta Was this translation helpful? Give feedback.
-
Updated the PR to 5.0.2. |
Beta Was this translation helpful? Give feedback.
-
👋 Hope you don't mind an issue being opened for this, but I figured it was a good way to notify you and an easy way for people to discover if they were looking for Nix support:
I submitted a package for yabai to the nixpkgs repository the other day. I'm happy to say, following the merge, it is now generally available on the
nixpkgs-unstable
channel 🎉I'll aslo be submitting a Nix service module I've been using personally for a while to the LnL7/nix-darwin project. It lets you configure yabai like so:
Finally, I'm sure others here may be interested to know I also submitted a PR for spacebar and have a similar module ready to go, too. Once the package is generally available in the channels, I'll submit a PR for the module.
@koekeishiya @dominiklohmann Please feel free to simply close this issue - but if you'd like, I can update the documentation regarding the package (and perhaps, subsequently, the module - at a later date)
Beta Was this translation helpful? Give feedback.
All reactions