Skip to content

Add a "reset" option that will reset all options when loading the plugin #500

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kjnsn
Copy link
Collaborator

@kjnsn kjnsn commented Mar 5, 2025

Useful for changing the flavour while tmux is running. Light/dark theme hooks only work with a super recent tmux change: tmux/tmux#4353

Will document how it works when the next major version of tmux is released

Copy link
Member

@rogeruiz rogeruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🌈

I like the direction of this a lot @kjnsn. Thanks for getting started on this work.

I'll be waiting to actually approve this when the work is all complete. but it's a good start 🚀

@kjnsn kjnsn mentioned this pull request Apr 13, 2025
1 task
@dimitur2204
Copy link

Hey! Is the PR in a working state? I would like to try and run that locally for me.

@rogeruiz
Copy link
Member

Sure @dimitur2204 its stable enough to test but it's not fully documented. Take a look at this Nix derivation below to write a shell script that resets the flavor from Latte to Mocha. Keep in mind it's my personal setup but the steps in the script should help make it clear for you. So you will need to customize things based on the documentation on this branch.

We don't currently have a timeline for when this will make it into a release. Testing is always appreciated it.

➡️ https://github.com/rogeruiz/srht-dotfiles.nix/blob/main/module/tools/terminal/tmux/catppuccin/bin/default.nix

@dimitur2204
Copy link

dimitur2204 commented Apr 21, 2025

@rogeruiz I just managed to get it to work on MacOS with dark-notify. This is what I have in the .tmux.conf:

set -g @catppuccin_reset "true"
run ~/.tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -g @plugin 'erikw/tmux-dark-notify'
set -g @dark-notify-theme-path-light '~/.tmux/plugins/catppuccin/tmux/themes/catpuccin_set_latte.conf'
set -g @dark-notify-theme-path-dark '~/.tmux/plugins/catppuccin/tmux/themes/catpuccin_set_mocha.conf'

And those "catpuccin_set_{theme}.conf" are those snippets from the suggested documentation:

set -g @catppuccin_flavor "{theme}"
set -g @catppuccin_reset "true"
run ~/.tmux/plugins/catppuccin/tmux/catppuccin.tmux

Lovely work guys!

Edit:
There seems to be some kind of issue with some colours when switching to the light theme -
image

@rogeruiz
Copy link
Member

rogeruiz commented Apr 21, 2025

Thanks @dimitur2204 for the feedback. Read through the docs on this branch #512. There's a section about why certain background colors need to be set even though we don't normally ask users to set them.

You have to set reset true and source it every time which will look like you're loading the plugin twice. We're aware of the limitation in Tmux.

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 this pull request may close these issues.

3 participants