From 9dc1c500fda87dadf3545b6e1a42b90c7ab18a69 Mon Sep 17 00:00:00 2001 From: alejandro-angulo Date: Sat, 12 Jul 2025 10:33:25 -0700 Subject: [PATCH] Add btop popup --- modules/home/apps/tmux/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/home/apps/tmux/default.nix b/modules/home/apps/tmux/default.nix index 1f8185a..63120c4 100644 --- a/modules/home/apps/tmux/default.nix +++ b/modules/home/apps/tmux/default.nix @@ -101,6 +101,17 @@ in } { display-popup -h 90% -w 90% -E "tmux new-session -A -s $(tmux display-message -p '#S')-lg ${pkgs.lazygit}/bin/lazygit" } + '' + + lib.strings.optionalString config.programs.btop.enable '' + # Open btop in a popup + # Spins up a new session named `btop` (hitting the shortcut + # toggles between attaching and detaching) + # NOTE: This overrides the default C-t shortcut (shows time by default) + bind C-t if-shell "[[ $(tmux display-message -p '#S') == btop ]]" { + detach-client + } { + display-popup -h 90% -w 90% -E "tmux new-session -A -s btop ${pkgs.btop}/bin/btop" + } ''; };