|
| 1 | +import Link from "atoms/core/Link"; |
| 2 | +import { Banner, Image, ShrinkedWidth, SpaceBox } from "atoms/core/mdx-elements"; |
| 3 | +import { Code } from "atoms/core/html-elements"; |
| 4 | +import { ReactComponent as DataNodesSSD } from "assets/images/illustrations/data-nodes-ssd.svg"; |
| 5 | +import { ROUTE_DOCS_PORTS_DIRCOLORS_INSTALLATION } from "config/routes/mappings"; |
| 6 | + |
| 7 | +import WIPNotice from "../../../../shared/docs/wip-notice"; |
| 8 | + |
| 9 | +export const frontmatter = { |
| 10 | + title: "Type Support", |
| 11 | + subline: |
| 12 | + "Learn about the wide range of supported data and node types — From symbolic links, executables up to file system permissions." |
| 13 | +}; |
| 14 | + |
| 15 | +<ShrinkedWidth value={25}> |
| 16 | + |
| 17 | +<SpaceBox mTop={4} mBottom={4}> |
| 18 | + <DataNodesSSD /> |
| 19 | +</SpaceBox> |
| 20 | + |
| 21 | +</ShrinkedWidth> |
| 22 | + |
| 23 | +<ShrinkedWidth value={80}> |
| 24 | + |
| 25 | +<WIPNotice /> |
| 26 | + |
| 27 | +<Banner |
| 28 | + title={ |
| 29 | + <> |
| 30 | + This theme is only compatible for <Link href="https://en.wikipedia.org/wiki/Ls">GNU <Code>ls</Code></Link> and will have no effect with commands from other distributions like BSD (macOS) or Slackware! |
| 31 | + </> |
| 32 | + } |
| 33 | + variant="warn" |
| 34 | +> |
| 35 | + |
| 36 | +[dircolors][gnu-docs-dircolors] is a utility that sets the `LS_COLORS` environment variable respected by [GNU `ls`][wiki-ls] when used with the `--color` option. It converts the _color database file_ provided by this theme (`dir_colors`), converts it into the parsable format for the GNU `ls` command and stores it in the `LS_COLOR` environment variable. |
| 37 | + |
| 38 | +Other distributions/platforms/operating systems like [macOS][wiki-macos] are based on [BSD][wiki-bsd] and using a different implementation of the `ls` command that uses a different format for color definitions stored in the `LSCOLOR` environment variable (no underscore). |
| 39 | + |
| 40 | +The `dircolors` utility only supports GNU `ls` and therefore this theme is also only compatible with the GNU `ls` command. It has no effect when used with different implementations. |
| 41 | + |
| 42 | +Please read the [manual pages of the `dircolors(1)` utility][linux-man-dircolors] and it's [configuration file `dir_colors(5)`][linux-man-dir_colors] for more information about supported terminal codes/sequences and platforms. |
| 43 | + |
| 44 | +</Banner> |
| 45 | + |
| 46 | +Nord dircolors provides highlighting for a lot of different data types, their attributes and file system permissions. This document contains a general overview of these types including descriptions about their applied Nord styles. |
| 47 | + |
| 48 | +<Image |
| 49 | + alt="Screenshot showing an overview of various file and node types colorized by Nord" |
| 50 | + dropShadow |
| 51 | + fluid={props.images["overview.png"]} |
| 52 | + rounded |
| 53 | +> |
| 54 | + <span>Overview of various file and node types colorized by Nord.</span> |
| 55 | +</Image> |
| 56 | + |
| 57 | +## Global Defaults |
| 58 | + |
| 59 | +The following styles are applied globally to essential data and node types as well as their file system permissions. |
| 60 | + |
| 61 | +### Permissions |
| 62 | + |
| 63 | +The styles are applied for files and directories with different [file system permissions][wiki-fs_perm]. |
| 64 | + |
| 65 | +Directories using `nord9` as foreground color and a `bold` font style. |
| 66 | +If the `t` permission flag is set the background color is `nord9` instead while `nord4` is used as foreground color using the `underline` font style. Also if the `o+w` permission flags are set too the font uses the `bold` style instead. |
| 67 | + |
| 68 | +For directories with the `777` permission value both the `bold` and `underline` font styles are used. |
| 69 | + |
| 70 | +<Image |
| 71 | + alt="Screenshot showing directories with different file system permissions" |
| 72 | + dropShadow |
| 73 | + fluid={props.images["permissions.png"]} |
| 74 | + rounded |
| 75 | +> |
| 76 | + <span> |
| 77 | + Directories with different{" "} |
| 78 | + <Link href="https://en.wikipedia.org/wiki/File_system_permissions">file system permissions</Link>. |
| 79 | + </span> |
| 80 | +</Image> |
| 81 | + |
| 82 | +### Links |
| 83 | + |
| 84 | +The styles are applied for [symbolic][wiki-symlink] and [hard][wiki-hardlink] links using `nord8` as foreground color. Hard links additionally have a `underline` font style. |
| 85 | + |
| 86 | +The foreground color of invalid symbolic links are colored by `nord11` while non-existent link targets using `nord11` as background color and `nord4` foreground with `bold` font styles. |
| 87 | + |
| 88 | +<Image alt="Screenshot showing symbolic and hard links" dropShadow fluid={props.images["links.png"]} rounded> |
| 89 | + <span> |
| 90 | + Different link types like <Link href="https://en.wikipedia.org/wiki/Symbolic_link">symbolic</Link> and{" "} |
| 91 | + <Link href="https://en.wikipedia.org/wiki/Hard_link">hard</Link> links. |
| 92 | + </span> |
| 93 | +</Image> |
| 94 | + |
| 95 | +### Executables |
| 96 | + |
| 97 | +The styles are applied for [executables][wiki-exec] using `nord7` as foreground color with a `bold` font style. |
| 98 | + |
| 99 | +<Image alt="Screenshot showing executable files" dropShadow fluid={props.images["executables.png"]} rounded> |
| 100 | + <span> |
| 101 | + <Link href="https://en.wikipedia.org/wiki/Executable">Executables</Link> are recognizable at a glance. |
| 102 | + </span> |
| 103 | +</Image> |
| 104 | + |
| 105 | +### Blocks and Sockets |
| 106 | + |
| 107 | +The styles are applied for [Unix file types][wiki-unix_ft] like [device files][wiki-dev_file] and [domain sockets][wiki-unix_sock]. |
| 108 | + |
| 109 | +Character device files are using `nord13` as foreground while block devices additionally having the `bold` font style. Sockets are also colored by `nord13` with a the `underline` font style. |
| 110 | + |
| 111 | +<Image |
| 112 | + alt="Screenshot showing various Unix file types" |
| 113 | + dropShadow |
| 114 | + fluid={props.images["blocks-and-sockets.png"]} |
| 115 | + rounded |
| 116 | +> |
| 117 | + Various <Link href="https://en.wikipedia.org/wiki/Unix_file_types">Unix file types</Link> like{" "} |
| 118 | + <Link href="https://en.wikipedia.org/wiki/Device_file">device files</Link> and{" "} |
| 119 | + <Link href="https://en.wikipedia.org/wiki/Unix_domain_socket">domain sockets</Link>. |
| 120 | +</Image> |
| 121 | + |
| 122 | +### Capabilities |
| 123 | + |
| 124 | +The styles are applied for files with different [capabilities][wiki-setuid]. |
| 125 | + |
| 126 | +The GID `g+s` and UID `u+s` capability flags are colored by `nord4` with the `bold` and `underline` font styles. |
| 127 | + |
| 128 | +<Image |
| 129 | + alt="Screenshot showing files with different capabilities" |
| 130 | + dropShadow |
| 131 | + fluid={props.images["capabilities.png"]} |
| 132 | + rounded |
| 133 | +> |
| 134 | + <Link href="https://en.wikipedia.org/wiki/Setuid">Capabilities</Link> are also styled to be more prominent. |
| 135 | +</Image> |
| 136 | + |
| 137 | +### Named Pipe (FIFO) |
| 138 | + |
| 139 | +The styles are applied for [named pipe][wiki-named_pipe], also known as FIFO, using `nord7` as foreground color with the `underline` font style. |
| 140 | + |
| 141 | +<Image |
| 142 | + alt="Screenshot showing a named pipe also know as FIFO" |
| 143 | + dropShadow |
| 144 | + fluid={props.images["named_pipes.png"]} |
| 145 | + rounded |
| 146 | +> |
| 147 | + A <Link href="https://en.wikipedia.org/wiki/Named_pipe">named pipe</Link> also know as FIFO. |
| 148 | +</Image> |
| 149 | + |
| 150 | +## Extension Pattern |
| 151 | + |
| 152 | +The following styles are for files with specific file extensions. |
| 153 | + |
| 154 | +### Media |
| 155 | + |
| 156 | +Extension for media based types like images, audio, videos and documents are colored by `nord14` while archive- and compression types additionally using the `bold` font style. |
| 157 | + |
| 158 | +<Image |
| 159 | + alt="Screenshot showing file extensions for multimedia files" |
| 160 | + dropShadow |
| 161 | + fluid={props.images["extension-pattern-media.png"]} |
| 162 | + rounded |
| 163 | +> |
| 164 | + Common file extensions like multimedia files. |
| 165 | +</Image> |
| 166 | + |
| 167 | +### Ignore Pattern |
| 168 | + |
| 169 | +Extensions for common [VCS][wiki-vcs] ignore pattern using the `dim` terminal effect applied to `nord4`. |
| 170 | + |
| 171 | +<Image |
| 172 | + alt="Screenshot showing ignore pattern files" |
| 173 | + dropShadow |
| 174 | + fluid={props.images["extension-pattern-ignore.png"]} |
| 175 | + rounded |
| 176 | +> |
| 177 | + Common VSC ignore pattern files. |
| 178 | +</Image> |
| 179 | + |
| 180 | +</ShrinkedWidth> |
| 181 | + |
| 182 | +[gnu-docs-dircolors]: https://www.gnu.org/software/coreutils/manual/html_node/dircolors-invocation.html |
| 183 | +[linux-man-dir_colors]: https://linux.die.net/man/5/dir_colors |
| 184 | +[linux-man-dircolors]: https://linux.die.net/man/1/dircolors |
| 185 | +[wiki-bsd]: https://en.wikipedia.org/wiki/Berkeley_Software_Distribution |
| 186 | +[wiki-ls]: https://en.wikipedia.org/wiki/Ls |
| 187 | +[wiki-macos]: https://en.wikipedia.org/wiki/MacOS |
| 188 | +[wiki-symlink]: https://en.wikipedia.org/wiki/Symbolic_link |
| 189 | +[wiki-hardlink]: https://en.wikipedia.org/wiki/Hard_link |
| 190 | +[wiki-fs_perm]: https://en.wikipedia.org/wiki/File_system_permissions |
| 191 | +[wiki-exec]: https://en.wikipedia.org/wiki/Executable |
| 192 | +[wiki-unix_ft]: https://en.wikipedia.org/wiki/Unix_file_types |
| 193 | +[wiki-dev_file]: https://en.wikipedia.org/wiki/Device_file |
| 194 | +[wiki-unix_sock]: https://en.wikipedia.org/wiki/Unix_domain_socket |
| 195 | +[wiki-setuid]: https://en.wikipedia.org/wiki/Setuid |
| 196 | +[wiki-named_pipe]: https://en.wikipedia.org/wiki/Named_pipe |
| 197 | +[wiki-vcs]: https://en.wikipedia.org/wiki/Version_control |
0 commit comments