feat: tmux scripting

This commit is contained in:
Zhongheng Liu 2024-12-07 13:04:09 +02:00
commit 08def86724
Signed by: steven
GPG key ID: 805A28B071DAD84B
5 changed files with 28 additions and 3 deletions

View file

@ -0,0 +1,14 @@
{
pkgs,
config,
}: let
tmux = config.programs.tmux.package;
windowName = "code-mode";
in
pkgs.writeShellScriptBin "tmux-code" ''
#!/bin/sh
${tmux}/bin/tmux new -s ${windowName} -d
${tmux}/bin/tmux send-keys -t ${windowName} nvim C-m
${tmux}/bin/tmux split-window -h
${tmux}/bin/tmux attach -t ${windowName}
''