refactor basic tools a bit
This commit is contained in:
parent
f3ef2e058c
commit
fc21e3a1b2
4 changed files with 85 additions and 49 deletions
43
modules/basic-tools/multiplexers.nix
Normal file
43
modules/basic-tools/multiplexers.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
escapeTime = 0;
|
||||
historyLimit = 500000;
|
||||
aggressiveResize = true;
|
||||
terminal = "tmux-256color";
|
||||
};
|
||||
|
||||
programs.zsh.interactiveShellInit = ''
|
||||
# create new tmux session with $1 as a name
|
||||
# if no arguments supplied, use name of current dir
|
||||
|
||||
function tn {
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
tmux new-session -s $(basename $(pwd))
|
||||
else
|
||||
tmux new-session -s $1
|
||||
fi
|
||||
}
|
||||
'';
|
||||
|
||||
environment.shellAliases = {
|
||||
tl = "tmux list-sessions";
|
||||
ta = "tmux attach -t";
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.screen
|
||||
];
|
||||
|
||||
programs.screen.screenrc = ''
|
||||
defscrollback 10000
|
||||
|
||||
startup_message off
|
||||
|
||||
hardstatus on
|
||||
hardstatus alwayslastline
|
||||
hardstatus string "%w"
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue