Tmux: Difference between revisions

imported>Crodjer
No edit summary
Mmkaram (talk | contribs)
m Nixpkgs channel was old/unavailable, updated to 24.11
 
(One intermediate revision by one other user not shown)
Line 19: Line 19:
Note that <code>extraConfig</code> writes directly to <code>/etc/tmux.conf</code>
Note that <code>extraConfig</code> writes directly to <code>/etc/tmux.conf</code>


There is a good example of [https://github.com/srid/nixos-config/blob/master/home/tmux.nix tmux configuration here].


=== 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?channel=22.11&from=0&size=50&sort=relevance&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?channel=24.11&from=0&size=50&sort=relevance&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">