l tmux: init
This commit is contained in:
parent
e47f1e635c
commit
adf9339f39
|
@ -10,6 +10,7 @@ with import <stockholm/lib>;
|
||||||
./htop.nix
|
./htop.nix
|
||||||
<stockholm/krebs/2configs/security-workarounds.nix>
|
<stockholm/krebs/2configs/security-workarounds.nix>
|
||||||
./wiregrill.nix
|
./wiregrill.nix
|
||||||
|
./tmux.nix
|
||||||
./tor-ssh.nix
|
./tor-ssh.nix
|
||||||
{
|
{
|
||||||
users.extraUsers =
|
users.extraUsers =
|
||||||
|
|
|
@ -2,25 +2,26 @@ with import <stockholm/lib>;
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
environment.etc."tmux.conf".text = ''
|
||||||
|
#prefix key to `
|
||||||
|
set-option -g prefix2 `
|
||||||
|
|
||||||
|
bind-key r source-file /etc/tmux.conf \; display-message "/etc/tmux.conf reloaded"
|
||||||
|
|
||||||
|
set-option -g default-terminal screen-256color
|
||||||
|
|
||||||
|
#use session instead of windows
|
||||||
|
bind-key c new-session
|
||||||
|
bind-key p switch-client -p
|
||||||
|
bind-key n switch-client -n
|
||||||
|
bind-key C-s switch-client -l
|
||||||
|
'';
|
||||||
nixpkgs.config.packageOverrides = super: {
|
nixpkgs.config.packageOverrides = super: {
|
||||||
tmux = pkgs.symlinkJoin {
|
tmux = pkgs.symlinkJoin {
|
||||||
name = "tmux";
|
name = "tmux";
|
||||||
paths = [
|
paths = [
|
||||||
(pkgs.writeDashBin "tmux" ''
|
(pkgs.writeDashBin "tmux" ''
|
||||||
exec ${super.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" ''
|
exec ${super.tmux}/bin/tmux -f /etc/tmux.conf "$@"
|
||||||
#change prefix key to `
|
|
||||||
set-option -g prefix `
|
|
||||||
unbind-key C-b
|
|
||||||
bind ` send-prefix
|
|
||||||
|
|
||||||
set-option -g default-terminal screen-256color
|
|
||||||
|
|
||||||
#use session instead of windows
|
|
||||||
bind-key c new-session
|
|
||||||
bind-key p switch-client -p
|
|
||||||
bind-key n switch-client -n
|
|
||||||
bind-key C-s switch-client -l
|
|
||||||
''} "$@"
|
|
||||||
'')
|
'')
|
||||||
super.tmux
|
super.tmux
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue