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

Change active tab background color when layout changes #2634

Closed
chriszarate opened this issue May 8, 2020 · 2 comments
Closed

Change active tab background color when layout changes #2634

chriszarate opened this issue May 8, 2020 · 2 comments

Comments

@chriszarate
Copy link
Contributor

This is something I've been trying to accomplish in a kitten but am really struggling to figure out. I would like to change the color (or append something to the title—really any kind of indicator) when the layout changes. This is something that comes out of the box in tmux (it appends *Z to zoomed panes) and is easily customizable with window_zoomed_flag. Is this possible in kitty?

I am using the zoom_toggle kitten provided in the docs and would like to extend that. Changing the active_tab_background color changes it for every tab, not just the one that has a different layout. Changing the title changes it permanently. I've been scouring the source code but can't find the right hook. Has anybody accomplished something similar?

@chriszarate
Copy link
Contributor Author

Thanks!

@chriszarate
Copy link
Contributor Author

Follow-up note for anyone searching for how to implement a tmux-style "zoom flag": This feature landed in 0.18. This is how I use it to show a count of "hidden" windows when the tab is zoomed:

tab_title_template " {title}{' +%s' % (num_windows - 1) if (layout_name == 'stack' and num_windows > 1) else ''} "

In a tab with 3 windows using the stack layout, this would result in this tab title:

~/Downloads +2

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

No branches or pull requests

1 participant