feat: tmux scripting
This commit is contained in:
parent
f301f81c09
commit
08def86724
5 changed files with 28 additions and 3 deletions
|
@ -3,5 +3,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = [(import ./heic-to-jpg.script.nix {inherit pkgs;})];
|
||||
home.packages = [
|
||||
(import ./heic-to-jpg.script.nix {inherit pkgs;})
|
||||
(import ./tmux-default.script.nix {
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
14
home-manager/stvnliu/scripts/tmux-default.script.nix
Normal file
14
home-manager/stvnliu/scripts/tmux-default.script.nix
Normal 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}
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue