ctucx.git: nixfiles

ctucx' nixfiles

commit 811619043a8d0ad56810b8d62701c418a08349ee
parent 2667da05f9ef03a36de47a859b908b96c0ceeabe
Author: Leah (ctucx) <git@ctu.cx>
Date: Fri, 28 Oct 2022 21:48:01 +0200

configuration/darwin/yabai: remove unused key-bindings
1 file changed, 1 insertion(+), 53 deletions(-)
M
configurations/darwin/yabai.nix
|
54
+-----------------------------------------------------
diff --git a/configurations/darwin/yabai.nix b/configurations/darwin/yabai.nix
@@ -1,23 +1,6 @@
 { config, pkgs, ... }:
 
-let
-  toggleFloating = pkgs.writeScript "yabaiToggleFloating.sh" ''
-    #!/usr/bin/env bash
-    PATH=$(eval echo $PATH)
-
-    # Toggle the workspace layout between float and bsp
-    read -r curType index <<< $(echo $(yabai -m query --spaces --space | jq '.type, .index'))
-
-    if [ $curType = '"bsp"' ]; then
-      yabai -m space --layout float
-      osascript -e "display notification \"Change the layout of workspace $index to float\" with title \"yabai\""
-    else
-      yabai -m space --layout bsp
-      osascript -e "display notification \"Change the layout of workspace $index to bsp\" with title \"yabai\""
-    fi
-  '';
-
-in {
+{
 
   environment.etc."sudoers.d/yabai".text = ''
     leah ALL = (root) NOPASSWD: ${pkgs.yabai}/bin/yabai --load-sa

@@ -44,11 +27,6 @@ in {
     };
 
     extraConfig = ''
-      #sudo yabai --load-sa
-
-      # load scripting-additions when Dock.app restarts
-      #yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
-
       # 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"

@@ -62,13 +40,6 @@ in {
       yabai -m rule --add title='Settings$' manage=off layer=above
       yabai -m rule --add title='Opening$' manage=off layer=above
 
-      # float Finder and AppStore
-      #yabai -m rule --add app='Finder' manage=off layer=above
-      #yabai -m rule --add app='App Store' manage=off layer=above
-
-      #float firefox PiP window
-      #yabai -m rule --add label="Firfox PIP" app="^Firefox$" title="^(Picture-in-Picture)$" manage=off layer=above sticky=on
-
       yabai -m rule --add app='pinentry-mac' manage=off layer=above sticky=on
 
       #float Calculator

@@ -82,18 +53,6 @@ in {
       # kill focused window
       lalt + shift - q : yabai -m window --close
 
-      # float / unfloat window and center on screen
-      #lalt - space : yabai -m window --toggle float; yabai -m window --grid 4:4:1:1:2:2
-
-      # enter fullscreen mode for the focused window
-      lalt - f : yabai -m window --toggle zoom-fullscreen
-
-      # change layout of desktop
-      lalt - e : ${toggleFloating}
-
-      # rotate tree
-      lalt - r : yabai -m space --rotate 90
-
       # change focus (using arrow keys)
       lalt - left  : yabai -m window --focus west
       lalt - right : yabai -m window --focus east

@@ -106,17 +65,6 @@ in {
       shift + lalt - down  : yabai -m window --warp south
       shift + lalt - up    : yabai -m window --warp north
 
-      # move between workspaces
-      #lalt - 1 : yabai -m space --focus 1
-      #lalt - 2 : yabai -m space --focus 2
-      #lalt - 3 : yabai -m space --focus 3
-      #lalt - 4 : yabai -m space --focus 4
-      #lalt - 5 : yabai -m space --focus 5
-      #lalt - 6 : yabai -m space --focus 6
-      #lalt - 7 : yabai -m space --focus 7
-      #lalt - 8 : yabai -m space --focus 8
-      #lalt - 9 : yabai -m space --focus 9
-
       # go back to previous workspace (kind of like back_and_forth in i3)
       lalt - 0 : yabai -m space --focus recent