ctucx.git: nixfiles

ctucx' nixfiles

commit 18d4a1762036135410af28da3f9fbad7b09fbf33
parent c991f485718a2a20441c286a470e9b487cea5447
Author: Leah (ctucx) <git@ctu.cx>
Date: Mon, 17 Jun 2024 23:00:39 +0200

darwin: remove `yabai`
3 files changed, 0 insertions(+), 105 deletions(-)
D
configurations/darwin/yabai.nix
|
84
-------------------------------------------------------------------------------
M
pkgs/darwin/default.nix
|
1
-
D
pkgs/darwin/yabai.nix
|
20
--------------------
diff --git a/configurations/darwin/yabai.nix b/configurations/darwin/yabai.nix
@@ -1,84 +0,0 @@
-{ config, pkgs, ... }:
-
-{
-
-  environment.etc."sudoers.d/yabai".text = ''
-    leah ALL = (root) NOPASSWD: ${pkgs.yabai}/bin/yabai --load-sa
-  '';
-
-  services.yabai = {
-    enable  = true;
-    package = pkgs.yabai;
-    config  = {
-      layout              = "float";
-
-      window_placement    = "second_child";
-      window_topmost      = "off";
-      window_shadow       = "off";
-      window_opacity      = "off";
-
-#      focus_follows_mouse = "autofocus";
-      mouse_follows_focus = "off";
-
-      mouse_modifier      = "alt";
-      mouse_action1       = "move";
-      mouse_action2       = "resize";
-
-    };
-
-    extraConfig = ''
-      # fix focus when closing windows
-      yabai -m signal --add event=window_destroyed action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse"
-      yabai -m signal --add event=application_terminated action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse"
-
-      # float system preferences
-      yabai -m rule --add app='^System Information$' manage=off layer=above
-      yabai -m rule --add app='^System Preferences$' manage=off layer=above
-      yabai -m rule --add title='Preferences$' manage=off layer=above
-
-      # float settings and file windows
-      yabai -m rule --add title='Settings$' manage=off layer=above
-      yabai -m rule --add title='Opening$' manage=off layer=above
-
-      yabai -m rule --add app='pinentry-mac' manage=off layer=above sticky=on
-
-      #float Calculator
-      yabai -m rule --add app='Calculator' manage=off layer=above sticky=on
-    '';
-  };
-
-  services.skhd = {
-    enable     = true;
-    skhdConfig = ''
-      # kill focused window
-      lalt + shift - q : yabai -m window --close
-
-      # change focus (using arrow keys)
-      lalt - left  : yabai -m window --focus west
-      lalt - right : yabai -m window --focus east
-      lalt - down  : yabai -m window --focus south
-      lalt - up    : yabai -m window --focus north
-
-      # move managed window
-      shift + lalt - left  : yabai -m window --warp west
-      shift + lalt - right : yabai -m window --warp east
-      shift + lalt - down  : yabai -m window --warp south
-      shift + lalt - up    : yabai -m window --warp north
-
-      # go back to previous workspace (kind of like back_and_forth in i3)
-      lalt - 0 : yabai -m space --focus recent
-
-      # move focused window to workspace
-      lalt + shift - 1 : yabai -m window --space 1
-      lalt + shift - 2 : yabai -m window --space 2
-      lalt + shift - 3 : yabai -m window --space 3
-      lalt + shift - 4 : yabai -m window --space 4
-      lalt + shift - 5 : yabai -m window --space 5
-      lalt + shift - 6 : yabai -m window --space 6
-      lalt + shift - 7 : yabai -m window --space 7
-      lalt + shift - 8 : yabai -m window --space 8
-      lalt + shift - 9 : yabai -m window --space 9
-    '';
-  };
-
-}
diff --git a/pkgs/darwin/default.nix b/pkgs/darwin/default.nix
@@ -2,7 +2,6 @@ final: prev:
 
 {
 
-  yabai                  = final.callPackage ./yabai.nix {};
   asitop                 = final.callPackage ./asitop.nix {};
   bgiparser              = final.callPackage ./bgiparser.nix {};
   uhubDaemon             = final.callPackage ./uhubDaemon.nix {};
diff --git a/pkgs/darwin/yabai.nix b/pkgs/darwin/yabai.nix
@@ -1,20 +0,0 @@
-{ pkgs, stdenv, fetchurl, ... }:
-
-stdenv.mkDerivation rec {
-  pname = "yabai";
-  version = "4.0.1";
-
-  src = fetchurl {
-    name   = "yabai-${version}.tar.gz";
-    url    = "https://github.com/koekeishiya/yabai/releases/download/v${version}/yabai-v${version}.tar.gz";
-    sha256 = "1iahdi7a5b5blqdhws42f1rqmw5w70qkl2xiprrjn1swzc2lynsh";
-  };
-
-  installPhase = ''
-    mkdir -p $out/bin
-    mkdir -p $out/share/man/man1/
-
-    cp ./bin/yabai   $out/bin/yabai
-    cp ./doc/yabai.1 $out/share/man/man1/yabai.1
-  '';
-}