aerospace.nix 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. {
  2. services.aerospace = {
  3. enable = true;
  4. settings = {
  5. gaps = {
  6. inner.horizontal = 10;
  7. inner.vertical = 10;
  8. outer.left = 10;
  9. outer.bottom = 10;
  10. outer.top = 10;
  11. outer.right = 10;
  12. };
  13. mode.main.binding = {
  14. alt-1 = "workspace 1";
  15. alt-2 = "workspace 2";
  16. alt-3 = "workspace 3";
  17. alt-4 = "workspace 4";
  18. alt-5 = "workspace 5";
  19. alt-b = "workspace B"; # Browser
  20. alt-e = "workspace E"; # Finder
  21. alt-t = "workspace T"; # Terminal
  22. alt-m = "workspace M"; # Mail
  23. alt-s = "workspace S"; # Signal
  24. alt-v = "workspace V"; # Video
  25. # moving windows to workspaces
  26. alt-shift-1 = "move-node-to-workspace 1";
  27. alt-shift-2 = "move-node-to-workspace 2";
  28. alt-shift-3 = "move-node-to-workspace 3";
  29. alt-shift-4 = "move-node-to-workspace 4";
  30. alt-shift-5 = "move-node-to-workspace 5";
  31. alt-shift-b = "move-node-to-workspace B";
  32. alt-shift-e = "move-node-to-workspace E";
  33. alt-shift-t = "move-node-to-workspace T";
  34. alt-shift-m = "move-node-to-workspace M";
  35. alt-shift-s = "move-node-to-workspace S";
  36. alt-shift-v = "move-node-to-workspace V";
  37. alt-shift-f = "fullscreen";
  38. # focus between windows
  39. alt-h = "focus left";
  40. alt-l = "focus right";
  41. alt-k = "focus up";
  42. alt-j = "focus down";
  43. # move between windows
  44. alt-shift-h = "move left";
  45. alt-shift-l = "move right";
  46. alt-shift-k = "move up";
  47. alt-shift-j = "move down";
  48. alt-shift-minus = "resize smart -50";
  49. alt-shift-equal = "resize smart +50";
  50. alt-tab = "workspace-back-and-forth";
  51. alt-shift-tab = "move-workspace-to-monitor --wrap-around next";
  52. alt-shift-semicolon = "mode service";
  53. alt-slash = "layout tiles horizontal vertical";
  54. alt-comma = "layout accordion horizontal vertical";
  55. };
  56. mode.service.binding = {
  57. esc = ["reload-config" "mode main"];
  58. r = ["flatten-workspace-tree" "mode main"];
  59. f = ["layout floating tiling" "mode main"];
  60. backspace = ["close-all-windows-but-current" "mode main"];
  61. alt-shift-h = ["join-with left" "mode main"];
  62. alt-shift-j = ["join-with down" "mode main"];
  63. alt-shift-k = ["join-with up" "mode main"];
  64. alt-shift-l = ["join-with right" "mode main"];
  65. };
  66. on-window-detected = [
  67. {
  68. "if".app-id = "org.whispersystems.signal-desktop";
  69. check-further-callbacks = false;
  70. run = [ "move-node-to-workspace S" ];
  71. }
  72. {
  73. "if".app-id = "com.apple.finder";
  74. check-further-callbacks = false;
  75. run = [ "move-node-to-workspace E" ];
  76. }
  77. {
  78. "if".app-id = "com.apple.mail";
  79. check-further-callbacks = false;
  80. run = [ "move-node-to-workspace M" ];
  81. }
  82. {
  83. "if".app-id = "com.mitchellh.ghostty";
  84. check-further-callbacks = false;
  85. run = [ "move-node-to-workspace T" ];
  86. }
  87. ];
  88. };
  89. };
  90. }