docs(readme): show the bar as a screenshot and write icons as escape sequences
- commit
- 5b114e947ea27124106d2a5bf5d31737f53a1d15
- author
- brice · · 2026-10-05 15:04 UTC
- parent
- 1753172
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
2 files · +6 -6
M README.md +6 -6
| @@ -4,9 +4,7 @@ A dead simple status bar for Wayland: **one line of terminal text, nothing else. | |||
| 4 | 4 | ||
| 5 | 5 | Each part of the bar is a script. A script prints text, and neferbar shows it. If you can write `echo`, you can write a module. | |
| 6 | 6 | ||
| 7 | - | ``` | |
| 8 | - | workspace 2 firefox 14:32:07 cpu 12% vol 40% bat 88% | |
| 9 | - | ``` | |
| 7 | + |  | |
| 10 | 8 | ||
| 11 | 9 | - **Text only.** ASCII, Unicode and Nerd Font icons. No images, no widgets, no clicks. | |
| 12 | 10 | - **Exactly one character high.** The bar is as tall as a terminal row, and it follows your monitor's scale. | |
| @@ -117,13 +115,15 @@ Italic, bold and bold italic use the font's own files when it has them. | |||
| 117 | 115 | ||
| 118 | 116 | ### Icons | |
| 119 | 117 | ||
| 120 | - | Nerd Font icons are ordinary characters. Print them from a script with their UTF-8 bytes: | |
| 118 | + | Nerd Font icons are ordinary characters, but GitHub cannot draw them in a code block, so the examples here write them as escape sequences. Give `printf` the icon's code point: | |
| 121 | 119 | ||
| 122 | 120 | ```sh | |
| 123 | - | printf '\357\200\227 %s\n' "$(date +%H:%M)" # clock icon | |
| 121 | + | printf '\Uf017 %s\n' "$(date +%H:%M)" # clock icon (U+F017) | |
| 124 | 122 | ``` | |
| 125 | 123 | ||
| 126 | - | Find icon codes at <https://www.nerdfonts.com/cheat-sheet>. | |
| 124 | + | `\U` works in bash. Some minimal shells do not support it; the UTF-8 bytes work everywhere: `printf '\357\200\227 %s\n' "$(date +%H:%M)"`. | |
| 125 | + | ||
| 126 | + | Find icon names and code points at <https://www.nerdfonts.com/cheat-sheet>. In an editor with a Nerd Font you can also paste the icon itself into the script. | |
| 127 | 127 | ||
| 128 | 128 | ### Animation | |
| 129 | 129 | ||
| @@ -4,9 +4,7 @@ A dead simple status bar for Wayland: **one line of terminal text, nothing else. | |||||
| 4 | 4 | ||||
| 5 | Each part of the bar is a script. A script prints text, and neferbar shows it. If you can write `echo`, you can write a module. | 5 | Each part of the bar is a script. A script prints text, and neferbar shows it. If you can write `echo`, you can write a module. | ||
| 6 | 6 | ||||
| 7 | - | ``` | 7 | + |  |
| 8 | - | workspace 2 firefox 14:32:07 cpu 12% vol 40% bat 88% | |||
| 9 | - | ``` | |||
| 10 | 8 | ||||
| 11 | - **Text only.** ASCII, Unicode and Nerd Font icons. No images, no widgets, no clicks. | 9 | - **Text only.** ASCII, Unicode and Nerd Font icons. No images, no widgets, no clicks. | ||
| 12 | - **Exactly one character high.** The bar is as tall as a terminal row, and it follows your monitor's scale. | 10 | - **Exactly one character high.** The bar is as tall as a terminal row, and it follows your monitor's scale. | ||
| @@ -117,13 +115,15 @@ Italic, bold and bold italic use the font's own files when it has them. | |||||
| 117 | 115 | ||||
| 118 | ### Icons | 116 | ### Icons | ||
| 119 | 117 | ||||
| 120 | - | Nerd Font icons are ordinary characters. Print them from a script with their UTF-8 bytes: | 118 | + | Nerd Font icons are ordinary characters, but GitHub cannot draw them in a code block, so the examples here write them as escape sequences. Give `printf` the icon's code point: |
| 121 | 119 | ||||
| 122 | ```sh | 120 | ```sh | ||
| 123 | - | printf '\357\200\227 %s\n' "$(date +%H:%M)" # clock icon | 121 | + | printf '\Uf017 %s\n' "$(date +%H:%M)" # clock icon (U+F017) |
| 124 | ``` | 122 | ``` | ||
| 125 | 123 | ||||
| 126 | - | Find icon codes at <https://www.nerdfonts.com/cheat-sheet>. | 124 | + | `\U` works in bash. Some minimal shells do not support it; the UTF-8 bytes work everywhere: `printf '\357\200\227 %s\n' "$(date +%H:%M)"`. |
| 125 | + | ||||
| 126 | + | Find icon names and code points at <https://www.nerdfonts.com/cheat-sheet>. In an editor with a Nerd Font you can also paste the icon itself into the script. | |||
| 127 | 127 | ||||
| 128 | ### Animation | 128 | ### Animation | ||
| 129 | 129 | ||||
A docs/img/bar.png +0 -0 binary file: no text diff
binary file: no text diff