nordtheme / dircolors

An arctic, north-bluish clean and elegant dircolors theme.
https://www.nordtheme.com/ports/dircolors
MIT License
523 stars 104 forks source link

Not working for Ubuntu 20.04 - Alacritty #20

Open mriganktiwari opened 4 years ago

mriganktiwari commented 4 years ago
  1. I downloaded and kept the dir_colors as ~/.dir_colors
  2. Added test -r "~/.dir_colors" && eval $(dircolors ~/.dir_colors) command to the ~/.bashrc and ~/.zshrc both. After sourcing the ls command does not show NORD colors.

Please help.

arcticicestudio commented 4 years ago

Hi @mriganktiwari 👋🏼

This was a known bug and the fix in #19 has been merged yesterday into the master branch. The Nord documentations have also been updated in https://github.com/arcticicestudio/nord-docs/pull/206, but there has been no version released yet so the current website state still mentions the broken install instructions. If you remove the quotes from the loading command it should work fine:

-test -r "~/.dir_colors" && eval $(dircolors ~/.dir_colors)
+test -r ~/.dir_colors && eval $(dircolors ~/.dir_colors
szul commented 3 years ago

Using either:

test -r ~/.dir_colors && eval $(dircolors ~/.dir_colors)

or...

test -r "~/.dir_colors" && eval $(dircolors ~/.dir_colors)

...both yield no results for the standard Gnome Terminal and Tilix. Both applications have the Nord theme installed via the instructions in the ports section for those apps.

The output when running dircolors manually is:

LS_COLORS='no=00:rs=0:fi=00:di=01;34:ln=36:mh=04;36:pi=04;01;36:so=04;33:do=04;01;36:bd=01;33:cd=33:or=31:mi=01;37;41:ex=01;36:su=01;04;37:sg=01;04;37:ca=01;37:tw=01;37;44:ow=01;04;34:st=04;37;44:*.7z=01;32:*.ace=01;32:*.alz=01;32:*.arc=01;32:*.arj=01;32:*.bz=01;32:*.bz2=01;32:*.cab=01;32:*.cpio=01;32:*.deb=01;32:*.dz=01;32:*.ear=01;32:*.gz=01;32:*.jar=01;32:*.lha=01;32:*.lrz=01;32:*.lz=01;32:*.lz4=01;32:*.lzh=01;32:*.lzma=01;32:*.lzo=01;32:*.rar=01;32:*.rpm=01;32:*.rz=01;32:*.sar=01;32:*.t7z=01;32:*.tar=01;32:*.taz=01;32:*.tbz=01;32:*.tbz2=01;32:*.tgz=01;32:*.tlz=01;32:*.txz=01;32:*.tz=01;32:*.tzo=01;32:*.tzst=01;32:*.war=01;32:*.xz=01;32:*.z=01;32:*.Z=01;32:*.zip=01;32:*.zoo=01;32:*.zst=01;32:*.aac=32:*.au=32:*.flac=32:*.m4a=32:*.mid=32:*.midi=32:*.mka=32:*.mp3=32:*.mpa=32:*.mpeg=32:*.mpg=32:*.ogg=32:*.opus=32:*.ra=32:*.wav=32:*.3des=01;35:*.aes=01;35:*.gpg=01;35:*.pgp=01;35:*.doc=32:*.docx=32:*.dot=32:*.odg=32:*.odp=32:*.ods=32:*.odt=32:*.otg=32:*.otp=32:*.ots=32:*.ott=32:*.pdf=32:*.ppt=32:*.pptx=32:*.xls=32:*.xlsx=32:*.app=01;36:*.bat=01;36:*.btm=01;36:*.cmd=01;36:*.com=01;36:*.exe=01;36:*.reg=01;36:*~=02;37:*.bak=02;37:*.BAK=02;37:*.log=02;37:*.log=02;37:*.old=02;37:*.OLD=02;37:*.orig=02;37:*.ORIG=02;37:*.swo=02;37:*.swp=02;37:*.bmp=32:*.cgm=32:*.dl=32:*.dvi=32:*.emf=32:*.eps=32:*.gif=32:*.jpeg=32:*.jpg=32:*.JPG=32:*.mng=32:*.pbm=32:*.pcx=32:*.pgm=32:*.png=32:*.PNG=32:*.ppm=32:*.pps=32:*.ppsx=32:*.ps=32:*.svg=32:*.svgz=32:*.tga=32:*.tif=32:*.tiff=32:*.xbm=32:*.xcf=32:*.xpm=32:*.xwd=32:*.xwd=32:*.yuv=32:*.anx=32:*.asf=32:*.avi=32:*.axv=32:*.flc=32:*.fli=32:*.flv=32:*.gl=32:*.m2v=32:*.m4v=32:*.mkv=32:*.mov=32:*.MOV=32:*.mp4=32:*.mpeg=32:*.mpg=32:*.nuv=32:*.ogm=32:*.ogv=32:*.ogx=32:*.qt=32:*.rm=32:*.rmvb=32:*.swf=32:*.vob=32:*.webm=32:*.wmv=32:';
export LS_COLORS
arcticicestudio commented 3 years ago

Just saw the issue title and remembered that Alacritty uses custom terminfo definitions. To support them the definitions were added in #12, but this change is currently only in master and will be included in the next release version.

@mriganktiwari @szul Can you please follow the Alacritty documentations on how validate if the terminfo definitions are installed and try to apply this theme from the master branch again?

szul commented 3 years ago

I can verify that a source installation of Alacritty based on the instructions in their GitHub repo combined with the dircolors file in this repository and the Nord terminal theme produces the correct color scheme.

Specifically, the following two lines need to be in the dircolors file:

TERM alacritty
TERM alacritty-direct

This is with the following command in the shell start-up script:

test -r ~/.dir_colors && eval $(dircolors ~/.dir_colors)

Note that I follow the instructions of renaming the dircolors file in this repository to .dircolors.

However, this only seems to work for bash and does not work for zsh. If I use the bash shell, the colors appear in both Alacritty and Tilix, but with the zsh, the colors appear in neither.

szul commented 3 years ago

Created PR for zsh issue.

sleepyArpan commented 3 years ago

Any updates on this? I am on Pop_OS! 20.04 and have everything mentioned above in the~/.dir_colors file from the develop branch. Unfortunately the colors dont seem to apply

szul commented 3 years ago

@sleepyArpan Follow my instructions in #21 and you should be good.

For zsh, color does not output to the terminal for ls unless ls --color is used. You can alias the ls command inside your .zshrc file with alias ls='ls --color=auto' to have ls output the colors for each session.

arcticicestudio commented 3 years ago

@mriganktiwari Did the changes from #19 (and passively #12) helped to fix your problem? Otherwise some more details about your setup (shell name/version/config, Alacritty version, …) might help to get some more insights.

@sleepyArpan Can you please read https://github.com/arcticicestudio/nord-dircolors/pull/21#issuecomment-833014527 and check whether you're using GNU or BSD ls. There is also a information box at the top of the Nord dircolors documentation about supported types with more details about the compatibility with commands that support the LSCOLORS environment variable.