summaryrefslogtreecommitdiffstats
path: root/tmux.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tmux.nix20
1 files changed, 14 insertions, 6 deletions
diff --git a/tmux.nix b/tmux.nix
index 4d8eb56..648e4d9 100644
--- a/tmux.nix
+++ b/tmux.nix
@@ -1,6 +1,8 @@
-{ config, pkgs, ... }:
-
{
+ config,
+ pkgs,
+ ...
+}: {
programs.tmux = {
enable = true;
shell = "${pkgs.fish}/bin/fish";
@@ -36,12 +38,19 @@
unbind C-b
bind C-a send-prefix
+ set -g default-terminal "screen-256color"
+ set -ga terminal-overrides ",xterm-256color:Tc"
+
# Keybindings for easier navigation
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
+ bind-key -r d new-session -s dev
+ bind-key -r m new-session -s music
+ bind-key -r n new-session -s nixos
+
# Fish-friendly clipboard integration
set -g set-clipboard on
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
@@ -52,11 +61,10 @@
};
home.packages = with pkgs; [
- tmux
- xclip
+ tmux
+ xclip
];
-
# Create session setup script
home.file.".config/tmux/setup-sessions.sh" = {
executable = true;
@@ -81,5 +89,5 @@
# Attach to dev session by default
tmux attach-session -t dev
'';
-};
+ };
}