summaryrefslogtreecommitdiffstats
path: root/lass/2configs/tmux.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2022-06-07 00:17:23 +0200
committermakefu <github@syntax-fehler.de>2022-06-07 00:17:23 +0200
commit9c1799914a2e6f2dc736fe2eaad7134602a3d837 (patch)
tree08347f7f29bc00c3b40be2a49e069268c0163716 /lass/2configs/tmux.nix
parent1e405be047a79e1abd0c28e52b5009b9675909b8 (diff)
parentbdc80e55411e197f89990e988f8b7e67c084d3d3 (diff)
Merge remote-tracking branch 'lass/master' into 22.05
Diffstat (limited to 'lass/2configs/tmux.nix')
-rw-r--r--lass/2configs/tmux.nix29
1 files changed, 15 insertions, 14 deletions
diff --git a/lass/2configs/tmux.nix b/lass/2configs/tmux.nix
index c977a1105..10931365d 100644
--- a/lass/2configs/tmux.nix
+++ b/lass/2configs/tmux.nix
@@ -2,25 +2,26 @@ with import <stockholm/lib>;
{ 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: {
tmux = pkgs.symlinkJoin {
name = "tmux";
paths = [
(pkgs.writeDashBin "tmux" ''
- exec ${super.tmux}/bin/tmux -f ${pkgs.writeText "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
- ''} "$@"
+ exec ${super.tmux}/bin/tmux -f /etc/tmux.conf "$@"
'')
super.tmux
];