# Common configuration for Tmux users { config, pkgs, ... }: let cfg = config.programs.tmux; in { programs = { tmux = { # Terminal multiplexer required by byobu enable = true; aggressiveResize = true; clock24 = true; extraConfig = '' POWERLINE_COMMAND="/run/current-system/sw/bin/powerline" POWERLINE_CONFIG_COMMAND="/run/current-system/sw/bin/powerline-config" run-shell "/run/current-system/sw/bin/powerline-daemon -q" source /run/current-system/sw/share/tmux/powerline.conf # Bind home and end keys: bind-key -n Home send Escape "OH" bind-key -n End send Escape "OF" # Run tmux plugins in NixOS run-shell ${pkgs.tmuxPlugins.onedark-theme}/share/tmux-plugins/onedark-theme/tmux-onedark-theme.tmux set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' ''; keyMode = "vi"; newSession = true; shortcut = "b"; terminal = "screen-256color"; }; }; environment.systemPackages = with pkgs; [ powerline tmuxPlugins.continuum tmuxPlugins.onedark-theme tmuxPlugins.resurrect tmuxPlugins.sensible tmuxPlugins.tmux-fzf tmuxPlugins.yank ]; }