nixos-config/modules/tmux.nix

36 lines
758 B
Nix
Raw Normal View History

# SPDX-FileCopyrightText: 2018-2022 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
2020-11-07 17:24:29 +01:00
{
programs.tmux = {
enable = true;
2021-11-03 14:10:23 +01:00
terminal = "tmux-256color";
2020-11-07 17:24:29 +01:00
escapeTime = 0;
aggressiveResize = true;
baseIndex = 1;
extraConfig = /* tmux */ ''
2020-11-07 17:24:29 +01:00
# screen behaviour
unbind C-b
set -g prefix C-a
unbind C-a
bind C-a send-prefix
# more ergonomic splitting
unbind |
bind | split-window -h
unbind -
bind - split-window -v
# HOWTO copy: PREFIX+[, space, select text, enter, PREFIX+]
# disable mouse (prevents simple copying)
set -g mouse off
2021-11-03 14:10:23 +01:00
# true color support
set -ga terminal-overrides ",xterm-256color:Tc"
2020-11-07 17:24:29 +01:00
'';
};
}