gpakosz / .tmux

🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
MIT License
21.54k stars 3.33k forks source link

Consider renaming `.tmux.conf.local` to `.tmux.config.local.example` #715

Closed ncihnegn closed 5 months ago

ncihnegn commented 5 months ago

I use .tmux as a git submodule in ~/.config/tmux. So my changes to .tmux.conf.local will have conflicts when I pull from your repo.

gpakosz commented 5 months ago

Hello @ncihnegn,

I don't believe it's an issue.

In my repository the file is named .tmux.conf.local while it should be name ~/.config/tmux/tmux.conf.local without a leading dot when loaded from $XDG_CONFIG_HOME

ncihnegn commented 5 months ago

Ah, the naming can be confusing.

But it is still a problem. Adding ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local are still modifications to the ~/.config/tmux/ submodule.

I don't understand why we need to make a link for tmux.conf. We should be able to use it as is.

It will be nice to use a layout like ~/.tmux/tmux.conf plus ~/.tmux.conf.local. The vanilla configuration and the user customization should be in different directories so that they can be tracked separately.

gpakosz commented 5 months ago

The vanilla configuration and the user customization should be in different directories so that they can be tracked separately

Sure. So you can have:

~
├── .config (your own git repository)
│   ├ .tmux (this repository as a submodule)
│   │ ├ .tmux.conf (upstream)
│   │ └ .tmux.conf.local (upstream)
│   └ tmux
│     ├ tmux.conf -> ../.tmux/.tmux.conf (symlink)
│     └ tmux.conf.local (your own copy with your own customizations)
├── ...
└── ...
ncihnegn commented 5 months ago

Yes, that's what I am doing. But the unnecessary link is bugging me.

gpakosz commented 5 months ago

the unnecessary link is bugging me

The following won't work:

~
├── .config (your own git repository)
│   └ tmux (this repository as a submodule)
│     ├ .tmux.conf
│     └ .tmux.conf.local.example
├── ...
└── ...

Renaming .tmux.conf.local to .tmux.conf.local.example won't help much when tmux is looking for a file named ~/.config/tmux/tmux.conf and not ~/.config/tmux/.tmux.conf.

It's too late to rename .tmux.conf to tmux.conf in this repository as it would break many users who pull the repository.