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

feat(menu): add menu style options #247

Merged
merged 6 commits into from
Jul 15, 2024
Merged

Conversation

cluther
Copy link
Contributor

@cluther cluther commented Jul 13, 2024

To allow #{thm_x} styling of menus.

  • @catppuccin_menu_style (menu-style)
  • @catppuccin_menu_selected_style (menu-selected-style)
  • @catppuccin_menu_border_style (menu-border-style)

To allow `#{thm_x}` styling of menus.

- @catppuccin_menu_style (`menu-style`)
- @catppuccin_menu_selected_style (`menu-selected-style`)
- @catppuccin_menu_border_style (`menu-border-style`)
Copy link
Collaborator

@vdbe vdbe left a comment

Choose a reason for hiding this comment

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

This change has some unintended side effects:

  • does not work with transparency
    This can be fixed by using bg=default instead of bg=${thm_gray} (maybe also only setting fg have not tested that).
  • disabled options are no longer grayed out.
    Don't know how to fix this only other menu option I can find is menu-border-lines (https://github.com/tmux/tmux/blob/master/options-table.c#L332-L366).
    Maybe default to "" and only set when not ""?

Current:
Screenshot from 2024-07-13 19-08-15

This PR:
Screenshot from 2024-07-13 19-15-55

@cluther
Copy link
Contributor Author

cluther commented Jul 14, 2024

Thanks, @vdbe. I'll test those defaults more carefully, and update the pull request.

@cluther
Copy link
Contributor Author

cluther commented Jul 14, 2024

@vdbe: Switching to bg=default as you suggested works. I can't reproduce the problem with disabled menu options. They do appear disabled for me.

This is with tmux 3.4 installed from nixos-unstable, and configured with catppuccin/nix.
catppuccin-tmux-menu-transparency.webm

@vdbe
Copy link
Collaborator

vdbe commented Jul 14, 2024

Weird can you try it with just set -g mouse on in the config?

image

image

image

https://github.com/vdbe/catppuccin-tmux-dev

@cluther
Copy link
Contributor Author

cluther commented Jul 15, 2024

I had mouse enabled. Thanks for the flake. That helped me reproduce the problem. I still don't totally understand why the disabled items were losing styling under that basic config, and not my own, but it was solely related to changing the menu-style value. By explicitly setting it to default the problem goes away. So I set menu-border-style that way as well just to be safe. Setting menu-selected-style to default doesn't work, so I made that as close to the tmux default of bg=yellow,fg=black as I could.

Based on testing with your flake as you showed, this looks good to me now.

catppuccin.tmux Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@vdbe vdbe merged commit 4997265 into catppuccin:main Jul 15, 2024
3 checks passed
@cluther cluther deleted the tmux-menu-style branch July 16, 2024 23:00
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.

2 participants