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 optional bold to theme colors #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pdf
Copy link
Contributor

@pdf pdf commented Feb 11, 2015

Adds an optional field to color definitions, that if set to 'bold' will enable
bold foreground text.

@pdf pdf force-pushed the add_optional_bold branch 2 times, most recently from 74d3c21 to bb6cab0 Compare February 12, 2015 10:39
@pdf
Copy link
Contributor Author

pdf commented Feb 12, 2015

I left the powerlineclone theme update in a separate commit in case you don't want to take it.

@edkolev
Copy link
Owner

edkolev commented Feb 15, 2015

Supporting boldness is a good feature. However, I suspect supporting boldness may result in issues, due to the powerline symbols - in my experience, terminals don't like displaying these special symbols with bold. So even if we end up supporting boldness, I don't think the default themes should use it (but it will be easy for users to use bold if they would like to).

Terminals typically support setting foreground, background and attributes. Bold is just one of the possible attributes, there are others like reverse, dim, blink, underscore http://wiki.bash-hackers.org/scripting/terminalcodes

Could you modify the PR to handle any attribute (not just bold)? For example, the themes may set [ 1, 2, "bold,underline" ], which would propagate to the prompt as the bold and underline escape codes

Adds an optional field to color definitions, that may be set to a
comma-separated string containing a combination of the following
attributes:

- bright (alias: bold)
- dim
- standout (alias: italic)
- underscore (alias: underline)
- blink
- reverse
- hidden
- strikeout (alias: strikethrough)

When set, the corresponding modifier will be added to the color, to
alter text display on supported terminals.
@pdf
Copy link
Contributor Author

pdf commented Feb 8, 2018

Hello from the future 😉

I have updated the PR to include the following attributes:

  • bright (alias: bold)
  • dim
  • standout (alias: italic)
  • underscore (alias: underline)
  • blink
  • reverse
  • hidden
  • strikeout (alias: strikethrough)

And I've removed the commit modifying the promptlineclone theme as requested (though I have not observed any problem displaying bold separator symbols in a handful of terminals).

Supporting all the other attributes means having to reset them all individually, which is why I never got around to it originally, but I had to re-generate my prompt, so here it is.

@thisishuey
Copy link

Any chance this can be merged? was looking for this functionality myself.

@thisishuey
Copy link

@edkolev what else would be needed to get this PR merged in?

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.

None yet

3 participants