Closed AmaiKinono closed 5 years ago
First thank you so much for this awesome patch!
The reason of tab's background is not change with theme switch is:
All awesome-tab-separtor-*
variables is created by function awesome-tab-separator-memoize
that mean those awesome-tab-separtor-*
background is same as default face when awesome-tab plugin first load.
I have commit https://github.com/manateelazycat/awesome-tab/commit/c5fd9476fb492383c194d8805c8ce1515646abc0
Use awesome-tab-separator-memoize
re-created awesome-tab-separtor-*
variables every time we call awesome-tab-line-format
Then awesome-tab separtor's background can change with theme switch.
And i need call awesome-tab-color-blend
in awesome-tab-line-format
.
In order to save communication time, I created a new patch
I have add your name in acknowledgements list.
Thanks for great work, it's awesome!!!
Thanks for the answer. There's still a problem: I have to run a hook to turn off and on awesome-tab
after changing theme, or it will look like this:
Changing from dark theme to light theme
Then if I switch the tag, it shows correctly. My thought is we have to redisplay the tabs after changing the theme, but the only way I can think of is to advise the load-theme
function, which shouldn't be a good idea. Or we can advise the user to add a redisplay function to his/her changing-theme-hook
. Emacs doesn't come with a hook like that, but as far as I am concerned, many users define this hook on their own.
Here's another issue: tags won't display in terminal, it shows a band there.
I remember awesome-tab
works in the terminal before, so I did this:
(fset #'awesome-tab-adjust-color-with-theme 'ignore)
now it looks like this, the selected tab is not highlighted:
Here's another issue: tags won't display in terminal, it shows a band there.
I remember
awesome-tab
works in the terminal before, so I did this:(fset #'awesome-tab-adjust-color-with-theme 'ignore)
now it looks like this, the selected tab is not highlighted:
建议你做一个Patch,判断不同环境的时候加载不同的代码
Thanks for the answer. There's still a problem: I have to run a hook to turn off and on
awesome-tab
after changing theme, or it will look like this:Changing from dark theme to light theme
Then if I switch the tag, it shows correctly. My thought is we have to redisplay the tabs after changing the theme, but the only way I can think of is to advise the
load-theme
function, which shouldn't be a good idea. Or we can advise the user to add a redisplay function to his/herchanging-theme-hook
. Emacs doesn't come with a hook like that, but as far as I am concerned, many users define this hook on their own.
这个还好,用户不是经常换主题,即使换了主题,标签一切换就好了,我觉得暂时不用管它。 因为Emacs没有标准的切换主题的hook
我想在自己配置中实现切换主题时重新显示 tab,但重启 awesome-tab-mode
后之前重排过的顺序会复原。现在我能想到的是走一遍 buffer 然后把 awesome-tab-local-mode
开关一遍,不知您是否有更好的建议?
Colors of the faces are set based on the current background/foreground color, thus making it looks beautiful on both light/dark themes. Below are some examples:
theme: doom-peacock
theme: doom-nord
theme: doom-one-light
The color blend function comes from this blog post. The settings has been tested with various themes and they all looks really well.
Here's one thing I still want to fix: after changing the theme, the faces does not change. I tried to run a hook to set all the faces again and restart
awesome-tab-mode
after changing theme, but it turns out to be like this::cry:
The faces are refreshed, but the space between tabs is not. I need your help to inspect the reason and fix this.