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

Use colors of the terminal theme. #165

Open
karambaq opened this issue Dec 5, 2017 · 10 comments

Comments

@karambaq
Copy link

commented Dec 5, 2017

Description

I used colorls on other system, and it used the terminal colorscheme to display icons and etc
Screenshot:
tmux

And now I install on other laptop, same terminal colorscheme, same terminal emulator, but is used the other colors
Screenshot:
image

I haven't change nothing on the first system in the config, so maybe I can do that without set colors manual?
Thank you.

@athityakumar

This comment has been minimized.

Copy link
Owner

commented Dec 6, 2017

@karambaq - I don't see any inconsistency in your screenshots. The general color scheme (dark - see this file) provides

directory - blue
recognized file format - green
unrecognized file format- yellow

Simply, the two screenshots have different directory contents - hence, different colors. Let me know if I've missed out something.

@karambaq

This comment has been minimized.

Copy link
Author

commented Dec 6, 2017

Here is the same folder:
image

@athityakumar

This comment has been minimized.

Copy link
Owner

commented Dec 8, 2017

@karambaq - Can you please specify the Ruby versions in both examples? I just faced this - one set of colors (Light-green) with 2.2.7 and another set of colors (Dark-green) with 2.4.2. Weird, maybe something is defined depending on RUBY_VERSION in the rainbow gem. Can you confirm if this is the reason?

@karambaq

This comment has been minimized.

Copy link
Author

commented Dec 8, 2017

@athityakumar
The second system:

ruby --version                                                                                                                                                                             
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]

First unfortunately is removed.

@benjamin-rood

This comment has been minimized.

Copy link

commented Feb 3, 2018

Just my two cents: colorls has never used my term colour scheme. I thought that was a feature... Am I doing something wrong?

I'm using iTerm2 (Build 3.1.5) on macOS, and a mixture of things on Linux (at the moment it's alacritty).

iTerm2 examples:

Dark Background
screen shot 2018-02-03 at 8 46 00 pm

Solarized Light
screen shot 2018-02-03 at 8 46 29 pm

Cobalt Neon
screen shot 2018-02-03 at 8 39 21 pm

Gruvbox
screen shot 2018-02-03 at 8 18 52 pm

base16-grayscale-dark
screen shot 2018-02-03 at 8 25 38 pm

Monotone
screen shot 2018-02-03 at 8 39 09 pm

@sbibauw

This comment has been minimized.

Copy link

commented Feb 27, 2018

If I can contribute to this discussion, I think colorls should, as default behavior, use ANSI color scheme (= Terminal colors) rather than a fixed set of X11 colors.

Meanwhile, I achieved this by following the README custom configuration recommendations:

cp $(dirname $(gem which colorls))/yaml/dark_colors.yaml ~/.config/colorls/dark_colors.yaml

And customizing ~/.config/colorls/dark_colors.yaml with mostly ANSI colors (and X11 gray variations for dimming effects -- but that could very well be replaced by ANSI colors) (feel free to use it and adapt it to your needs):

# Main Colors
unrecognized_file: lightgray
recognized_file:   white
dir:               blue

# Link
dead_link: red
link:      magenta

# Access Modes
write:     yellow
read:      gray
exec:      red
no_access: dimgray

# Age
day_old:     lightgray
hour_old:    white
no_modifier: darkgray

# File Size
file_large:  white
file_medium: lightgray
file_small:  darkgray

# Random
report: white
user:   cyan
tree:   dimgray
empty:  yellow
error:  red
normal: darkgray

# Git
addition:     green
modification: yellow
deletion:     red
untracked:    darkgray
unchanged:    white

screenshot of colorls --tree

@msva

This comment has been minimized.

Copy link

commented Mar 24, 2018

well, the real issue, as far as I understand TS (and it is also what I am missing very much) is that colorls doesn't obey LS_COLORS, and uses it's own "themes".
Also, as second sub-issue, it is impossible (as far as I can see) to set terminal text "effects" like bold, underline, italic, reverse and so on in that custom "themes".

So, since LS_COLORS is already used by ls and have the support for the effects, it will be much more useful to:

  1. support it
  2. use it instead of custom "themes"

Well, actually, there is nothing about git-things in dircolors (which is often used to populate LS_COLORS) source format, as well, as there is nothing about it documented in LS_COLORS format itself, but, anyway, I think the problem is solvable anyway.

Or at least, it will be nice that "themes" at least support something like that:

all: ls_colors
# ^ which would use LS_COLORS content (which already has SHELL-compatible definitions for filetypes (normal, dev-node, symlink, hardlink, broken link and so on) as well as for file extensions)) for al the types that isn't explicitly defined here

# Git
addition:     [chartreuse,bold]
modification: [darkkhaki,underline]
deletion:     [darkred,italic]
untracked:    [darkorange,reverse]
unchanged:    [forestgreen,blink]

# ^ explicitly defined types

(well there is other ANSI text effects existing, and as far as I see, rainbow gem do support them).
And it will also be cool that theming engine (wrapper around rainbow) doesn't force to use ANSI/X11 color names, but also allow hex-rgb colors, and also ANSI codes (like in LS_COLORS too)

@chwba chwba referenced this issue Oct 6, 2018
1 of 5 tasks complete
@harmnot

This comment has been minimized.

Copy link

commented Oct 24, 2018

about cp $(dirname $(gem which colorls))/yaml/dark_colors.yaml ~/.config/colorls/dark_colors.yaml

is this run. on terminal or add on ~/.zshrc ???

I tried to find file ~/.config/colors, but not found

@avdv

This comment has been minimized.

Copy link
Collaborator

commented Oct 24, 2018

@harmnot

This comment has been minimized.

Copy link

commented Oct 24, 2018

by the way I got error on terminal no such file or directory: /tab_complete.sh
on my. file .zshrc ? but my colonels worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.