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 custom theming #69

Merged
merged 5 commits into from
Feb 17, 2021
Merged

add custom theming #69

merged 5 commits into from
Feb 17, 2021

Conversation

tarkah
Copy link
Owner

@tarkah tarkah commented Feb 17, 2021

partially resolves #65

@tarkah
Copy link
Owner Author

tarkah commented Feb 17, 2021

@miraclx @rafi Check out this PR. I've added the ability to specify a custom theme in the config file. If no theme is found, it'll default to your terminal colors no different than before. Here are my colors, try adding the following.

background is an optional color that you can define. If left commented, it'll use your terminal background color. The reason for this is I can't set the actual terminal background color, just the terminal buffer I have access to. Some terminals have some padding and that padding remains the original terminal background. See this example screenshot, where my terminal background is light, but I'm specifying background in this theme config:

image

So it is preferable that you don't use the background color, unless your terminal doesn't have any padding anywhere that's visible when entering tickrs alternate screen

theme:
  #background: "#403E41"
  foreground_inactive: "#727072"
  profit: "#ADD977"
  loss: "#FA648A"
  text_normal: "#FCFCFA"
  text_primary: "#FFDA65"
  text_secondary: "#79DBEA"
  border_primary: "#FC9766"
  border_secondary: "#FCFCFA"
  border_axis: "#FC9766"
  highlight_focused: "#FC9766"
  highlight_unfocused: "#727072"

@tarkah
Copy link
Owner Author

tarkah commented Feb 17, 2021

Also, I tried not to go overboard on the number of color options. I think most of them make sense, but I'm open to suggestions on changing the names / configuration.

Copy link
Contributor

@miraclx miraclx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pointing out some visual differences in the defaults

src/widget/stock_summary.rs Show resolved Hide resolved
src/widget/stock_summary.rs Show resolved Hide resolved
@tarkah
Copy link
Owner Author

tarkah commented Feb 17, 2021

Ahh good catches. My theme had Cyan and LightCyan the same, so I never noticed this difference.

I don't really see the need to have 2 slight variations of the same color, especially now as it'd be an additional theme color that needs to be specified.

@miraclx
Copy link
Contributor

miraclx commented Feb 17, 2021

I agree though, best to keep things simple yet configurable. In a sense, the color standardization actually looks better.

@tarkah tarkah merged commit 8a084df into master Feb 17, 2021
@tarkah tarkah deleted the feat/custom-theming branch February 17, 2021 18:50
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.

Custom theming and keybinds
2 participants