gpakosz / .tmux

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

Feature Request: External Theme Support #562

Closed markfaine closed 1 year ago

markfaine commented 2 years ago

Such as those provided here https://github.com/jimeh/tmux-themepack, currently using both causes conflicts.

deepanchal commented 2 years ago

It would be nice to have this.

I have found this dracula theme from @exshak 's dotfiles https://github.com/exshak/dotfiles/blob/406760381296bce8c76ecec6527f3d5cef9d2d6c/.config/tmux/.tmux.conf.local#L53-L74

# dracula theme
tmux_conf_theme_colour_0="default"    # background
tmux_conf_theme_colour_1="#282a36"    # background
tmux_conf_theme_colour_2="#303030"    # gray
tmux_conf_theme_colour_3="#f8f8f2"    # foreground
tmux_conf_theme_colour_4="#8be9fd"    # cyan
tmux_conf_theme_colour_5="#f1fa8c"    # yellow
tmux_conf_theme_colour_6="#282a36"    # background
tmux_conf_theme_colour_7="#f8f8f2"    # foreground
tmux_conf_theme_colour_8="#282a36"    # background
tmux_conf_theme_colour_9="#bd93f9"    # purple
tmux_conf_theme_colour_10="#6272a4"   # comment
tmux_conf_theme_colour_11="#50fa7b"   # green
tmux_conf_theme_colour_12="#f8f8f2"   # foreground
tmux_conf_theme_colour_13="#f8f8f2"   # foreground
tmux_conf_theme_colour_14="#282a36"   # background
tmux_conf_theme_colour_15="#44475a"   # selection
tmux_conf_theme_colour_16="#6272a4"   # comment
tmux_conf_theme_colour_17="#bd93f9"   # purple
tmux_conf_theme_colour_18="#ff5555"   # red
tmux_conf_theme_colour_19="#ffb86c"   # orange
tmux_conf_theme_colour_20="#ff79c6"   # pink

I have created this monokai soda theme using https://github.com/dchakro/alacritty_colors/blob/main/themes/monokaiSoda.yml

# monokai soda theme
tmux_conf_theme_colour_0="#1a1a1a"
tmux_conf_theme_colour_1="#282a36"
tmux_conf_theme_colour_2="#303030"
tmux_conf_theme_colour_3="#f6f6ef"
tmux_conf_theme_colour_4="#58d1eb"
tmux_conf_theme_colour_5="#ffb86c"
tmux_conf_theme_colour_6="#282a36"
tmux_conf_theme_colour_7="#f6f6ef"
tmux_conf_theme_colour_8="#282a36"
tmux_conf_theme_colour_9="#98e024"
tmux_conf_theme_colour_10="#9d65ff"
tmux_conf_theme_colour_11="#98e024"
tmux_conf_theme_colour_12="#f6f6ef"
tmux_conf_theme_colour_13="#f6f6ef"
tmux_conf_theme_colour_14="#282a36"
tmux_conf_theme_colour_15="#44475a"
tmux_conf_theme_colour_16="#9d65ff"
tmux_conf_theme_colour_17="#98e024"
tmux_conf_theme_colour_18="#f4005f"
tmux_conf_theme_colour_19="#ffb86c"
tmux_conf_theme_colour_20="#f4005f"
gpakosz commented 2 years ago

Hello @markfaine 👋

Oh my tmux! comes with TPM integration. From what I saw when visiting https://github.com/jimeh/tmux-themepack, this can be used as a TPM plugin.

If you edit your ~/.tmux.conf.local copy, you can do

set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/block/blue'

That being said, this tmux plugin takes the entire control of tmux status-left and status-right which may conflict with some of Oh my tmux! features.

Please give it a try and report your findings

markfaine commented 1 year ago

Hello @markfaine 👋

Oh my tmux! comes with TPM integration. From what I saw when visiting https://github.com/jimeh/tmux-themepack, this can be used as a TPM plugin.

If you edit your ~/.tmux.conf.local copy, you can do

set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/block/blue'

That being said, this tmux plugin takes the entire control of tmux status-left and status-right which may conflict with some of Oh my tmux! features.

Please give it a try and report your findings

This is how I was using it, as a tpm plugin, however, it was breaking some functionality in oh-my-tmux, so I have since disabled it. I guess it makes sense that they might not play nice together. I was occasionally able to get some of the themes to work with oh-my-tmux and in some cases it produced great results but it was always fragile and sometimes there would be surprise glitches. It would be nice if they could work well together, though I understand that is probably a large undertaking. If the theme that oh-my-tmux uses was a tpm plugin itself that might present a way to make oh-my-tmux more customizable. I know it's a lot easier said than done but it's just a suggestion. The themes aspect of oh-my-tmux isn't really the main selling point for me. it's the other features and the bindings. I see it as a way to get tmux up and usable quickly without a lot of googling how to do x in tmux. What about a flag that just turns off all theming but keeps everything else?

I know it's a total hack but I was able to do something similar by simply removing the __apply_theme function and the call to it in __apply_configuration, at that point the themepack themes work, of course there are some theme features in oh-my-zsh that I'd like but for me, if I had to pick one or the other I'd go with being more flexible with the number of themes I can use.

gpakosz commented 1 year ago

Hello @markfaine 👋

You may want to try the gh-536 branch.

That being said, if a plugin overwrites status-left and/or status-right entirely, then you will likely lose some of Oh my tmux! features.

gpakosz commented 1 year ago

Dupe of #536