|
|
@@ -5,7 +5,7 @@
|
|
|
}:
|
|
|
let
|
|
|
cfg = config.programs.aerospace;
|
|
|
- aerospace-focus = "${lib.getExe pkgs.unstable.aerospace-tmux-focus}";
|
|
|
+ aerospace-focus = "${lib.getExe pkgs.aerospace-tmux-focus}";
|
|
|
in
|
|
|
{
|
|
|
home.packages = [ pkgs.aerospace-tmux-focus ];
|
|
|
@@ -25,66 +25,121 @@ in
|
|
|
programs.aerospace = {
|
|
|
enable = true;
|
|
|
userSettings = {
|
|
|
+ start-at-login = true;
|
|
|
+
|
|
|
mode.main.binding = {
|
|
|
- alt-1 = "workspace 1";
|
|
|
- alt-2 = "workspace 2";
|
|
|
- alt-3 = "workspace 3";
|
|
|
- alt-4 = "workspace 4";
|
|
|
- alt-5 = "workspace 5";
|
|
|
- alt-b = "workspace B"; # Browser
|
|
|
- alt-e = "workspace E"; # Finder
|
|
|
- alt-m = "workspace M"; # Mail
|
|
|
- alt-n = "workspace N"; # Notes
|
|
|
- alt-s = "workspace S"; # Signal
|
|
|
- alt-t = "workspace T"; # Terminal
|
|
|
- alt-v = "workspace V"; # Video
|
|
|
-
|
|
|
- # moving windows to workspaces
|
|
|
- alt-shift-1 = "move-node-to-workspace 1";
|
|
|
- alt-shift-2 = "move-node-to-workspace 2";
|
|
|
- alt-shift-3 = "move-node-to-workspace 3";
|
|
|
- alt-shift-4 = "move-node-to-workspace 4";
|
|
|
- alt-shift-5 = "move-node-to-workspace 5";
|
|
|
- alt-shift-b = "move-node-to-workspace B";
|
|
|
- alt-shift-e = "move-node-to-workspace E";
|
|
|
- alt-shift-t = "move-node-to-workspace T";
|
|
|
- alt-shift-m = "move-node-to-workspace M";
|
|
|
- alt-shift-n = "move-node-to-workspace N";
|
|
|
- alt-shift-s = "move-node-to-workspace S";
|
|
|
- alt-shift-v = "move-node-to-workspace V";
|
|
|
-
|
|
|
- # focus between windows
|
|
|
+ # window focus
|
|
|
+ ctrl-left = "exec-and-forget ${aerospace-focus} left";
|
|
|
+ ctrl-down = "exec-and-forget ${aerospace-focus} down";
|
|
|
+ ctrl-up = "exec-and-forget ${aerospace-focus} up";
|
|
|
+ ctrl-right = "exec-and-forget ${aerospace-focus} right";
|
|
|
+
|
|
|
+ # vim-style window focusing
|
|
|
ctrl-h = "exec-and-forget ${aerospace-focus} left";
|
|
|
- ctrl-l = "exec-and-forget ${aerospace-focus} right";
|
|
|
- ctrl-k = "exec-and-forget ${aerospace-focus} up";
|
|
|
ctrl-j = "exec-and-forget ${aerospace-focus} down";
|
|
|
+ ctrl-k = "exec-and-forget ${aerospace-focus} up";
|
|
|
+ ctrl-l = "exec-and-forget ${aerospace-focus} right";
|
|
|
|
|
|
- # move between windows
|
|
|
+ # move windows
|
|
|
+ ctrl-shift-left = "move left";
|
|
|
+ ctrl-shift-down = "move down";
|
|
|
+ ctrl-shift-up = "move up";
|
|
|
+ ctrl-shift-right = "move right";
|
|
|
+
|
|
|
+ # vim-style window moving
|
|
|
ctrl-shift-h = "move left";
|
|
|
- ctrl-shift-l = "move right";
|
|
|
- ctrl-shift-k = "move up";
|
|
|
ctrl-shift-j = "move down";
|
|
|
+ ctrl-shift-k = "move up";
|
|
|
+ ctrl-shift-l = "move right";
|
|
|
+
|
|
|
+ # jump to workspace
|
|
|
+ ctrl-b = "workspace B"; # Browser
|
|
|
+ ctrl-e = "workspace E"; # Finder
|
|
|
+ ctrl-m = "workspace M"; # Mail
|
|
|
+ ctrl-n = "workspace N"; # Notes
|
|
|
+ ctrl-s = "workspace S"; # Signal
|
|
|
+ ctrl-t = "workspace T"; # Terminal
|
|
|
+ ctrl-v = "workspace V"; # Video
|
|
|
+
|
|
|
+ # move window to workspace
|
|
|
+ ctrl-shift-b = "move-node-to-workspace B";
|
|
|
+ ctrl-shift-e = "move-node-to-workspace E";
|
|
|
+ ctrl-shift-t = "move-node-to-workspace T";
|
|
|
+ ctrl-shift-m = "move-node-to-workspace M";
|
|
|
+ ctrl-shift-n = "move-node-to-workspace N";
|
|
|
+ ctrl-shift-s = "move-node-to-workspace S";
|
|
|
+ ctrl-shift-v = "move-node-to-workspace V";
|
|
|
+
|
|
|
+ # follow window to workspace
|
|
|
+ ctrl-cmd-b = [ "move-node-to-workspace B" "workspace B" ];
|
|
|
+ ctrl-cmd-e = [ "move-node-to-workspace E" "workspace E" ];
|
|
|
+ ctrl-cmd-t = [ "move-node-to-workspace T" "workspace M" ];
|
|
|
+ ctrl-cmd-m = [ "move-node-to-workspace M" "workspace N" ];
|
|
|
+ ctrl-cmd-n = [ "move-node-to-workspace N" "workspace S" ];
|
|
|
+ ctrl-cmd-s = [ "move-node-to-workspace S" "workspace T" ];
|
|
|
+ ctrl-cmd-v = [ "move-node-to-workspace V" "workspace V" ];
|
|
|
+
|
|
|
+ # window management
|
|
|
+ ctrl-q = "close";
|
|
|
+ ctrl-shift-q = "close-all-windows-but-current";
|
|
|
+
|
|
|
+ # fullscreen and floating
|
|
|
+ ctrl-f = "fullscreen";
|
|
|
+ ctrl-shift-f = "layout floating tiling";
|
|
|
+
|
|
|
+ # layout switching
|
|
|
+ ctrl-space = "layout tiles horizontal vertical";
|
|
|
+ ctrl-shift-space = "layout accordion horizontal vertical";
|
|
|
+
|
|
|
+ # resize mode
|
|
|
+ ctrl-r = "mode resize";
|
|
|
+
|
|
|
+ # application launchers; not necessary since we're using app launcher
|
|
|
+ # ctrl-return = "exec-and-forget open -a Terminal";
|
|
|
+ # ctrl-e = "exec-and-forget open -a Finder";
|
|
|
+ # ctrl-b = "exec-and-forget open -a Safari";
|
|
|
+ ctrl-d = "exec-and-forget open -a Raycast";
|
|
|
+
|
|
|
+ # reload configuration; probably not necessary since we're using hm
|
|
|
+ # ctrl-ctrl-r = "reload-config";
|
|
|
+
|
|
|
+ # resize shortcuts outside of resize mode
|
|
|
+ ctrl-cmd-h = "resize smart -50";
|
|
|
+ ctrl-cmd-l = "resize smart +50";
|
|
|
+ ctrl-cmd-k = "resize smart -50";
|
|
|
+ ctrl-cmd-j = "resize smart +50";
|
|
|
+ };
|
|
|
|
|
|
- alt-shift-minus = "resize smart -50";
|
|
|
- alt-shift-equal = "resize smart +50";
|
|
|
+ mode.resize.binding = {
|
|
|
+ h = "resize smart -50";
|
|
|
+ l = "resize smart +50";
|
|
|
+ k = "resize smart -50";
|
|
|
+ j = "resize smart +50";
|
|
|
|
|
|
- alt-shift-semicolon = "mode service";
|
|
|
+ left = "resize smart -50";
|
|
|
+ right = "resize smart +50";
|
|
|
+ up = "resize smart -50";
|
|
|
+ down = "resize smart +50";
|
|
|
|
|
|
- alt-slash = "layout tiles horizontal vertical";
|
|
|
- alt-comma = "layout accordion horizontal vertical";
|
|
|
+ esc = "mode main";
|
|
|
+ ctrl-r = "mode main";
|
|
|
};
|
|
|
|
|
|
on-window-detected = [
|
|
|
# disable on "Picture-in-Picture"
|
|
|
{
|
|
|
- "if".app-id = "com.brave.Browser";
|
|
|
- "if".window-title-regex-substring = "Picture in Picture";
|
|
|
check-further-callbacks = false;
|
|
|
+ "if" = {
|
|
|
+ app-id = "com.brave.Browser";
|
|
|
+ window-title-regex-substring = "Picture in Picture";
|
|
|
+ };
|
|
|
run = [ "layout floating" ];
|
|
|
}
|
|
|
{
|
|
|
- "if".app-id = "io.zsa.keymapp";
|
|
|
check-further-callbacks = false;
|
|
|
+ "if" = {
|
|
|
+ app-id = "io.zsa.keymapp";
|
|
|
+ };
|
|
|
run = [ "layout floating" ];
|
|
|
}
|
|
|
];
|