gitmux icon indicating copy to clipboard operation
gitmux copied to clipboard

Add TPM configuration

Open jcf opened this issue 4 years ago • 2 comments

Purpose

Add TPM configuration to make installation easier.

Approach

Compile gitmux automatically, if the binary isn't in the plugin directory, and generate the default configuration.

You can use something like this in your Tmux configuration:

set -g @plugin 'jcf/gitmux'
set -g status-right '#(~/.config/tmux/plugins/gitmux/gitmux -cfg ~/.config/tmux/plugins/gitmux/gitmux.conf "#{pane_current_path}")'

If gitmux works without a configuration file, you could skip generating the config file, and that would simplify the status-right option.

I'm not sure if this is something you want to merge based on #2, but I thought I'd share for anyone else who wants to run this awesome project alongside TPM.

All the best!

jcf avatar Apr 24 '21 16:04 jcf

Hi @jcf. Thanks for your pull-request. I thought about something similar to what you're proposing but I didn't want gitmux to require the user to have Go installed on their system. But you actual made me think to something, the tpm script checking for gitmux could directly download the pre-built binary. This would require to check current architecture and to copy gitmux into the PATH, or giving the user a useful message about why that failed. I understand that's more involved. If you wanna give that a go, I'll be happy to review, otherwise we can go with your solution as a first approach. Since tpm users are not used to a script that fails to install, I'd like error messages in case of failure, like if Go isn't installed . Let me know, in any case, thanks!

arl avatar Apr 24 '21 18:04 arl

This is an interesting idea, even though we just added homebrew support I could see tpm support making more sense for this project, but the binary would need to be included in version control :(

So far, I think homebrew is a great solution and easy to work with.

joshmedeski avatar Mar 08 '23 16:03 joshmedeski