Configured tmux-sessionizer
This commit is contained in:
parent
5c3d7e21ad
commit
52016deafe
|
@ -9,12 +9,25 @@
|
|||
inherit (pkgs) tmuxPlugins;
|
||||
|
||||
cfg = config.${namespace}.apps.tmux;
|
||||
|
||||
tmsConfig = {
|
||||
display_full_path = true;
|
||||
session_sort_order = "LastAttached";
|
||||
search_dirs = [
|
||||
{
|
||||
path = "${config.home.homeDirectory}/src";
|
||||
depth = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
in {
|
||||
options.${namespace}.apps.tmux = {
|
||||
enable = mkEnableOption "tmux";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [pkgs.tmux-sessionizer];
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
|
@ -53,7 +66,15 @@ in {
|
|||
bind c new-window -c "#{pane_current_path}"
|
||||
bind '"' split-window -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# sessionizer
|
||||
bind C-o display-popup -E "${pkgs.tmux-sessionizer}/bin/tms"
|
||||
bind C-j display-popup -E "${pkgs.tmux-sessionizer}/bin/tms switch"
|
||||
bind C-w display-popup -E "${pkgs.tmux-sessionizer}/bin/tms windows"
|
||||
bind C-s command-prompt -p "Rename active session to:" "run-shell '${pkgs.tmux-sessionizer}/bin/tms rename %1'"
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."tms/config.toml".source = (pkgs.formats.toml {}).generate "tms-config" tmsConfig;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue