feat: tmux configuration
script: added script to create tmux workspace tmux-config: sets dynamic variable defaultshell to tmux
This commit is contained in:
parent
712e45ca58
commit
a2bf84b09e
2 changed files with 9 additions and 5 deletions
|
@ -6,7 +6,7 @@
|
|||
}: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
shell = config.myShells.defaultShell;
|
||||
terminal = "screen-256color"; # Fix for apps not recognising full color
|
||||
mouse = true;
|
||||
plugins = with pkgs; [
|
||||
|
|
|
@ -6,9 +6,13 @@
|
|||
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
|
||||
#!${pkgs.bash}/bin/bash
|
||||
${tmux}/bin/tmux has-session -t ${windowName} 2>/dev/null
|
||||
if [ $? != 0 ]; then
|
||||
# setting up session
|
||||
${tmux}/bin/tmux new -s ${windowName} -d
|
||||
${tmux}/bin/tmux send-keys -t ${windowName} nvim C-m
|
||||
${tmux}/bin/tmux split-window -h
|
||||
fi
|
||||
${tmux}/bin/tmux attach -t ${windowName}
|
||||
''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue