Comments (11)
Is the environment variable MICRO_TRUECOLOR=1
set?
from micro.
MICRO_TRUECOLOR=1
No. I just tried to enable it and it doesn't have any influence... And it also doesn't affect gnome-terminal
that works without this bug
from micro.
I do not know much about terminals but I think another color was used because 24-bit color was disabled. The 8th color (regular7
in foot) is usually white in terminal themes so it will probably be a color that looks like the default one if not set.
24-bit color was probably disabled because foot is not in the terminfo database in micro, but I think other programs usually use the system database. There is an isuse about the terminfo database being included: #2543
I tried reading "TRUECOLOR" section in the manpage of foot and I do not know if the terminfo entries have to be used, but I think it is related. 24-bit colors is just disabled if MICRO_TRUECOLOR
is not 1
so nothing would change when setting it but I think it will probably be enabled when setting TERM
environment variable with xterm-truecolor
:
micro/internal/screen/screen.go
Lines 144 to 149 in 2d82362
from micro.
So you mean to try: MICRO_TRUECOLOR=1
with TERM=xterm-truecolor
? I just tried it and it didn't help. Tell you more, COLORTERM=truecolor
was at the same time
from micro.
But i just found one fun thing. TERM=xterm-truecolor
as like TERM=xterm-256color
gives bug but TERM=xterm-color
works normally.
EDIT: it looked like it is without bug. Just because I opened plain micro and saw white as expected... What is wrong? Idk I can say that colors are loosed but not more before further research
P.S Happy New Year
from micro.
Sorry, I realized there is probably something wrong with what I thought about MICRO_TRUECOLOR
but it is late here so I cannot check again and explain properly at this time. I think it would at least be surprising if 24-bit color is enabled when TERM
is xterm-color
even though MICRO_TRUECOLOR
is not 1
, but I still have not checked.
Happy new year also.
from micro.
No, I was only thinking about trying to run with TERM=xterm-truecolor
but I realized MICRO_TRUECOLOR
has to be 1
. I was also wrong about terminfo.
I did not say that I thought the included terminfo database only is used, but entries in files are also used so the entries of foot are used. I do not think TERM
usually has to be changed because COLORTERM
(not manually set) only is probably checked when it is being checked if 24-bit color is supported.
MICRO_TRUECOLOR
has to be 1
when enabling it but I do not know why it was disabled when you set it and I think it is weird. I tried looking at the manpage of foot and I think TERM
can tried being set as foot-direct
so that it will be enabled.
I have not used Wayland before so I tried copying the terminfo entry of foot in Debian 12 and using a terminal emulator where 24-bit color is enabled, but it was enabled when MICRO_TRUECOLOR
is 1
and TERM
is foot
. I used another terminal emulator so it was just bugged when TERM
is foot-direct
.
I think this script can be used when testing and changing TERM
. MICRO_TRUECOLOR
is set as 1
when arguments are passed.
#!/bin/sh
set -u -e
[ $# -gt 0 ] && export MICRO_TRUECOLOR=1
echo "COLORTERM ${COLORTERM:--} MICRO_TRUECOLOR ${MICRO_TRUECOLOR:--}"
# opening micro takes a while when using other terminal emulators and
# TERM is foot-direct, not tested
for t in xterm xterm-color xterm-256color xterm-truecolor foot; do
printf %s $t
read _
TERM=$t micro -colorscheme monokai
done
This is what it was like when I used the terminal emulator I was using:
https://github.com/zyedidia/micro/assets/127052329/0e285b64-d3cc-45fb-a8d9-4008c3586af3
I apologize that what I have said was confusing and that I was not able to answer properly.
from micro.
I tried testing using foot and GNOME Terminal in Debian 12 but 24-bit color was only enabled when I set MICRO_TRUECOLOR
as 1
and ran micro even if I did not do something else. I do not know how did you set it but I think the variable was not exported when running micro probably because MICRO_TRUECOLOR=1
only was entered in a line when you were setting it in the shell.
The variable can be set like this when running micro:
MICRO_TRUECOLOR=1 micro
micro # running again, variable is not set
The variable can also be set and exported in another line like this so that it will be set when it is not set in a command:
export MICRO_TRUECOLOR=1
micro
from micro.
You are right it wasn't exported. My habit is to put ;
between commands usually gives me problems with variable exporting. It usually happens like export ; command
. "Hmm it didn't work I should try two lines form (without export). Hmm it also didn't work so the variable doesn't work."
Foot works as expected when the MICRO_TRUECOLOR
is 1
but it is still strange that it doesn't work without it because gnome terminal works normally
from micro.
24-bit color is disabled when MICRO_TRUECOLOR
is not 1
even when using GNOME Terminal but the colors in monokai
in micro and the default color scheme in GNOME Terminal (Tango) are similar so it can look like it is enabled. I used LMDE 6 when testing but packages are based on the packages in Debian 12 so I think there is at least not much differences.
It can be seen in this video that the colors are different when MICRO_TRUECOLOR
is not 1
:
simplescreenrecorder-2024-02-04_21.19.45.mp4
from micro.
Yeah. It is correct. I just changed the color in gnome terminal and so that micro uses it as like in foot. Thanks!
from micro.
Related Issues (20)
- Micro 2.0.13 (Windows only) crashes when selecting a directory with "open" HOT 1
- IsWhitespace from util package not working HOT 6
- Alt-Shift-Left or Alt-Shift-Right are not recognized desipte getting detected in raw HOT 2
- Disable micro auto formatting bindings.json when adding new bindings HOT 1
- Garbled contents when reloading file with DOS line endings HOT 8
- Inconsistent keybindings behavior for Alt Shift Combinations HOT 4
- file manager plugin .. go up not work HOT 2
- Feature Request: Editor Width/Margins HOT 2
- JumpToMatchingBrace inconsistent with adjacent unpaired braces e.g. )[ or }( or )( HOT 12
- disable error HOT 2
- Confusion over missing bindings
- Differing copy-paste mechanics between tmux and non-tmux HOT 1
- Calling clipboard.Write in lua crashes micro HOT 6
- 2.0.13 micro-2.0.13-linux-arm.tar.gz may have been tampered with HOT 12
- Micro panics when cd-ing to root
- How to toggle softwrap + wordwrap in editor, and how to make it a default setting? HOT 2
- Colors in Color Schems appear wrong. HOT 2
- DeleteLine does not delete selected lines HOT 8
- Micro reindents settings.json files with spaces on open HOT 1
- Nightly builds are not the current master branch 😭 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micro.