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

Add transparent background to the powerline #299

Merged
merged 5 commits into from
Oct 10, 2024

Conversation

Heyian
Copy link
Contributor

@Heyian Heyian commented Oct 8, 2024

I've tried to create the least possible if statements to achieve this. This should solve #101

I've added the 2 following options:

  1. @dracula-transparent-powerline-bg -> Default to false, set background transparency on the powerline
  2. @dracula-inverse-divider -> I had to change the divider for the window panes because I couldn't get the foreground color to be transparent, only the backgroud. So I've set this inversed divider to be used if transparent-powerline-bg is set to true. I've added it to the options so the user could use another divider if he had decided to change the show-left-sep

I've added some new variables :

  1. bg_color -> set the backgroud color
  2. window_sep_fg -> set the foreground color of the windows separator (it is necessary to change it if we use the inversed divider)
  3. window_sep_bg -> set the background of the windows separator, same reasons as window_sep_fg
  4. window_sep -> sets the divider used between the windows.

Those variables and their placement in the code allows no other if statement than setting those variables. I've tried to name the variables with something similar that was already used.

I've checked the powerline with transparent-powerline-bg set as false or without using it in tmux.conf and I can't find any differences from the original code.

This change doesn't seem to break anything. I haven't touched the right side of the bar since it seemed to be filled. I don't use much plugins though but I've tested it with ssh-session, git and playerctl and I can't find anything that breaks.

@ethancedwards8
Copy link
Member

ethancedwards8 commented Oct 9, 2024

Can you attach screenshots? I'm not sure I'm getting the intended effect using Kitty on MacOS.

EDIT: Nevermind, I had a typo. Everything LGTM. Thank you so much! This is amazingly clean code.

@ethancedwards8
Copy link
Member

Screenshot 2024-10-09 at 14 47 58

My only concern is this little circle in the lower left hand corner. Can you reproduce?

@Heyian
Copy link
Contributor Author

Heyian commented Oct 10, 2024

First of all, thanks for the comment about my code, it made my day!

I can't reproduce the little circle. I've tried with the smiley instead of the session and it doesn't seem to make any changes. Here's what it looks like on my kitty.
image

It seems the wrong nerd font icon get's loaded on your end. If you look at the sh file, do you see the right icon if you look at the show_inverse_divider variable? I'm using the icon nf-ple-left_hard_divider_inverse if it helps.

Here's what it looks like in my nvim :
image

@ethancedwards8 ethancedwards8 linked an issue Oct 10, 2024 that may be closed by this pull request
@ethancedwards8
Copy link
Member

Screenshot 2024-10-10 at 11 58 20

You are right. It seems to be an issue on my end. I'm going to do some more review, then I'll probably merge. Thank you for your contribution!

@ethancedwards8 ethancedwards8 merged commit 50c1c33 into dracula:master Oct 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Enchancement: [Disable gray background]
2 participants