nordtheme / dircolors

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

Instruction to uninstall #10

Closed huyvohcmc closed 6 years ago

huyvohcmc commented 6 years ago

My Mac keep the nord colors when ls even though I have deleted the .dir_colors file. How can I uninstall it completely?

arcticicestudio commented 6 years ago

The script only copies the theme file named as .dir_colors to your home directory (~/.dir_colors), it won't create a .dir_colors directory. You can uninstall the theme by just deleting the file.

huyvohcmc commented 6 years ago

@arcticicestudio I updated the comment, please re-open this issue.

arcticicestudio commented 6 years ago

Have you started a new shell session? Otherwise the theme is still loaded in the process memory. Also check the value of the $LSCOLORS environment variable. It might only look like the theme is still used, but maybe the default dircolors definitions are making use of the terminal colors in range 1-15 which are the colors of the Nord terminal theme.

huyvohcmc commented 6 years ago

@arcticicestudio I have started a new session, no luck. echo $LSCOLORS returns Gxfxcxdxbxegedabagacad and I don't know what that is. I also changed the terminal theme to other theme but the dircolors stay the same.

arcticicestudio commented 6 years ago

When there's a $LSCOLORS environment variable I assume it your're running macOS, right? :smile: Unfortunately there's a difference between Apple's BSD ls and GNU ls which is the default on Linux systems. There are many threads, guides, tutorials and issue reports regarding the incompatibility between both and many macOS users switched to GNU ls via homebrew and a shell ls alias to override the default system ls. This difference also applies to dircolors themes (dircolors comes from the Linux coreutils package).

Again, you have to differentiate between this theme, read by the dircolors binary which result is used by ls, and the terminal theme (e.g. Nord iTerm2 or Nord Terminal.app that provides the actual values. The dir_colors file doesn't contain any color values at all (e.g. HEX or RGB(A) color values), but only uses the predefined color palette numbers which are resolved by the terminal theme to the actual color value.

Like I already mentioned, it might only look like the dircolors theme is still active, but this might be related to the fact that the default dircolors theme (stored in the $LSCOLORS envvar) uses almost the same color numbers. Have you tested if the problem still occurs when you set another terminal theme?

There are many resources to help you to fix the problem by just searching for something like "macOS ls dircolors". All I can say for now is that the theme install script only copies the file to ~/.dir_colors, it's just a simple shellscript. There are no other changes neither the terminal or any other shell specific configuration files.