cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.9k stars 178 forks source link

Light mode #13

Closed mshron closed 5 years ago

mshron commented 5 years ago

Really enjoying mcfly, thanks for making it!

With the Solarized Light color scheme, all of the un-highlighted suggestions are invisible (see attached images).

screenshot 2018-12-04 10 01 18 screenshot 2018-12-04 10 00 59

If this isn't a priority for you, I'd be happy to hack on it some time.

I poked a bit through interface.rs and settings.rs. From a cursory examination, seems like one way to add a light mode would be for settings.rs to look for an environment variable (MCFLY_LIGHT?) around here, set a bool in settings, and then for menubar() prompt() and results() to act accordingly. Would that be your preferred way of propagating a setting like that?

cantino commented 5 years ago

Glad you like it! Yes, I realized after releasing that I'd only tested on my dark terminals! Oops! πŸ™„It'd be great to have your help on this, and your suggested method is reasonable. Another option would be to variabilize the colors used here, here, and here and allow them to be passed in somehow.

bmhenry commented 5 years ago

Depending on how complicated you want to make this, pointing a variable or a config file towards the output shell script generated by pywal or wpgtk and grabbing the foreground color from that would be an awesome option. I don't think there's any option supported by the majority of terminal emulators for getting the current foreground color, unfortunately.

cantino commented 5 years ago

@mshron, I think we could start with a simple toggle between light and dark mode, like you suggested. Do you want to work on this, or should I do it?

mshron commented 5 years ago

@cantino No preference on my end. If it's not something that you wanted to make a priority, I'd be happy to work on it (probably one evening next week). But if you'd like to do it, definitely don't let me stand in your way!

cantino commented 5 years ago

I'd be a big fan of having you as an OSS contributor, so I'll let you give it a shot. πŸ˜„ If you get stuck or can't find the time, let me know and I'll try to get it done.

mshron commented 5 years ago

πŸ‘ Sounds good to me

mshron commented 5 years ago

Okay, I've got the basic logic working. Now just to figure out a good color scheme πŸ˜„

cantino commented 5 years ago

Nice!

DivineOmega commented 5 years ago

The ability to change theme colours will be great. I've been trying to use mcfly in the default dark terminal that's integrated into PHP Storm, and unfortunately most of the text is not visible at all, making it very difficult to use.

mshron commented 5 years ago

@DivineOmega I don't think the light mode PR will fix your problem, but it might point the way to including a more comprehensive set of color choices.

cantino commented 5 years ago

Merged in https://github.com/cantino/mcfly/commit/5be3eb8ba0122cafb7540c3750bb5ffd3aecbea6 and deployed in 0.3.0, thanks!

cantino commented 5 years ago

@mshron One issue: it looks like we lost the highlight color as you use the arrow keys. I'll try to add it back in.

cantino commented 5 years ago

Fixed in b7edc7db1197f8b32f105aa9504ce4911f5569bb