Tmux: Difference between revisions

Pigs (talk | contribs)
m Add category CLI Applications, link to pkgs
m Split blocks for more obvious reading
 
(One intermediate revision by one other user not shown)
Line 14: Line 14:
     ...
     ...
   '';
   '';
}
};
</syntaxhighlight>
</syntaxhighlight>


Line 22: Line 22:
=== Using Plugins ===
=== Using Plugins ===


Tmux plugins can be also configured using <code>programs.tmux.plugins</code>. They can be found as NixOS packages: [https://search.nixos.org/packages?type=packages&query=tmuxPlugins tmuxPlugins]. Each of the tmux plugin is run via <code>run-shell</code> automatically.


Tmux plugins can be also configured using <code>programs.tmux.plugins</code>. They can be found as NixOS packages: [https://search.nixos.org/packages?type=packages&query=tmuxPlugins tmuxPlugins]. Each of the tmux plugin is run via <code>run-shell</code> automatically.
Some plugins need to be run after having had some custom configuration done>, but extraConfig gets executed after. For example <code>tmuxPlugins.cpu</code> needs the status line be declared before the plugin is run. For that scenario, <code>run-shell</code> can be added within <code>extraConfig</code>:
Some plugins need to be run after having had some custom configuration done>, but extraConfig gets executed after. For example <code>tmuxPlugins.cpu</code> needs the status line be declared before the plugin is run. For that scenario, <code>run-shell</code> can be added within <code>extraConfig</code>:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 33: Line 33:
     run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
     run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
   '';
   '';
}
};
</syntaxhighlight>
</syntaxhighlight>