mcfly
mcfly copied to clipboard
Visibility issues in terminals with white background
This is how McFly looks like in a terminal with a white background. This one specifically is the gnome-terminal with Xterm color profile with black and white as foreground and background colors respectively. However, it is very likely that this will happen in almost any theme with a white background color.
The issue seems to be that you are using "color 15" for drawing the foreground text instead of using the foreground color. Here I changed the "color 15" to red in the terminal theme.
Thanks @curusarn. Can an app query for the foreground color and draw using that?
The foreground color is the default. You change to different colors with different escape codes and then there is an escape code for resetting the colors.
From https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html:
8 different colors:
Black: \u001b[30m
Red: \u001b[31m
Green: \u001b[32m
Yellow: \u001b[33m
Blue: \u001b[34m
Magenta: \u001b[35m
Cyan: \u001b[36m
White: \u001b[37m
Reset: \u001b[0m
If you are using a library to color the text then there should be some kind of "default" or "reset" functionality provided by the library.
Does "light mode" not solve this problem? Using the MCFLY_LIGHT environment variable renders text visible on a white background.
MCFLY_LIGHT worked for me. I run a white background and don't see any issues with artifact drawing.
I can reproduce the bug with urxvt and this environment variables:
$ env | grep MCFLY
MCFLY_SESSION_ID=TU1SeEwqMBZgxqaodqjt4aoq
MCFLY_KEY_SCHEME=emacs
MCFLY_LIGHT=TRUE
MCFLY_HISTORY=/tmp/mcfly.3APseccT
Nevertheless, it works well in Emacs vterm:
I have the same problem, because I use terminal with dark theme, but intellij with light. It would be nice to have either a color which is visible with both or use default colors
I have the same problem.
$ env | grep -i mcfly
MCFLY_LIGHT=FALSE
MCFLY_SESSION_ID=0tyrS3WfN8wKhQgyTpfYJkkM
MCFLY_HISTORY=/tmp/mcfly.JGz25H95
MCFLY_HISTORY_FORMAT=zsh-extended
MCFLY_LIGHT=FALSE
sets the light mode anyway. To use it on a dark background you have to remove that variable declaration.
I had same issue, idk why
Had someone solved it?
nevermind I started using fzf..
nevermind I started using fzf..
I gave https://github.com/bnprks/mcfly-fzf a try and it works wonderfully to provide the best of both tools!