Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmux - move config to XDG compliant location #1558

Closed
peterhoeg opened this issue Oct 18, 2020 · 5 comments · Fixed by #1928
Closed

tmux - move config to XDG compliant location #1558

peterhoeg opened this issue Oct 18, 2020 · 5 comments · Fixed by #1928
Assignees

Comments

@peterhoeg
Copy link
Collaborator

Issue description

tmux 3.1b supports the hardcoded location ~/.config/tmux/tmux.conf in addition to ~/.tmux.conf but the next version will honour $XDG_CONFIG_DIR so let's start using that instead.

I'll self-assign but if anyone else wants to, feel free.

@marsam @jorsn

@peterhoeg peterhoeg self-assigned this Oct 18, 2020
@peterhoeg
Copy link
Collaborator Author

@teto
Copy link
Collaborator

teto commented Oct 25, 2020

XDG supports always gets a hourra from me. Go ahead and maybe add the change behind a stateVersion check.

@ambroisie
Copy link
Contributor

@peterhoeg the version on 20.09 is now 3.1c, what else is needed to add support for this?

@marsam
Copy link
Contributor

marsam commented Mar 9, 2021

A patch for this could be:

--- a/modules/programs/tmux.nix
+++ b/modules/programs/tmux.nix
@@ -335,10 +335,9 @@ in
         };
       })
 
-      # config file ~/.tmux.conf
-      { home.file.".tmux.conf".text = mkBefore tmuxConf; }
+      { xdg.configFile."tmux/tmux.conf".text = mkBefore tmuxConf; }
       (mkIf (cfg.plugins != []) configPlugins)
-      { home.file.".tmux.conf".text = mkAfter cfg.extraConfig; }
+      { xdg.configFile."tmux/tmux.conf".text = mkAfter cfg.extraConfig; }
     ])
   );
 }

but I'd wait until 3.2 is released because it adds $XDG_CONFIG_HOME to the search paths tmux/tmux@f87be8d, otherwise it would break if anyone sets xdg.configHome to a different path.

@NickCao
Copy link
Contributor

NickCao commented Apr 13, 2021

Now that tmux 3.2 has been released, maybe we can make some progess?
tmux: 3.1c -> 3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants