fix: zellij closing out in kitty
This commit is contained in:
parent
5772ba0e19
commit
9e0d9a04e8
1 changed files with 13 additions and 4 deletions
17
home.nix
17
home.nix
|
|
@ -167,7 +167,7 @@ let
|
||||||
if [ -n "''${ZELLIJ:-}" ]; then
|
if [ -n "''${ZELLIJ:-}" ]; then
|
||||||
exec ${pkgs.bashInteractive}/bin/bash -i
|
exec ${pkgs.bashInteractive}/bin/bash -i
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dir="$(printf '%s\n' "$dirs" | ${pkgs.fzf}/bin/fzf \
|
dir="$(printf '%s\n' "$dirs" | ${pkgs.fzf}/bin/fzf \
|
||||||
|
|
@ -183,8 +183,9 @@ let
|
||||||
if [ -z "$dir" ]; then
|
if [ -z "$dir" ]; then
|
||||||
if [ -n "''${ZELLIJ:-}" ]; then
|
if [ -n "''${ZELLIJ:-}" ]; then
|
||||||
${pkgs.zellij}/bin/zellij action close-tab >/dev/null 2>&1 || true
|
${pkgs.zellij}/bin/zellij action close-tab >/dev/null 2>&1 || true
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tab_name="$(${pkgs.coreutils}/bin/basename "$dir")"
|
tab_name="$(${pkgs.coreutils}/bin/basename "$dir")"
|
||||||
|
|
@ -230,7 +231,15 @@ let
|
||||||
text = ''
|
text = ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
exec ${pkgs.zellij}/bin/zellij attach --create main --force-run-commands
|
while true; do
|
||||||
|
if ${pkgs.zellij}/bin/zellij attach --create main --force-run-commands; then
|
||||||
|
if ! ${zellijNewTabZoxide}/bin/zellij-new-tab-zoxide; then
|
||||||
|
exec ${pkgs.bashInteractive}/bin/bash -i
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
zellijSyncTabName = pkgs.writeShellApplication {
|
zellijSyncTabName = pkgs.writeShellApplication {
|
||||||
|
|
@ -478,7 +487,7 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
# Default shell (using bash as configured in your system)
|
# Default shell (using bash as configured in your system)
|
||||||
default_shell = "bash";
|
default_shell = "bash";
|
||||||
default_layout = "tabs-and-mode";
|
default_layout = "zoxide-picker";
|
||||||
pane_frames = false;
|
pane_frames = false;
|
||||||
simplified_ui = true;
|
simplified_ui = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue