pinwheel: Restore claude and emacs panes with tmux-resurrect

This commit is contained in:
Alexander Heldt committed 2026-11-03 14:22:55 +01:00
1 parent 65c16f2ea6
commit 44afaf3936
5 files changed
+140 -1

No files matched your search

+13
View File
@@ -2,9 +2,20 @@
let
colors = config.lib.colors.terminal;
dim = builtins.elemAt colors.bright 0;
tmuxPanes = pkgs.writeShellApplication {
name = "tmux-panes";
runtimeInputs = [
pkgs.jq
pkgs.tmux
];
text = builtins.readFile ./panes.sh;
};
in
{
home-manager.users.alex = {
home.packages = [ tmuxPanes ];
programs.tmux = {
enable = true;
@@ -20,6 +31,8 @@ in
plugin = pkgs.tmuxPlugins.resurrect;
extraConfig = ''
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-processes '"~bin/claude->${tmuxPanes}/bin/tmux-panes restore claude" "~bin/emacs -nw->${tmuxPanes}/bin/tmux-panes restore emacs"'
set -g @resurrect-hook-post-save-all '${tmuxPanes}/bin/tmux-panes save'
'';
}
{