2020-01-12 15:17:35 -08:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
my = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
# The developer of tmux chooses not to add XDG support for religious
|
2020-01-23 15:58:53 -08:00
|
|
|
# reasons (see tmux/tmux#142). Fortunately, nix makes this easy:
|
2020-01-12 15:17:35 -08:00
|
|
|
(writeScriptBin "tmux" ''
|
|
|
|
#!${stdenv.shell}
|
|
|
|
exec ${tmux}/bin/tmux -f "$TMUX_HOME/config" "$@"
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
|
|
|
|
env.TMUX_HOME = "$XDG_CONFIG_HOME/tmux";
|
|
|
|
env.TMUXIFIER = "$XDG_DATA_HOME/tmuxifier";
|
|
|
|
env.TMUXIFIER_LAYOUT_PATH = "$XDG_DATA_HOME/tmuxifier";
|
|
|
|
env.PATH = [ "$TMUXIFIER/bin" ];
|
|
|
|
|
|
|
|
zsh.rc = ''
|
|
|
|
_cache tmuxifier init -
|
2020-01-17 01:22:50 -08:00
|
|
|
${lib.readFile <config/tmux/aliases.zsh>}
|
2020-01-12 15:17:35 -08:00
|
|
|
'';
|
2020-01-31 22:40:16 -08:00
|
|
|
home.xdg.configFile = {
|
|
|
|
"tmux" = { source = <config/tmux>; recursive = true; };
|
|
|
|
"tmux/plugins".text = ''
|
|
|
|
run-shell ${pkgs.tmuxPlugins.copycat}/share/tmux-plugins/copycat/copycat.tmux
|
|
|
|
run-shell ${pkgs.tmuxPlugins.prefix-highlight}/share/tmux-plugins/prefix-highlight/prefix_highlight.tmux
|
|
|
|
run-shell ${pkgs.tmuxPlugins.yank}/share/tmux-plugins/yank/yank.tmux
|
|
|
|
'';
|
|
|
|
};
|
2020-01-12 15:17:35 -08:00
|
|
|
};
|
|
|
|
}
|