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

Themes behaves differently with TERM=xterm-256color #3626

Closed
mc-butler opened this issue Mar 28, 2016 · 11 comments
Closed

Themes behaves differently with TERM=xterm-256color #3626

mc-butler opened this issue Mar 28, 2016 · 11 comments
Labels
area: skin Theming support and skin files prio: low Minor problem or easily worked around

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3626
Reporter eugenesan (eugenesan@….com)

Themes behaves differently with TERM=xterm-256color.
For example folders and execuables are not displayed using bold.

Starting with "TERM=xterm mc" solves the problem.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 28, 2016 at 17:08 UTC (comment 1)

  • Milestone changed from 4.8.17 to Future Releases
  • Component changed from mc-core to mc-skin

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Mar 28, 2016 at 21:46 UTC (comment 2)

I too don't like this behavior (it's by design (#2169), not a bug), which is why I'm not using xterm-256color.

In modern distros (at least Ubuntu) TERM is "xterm-256color" by default. Add to this the fact that prevalent terminal palettes don't have enough contrast between "white" and "lightgrey" (or is it "grey") and you get a usability problem "out of the box".

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Mar 29, 2016 at 20:38 UTC (comment 3)

Is it not a rendering bug in the terminal emulator? I use vte and my TERM is xterm-256color, and with Droid fonts, which have a real (not faux) bold versions the directories are correctly rendered bold.

@mc-butler
Copy link
Author

Changed by eugenesan (eugenesan@….com) on Mar 29, 2016 at 23:09 UTC (comment 4)

According to original 256c support commit, referenced by @mooffie, lack of bold is an intended behavior. Unfortunately original commiter mistakenly assumed that everybody treat colors the same and that was a strategic mistake.
Just so you know, some people (up to 10%) and especially IT/SW people, have troubles with colors or don't see them at all (sad statistics). Now add to that hours of monitoring tiny and promptly changing characters and we have usability problem "out of the box"! [(c)Mooffie]

@zaytsev, regarding the Droid font.
I couldn't test it on Ubuntu 16.04 since it was removed but when tested on Ubuntu 14.04 in Gnome-Terminal, the problem is the same.

As a quick and simple solution, I suggest disabling 256c mode unless current theme does declare support for it. Fortunately we have "[skin]::256colors = true" for that.

What do you think?

@mc-butler
Copy link
Author

Changed by zaytsev-work (@zyv) on Mar 30, 2016 at 7:24 UTC

@mc-butler
Copy link
Author

Changed by zaytsev-work (@zyv) on Mar 30, 2016 at 7:30 UTC (comment 5)

@eugenesan, I've just attached a screenshot of mc under Ubuntu 14.04 with the default (Ubuntu) fonts, TERM=xterm-256color and modarin256-defbg skin in gnome-terminal (vte). Can you explain me what's wrong here? The directories are as bold as it gets.

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Mar 30, 2016 at 9:51 UTC (comment 5.6)

Replying to zaytsev-work:

@eugenesan, I've just attached a screenshot of mc under Ubuntu 14.04 with the default (Ubuntu) fonts, TERM=xterm-256color and modarin256-defbg skin in gnome-terminal (vte). Can you explain me what's wrong here? The directories are as bold as it gets.


That's because 'skins/modarin256-defbg.ini' has:

[filehighlight]
    directory = color144;;bold

Note the ";bold".

Most other skins, notably the default one (skins/default.ini), don't specify ";bold" explicitly and therefore aren't displaying bold in 256 mode.

What @eugenesan suggests is to have, as in the old days, the 8 high-intensity colors ("white", "brightgreen", "brightred", "yellow", ...) be bold by default when not using a 256 colors skin, at least. (I say "at least" because people may want to have them bold even when a 256 skin is active: because of the editor syntax files, or because they simply prefer bold.)

(For the record: one solution that doesn't involve coding is to to add ";bold" explicitly to all "directory=" lines. But we use high-intensity colors in other places too ("executable=", syntax files).)

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Mar 30, 2016 at 10:37 UTC (comment 2.7)

I'm attaching a screenshot that shows what a new user sees on Lubuntu (a sort of Ubuntu). That's gnome-terminal. Note how (when in 256 colors, default skin) it's not easy to distinguish between directories and normal files.

Replying to mooffie:

In modern distros (at least Ubuntu) TERM is "xterm-256color" by default.

(I now see that setting TERM to "xterm-256color" is, probably, the work of gnome-terminal itself.)

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Mar 30, 2016 at 10:40 UTC

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Apr 4, 2016 at 9:19 UTC (comment 8)

Dup of #3048.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Apr 4, 2016 at 9:59 UTC (comment 9)

  • Status changed from new to closed
  • Resolution set to duplicate
  • Milestone Future Releases deleted

Closed as duplicate of #3048.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: skin Theming support and skin files prio: low Minor problem or easily worked around
Development

No branches or pull requests

1 participant