pinwheel: Restore claude and emacs panes with tmux-resurrect
This commit is contained in:
5 files changed
+140
-1
No files matched your search
@@ -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'
|
||||
'';
|
||||
}
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user