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

Refresh airline colors #691

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

MrJulianBlack
Copy link
Contributor

Hello, first off, this is my first PR ever, so sorry in advance if not everything is up to standard, I tried to follow every information i could find.

The purpose of this PR is to fix some errors with the Airline integration. I know there is also support for Lualine, but i haven't personally made that switch yet.

Things this changes:

VCS section styling:

For some reason, section B of Airline (second from the left, where i.e. Git branch is displayed) is styled exactly the same before as section C (Filename). By changing the background color, it looks much better. This is the same color that is used in Lualine for this purpose.

Replace mode:

I don't know if anyone uses replace mode not out of accident, but I noticed the colors for warning & error section were not applied in that mode. I changed this to match all the other modes by defining replace mode as a variation of insert mode. Different than in Lualine, I only set the red color on the left side of the status-line, because it is already used on the right for the error-section and looks kind of wrong otherwise.

I also could not find any documentation what so ever on Airline for "insert_replace", so assuming it is a deprecated configuration option, I removed it.

Terminal+Command mode:

I added different colors for these modes, where before they only used the color from normal mode. Terminal mode is defined as an exact copy of insert mode, which is the same configuration as used for Lualine. For command mode, I defined it as a variation of normal mode where the orange color (same as in Lualine) is only appiled on the left side, for the same reason as for replace mode, it is already used on the right side.

So please, let me know what you think! Obviously, colors are a subjective topic, but I feel like at least the changes for the VCS section are needed and where unintended before. For everything else, as I said, i tried to be as close to Lualine in everything to achieve the same same style. If needed, I can take some time to take before&after screenshots showing the changes I made.

Airline section B is used to show information regarding vcs, i.e. git
branch. This section was formatted the same as section C, so they were
indistinguishable.

This commit changes the bachground color to the same one used for
Lualine.
The colors for the error and warning section of Airline were not applied
to replace mode. This commit fixes this issue by instead defining
the replace mode colors as a variation of the insert mode colors, where
these colors are already deifned. Note that the red color is only
applied to Airline sections A & B, but not on the right side, since the
red color is already used there for the error section. This is different
from Lualine, since there the error & warning sections don't exist.
This adds support for different colors for Airline in terminal mode and
command mode, where before simply the normal mode colors where used.
For terminal mode, its simply a copy of insert mode. This makes sense
since it is basically insert mode just for the terminal buffer. In
Lualine, this is done the same way.
For command mode, it is a variation of normal mode. The orange color is
also used in Lualine for this purpose. Only the sections A & B (on the
left) are modified with this color, different from Lualine. Reason is
the same as for Replace mode; the orange color is already used on the
right for the warning section.
@nullchilly
Copy link
Contributor

Thanks!

Before

image

After

image

@nullchilly nullchilly merged commit aebe43d into catppuccin:main Mar 29, 2024
9 checks passed
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