paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1d992ef86d26432ddd23c84c1c34bff1311628d6
parent c71aa37095f797531c6483b844b6cee97c657e25
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Wed,  5 Aug 2020 20:09:08 -0400

Publish new blog post

Diffstat:
Mpages/blog.md | 1+
Dpages/blog/use-st-term-variable.md | 45---------------------------------------------
Apages/blog/use-xterm-256color-with-alacritty.md | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpages/home.md | 4++--
Mpublic/feeds/sitewide-feed.xml | 26++++++++++++++++++++++++++
Apublic/img/ls-highlights.png | 0
Apublic/img/ls-no-highlights.png | 0
Mpublic/sitemap.xml | 1+
8 files changed, 85 insertions(+), 47 deletions(-)

diff --git a/pages/blog.md b/pages/blog.md @@ -27,6 +27,7 @@ href="https://pleroma.paritybit.ca/jbauer">Pleroma</a>. ### 2020 <ul> + <li>2020-08-05 <a href="blog/use-xterm-256color-with-alacritty">Use xterm-256color With Alacritty For Better ls Output</a></li> <li>2020-08-03 <a href="blog/my-journey-with-computers">My Journey With Computers</a></li> <li>2020-08-02 <a href="blog/vortex-vibe-keyboard">The Vortex ViBE Mechanical Keyboard</a></li> <li>2020-07-29 <a href="blog/my-git-server-was-ddosed">My Git Server Was DDoSed</a></li> diff --git a/pages/blog/use-st-term-variable.md b/pages/blog/use-st-term-variable.md @@ -1,45 +0,0 @@ -## Use TERM=st-256color For Better ls Output - -[//]: # "META_TEXT" - -[//]: # "main.min.css" - -[//]: # - -<div class="byline"> -<b>Written By:</b> Jake Bauer | - <b>Posted:</b> [DATE] | - <b>Last Updated:</b> [DATE] -</div> - -In [switching to alacritty](/blog/switching-to-alacritty.md), I noticed -something off about my `ls` output. Previously, when I was using st, ls would -highlight different files in different colours. For example, image files would -be bold and purple and other files like `.deb.` or `.zip` files would be bold -and red. Here is an example: - -<figure> - <a href="/img/ls-highlights.png"><img src="/img/ls-highlights.png" alt="A - screenshot of a terminal where ls shows pictures highlighted in purple and - .zip files in red."/></a> -</figure> - -As opposed to the default: - -<figure> - <a href="/img/ls-highlights.png"><img src="/img/ls-highlights.png" alt="A - screenshot of a terminal where ls shows pictures highlighted in purple and - .zip files in red."/></a> -</figure> - -Which is what you get if you use a `TERM` variable set to `alacritty` or -`xterm-256color` in your `alacritty.yml`. Since changing that variable in my -`alacritty.yml` file to `st-256color`, the highlights have returned. - -Also, [Alacritty 5.0 is out](https://github.com/alacritty/alacritty/releases) -which includes a new Vi mode! - -_This is my eighty-fifth post for the -[#100DaysToOffload](https://social.paritybit.ca/tags/100DaysToOffload) -challenge. You can learn more about this challenge over at -[https://100daystooffload.com](https://100daystooffload.com)._ diff --git a/pages/blog/use-xterm-256color-with-alacritty.md b/pages/blog/use-xterm-256color-with-alacritty.md @@ -0,0 +1,55 @@ +## Use xterm-256color With Alacritty For Better ls Output + +[//]: # "Solving a little quirk I came across when using Alacritty with its default TERM variable 'alacritty' when 'xterm-256color' is set in .profile." + +[//]: # "main.min.css" + +[//]: # + +<div class="byline"> +<b>Written By:</b> Jake Bauer | + <b>Posted:</b> 2020-08-05 | + <b>Last Updated:</b> 2020-08-05 +</div> + +In [switching to +alacritty](https://www.paritybit.ca/blog/switching-to-alacritty), I noticed +something off about my `ls` output. Previously, when I was using st, ls would +highlight different files in different colours. For example, image files would +be bold and purple and other files like `.deb.` or `.zip` files would be bold +and red. Here is an example: + +<figure> + <a href="/img/ls-highlights.png"><img src="/img/ls-highlights.png" alt="A + screenshot of a terminal where ls shows media files highlighted in purple + and .deb files in red."/></a> +</figure> + +As opposed to what I was encountering: + +<figure> + <a href="/img/ls-no-highlights.png"><img src="/img/ls-no-highlights.png" alt="A + screenshot of a terminal where ls shows every non-folder and non-executable + with default colours (i.e. non-bold white)"/></a> +</figure> + +Which is what you get if you use a `TERM` variable set to `alacritty` in your +`alacritty.yml` while you have another `TERM` variable set in `.profile`. Since +changing that variable in my `alacritty.yml` file to `xterm-256color` and +removing it entirely from my `.profile`, the highlights have returned. + +It would seem that the terminfo for alacritty is not in the default +installations for any of the systems I use (Debian and OpenBSD, at the moment) +nor is it included in the `.deb` package I grabbed from their GitHub releases +page. Therefore, setting the `TERM` variable to `alacritty` in `alacritty.yml` +without having anything in `.profile` actually results in an almost completely +broken terminal experience where there are no colours by default and SSH +sessions do not behave well unless I `export TERM=xterm-256color` beforehand. + +Also, [Alacritty 5.0 is out](https://github.com/alacritty/alacritty/releases) +which includes a new Vi mode! + +_This is my eighty-fifth post for the +[#100DaysToOffload](https://social.paritybit.ca/tags/100DaysToOffload) +challenge. You can learn more about this challenge over at +[https://100daystooffload.com](https://100daystooffload.com)._ diff --git a/pages/home.md b/pages/home.md @@ -18,6 +18,8 @@ This site will soon™️ be available over Gopher and Gemini. <a class="rss-icon" href="/feeds/sitewide-feed.xml"> <img src="/img/feed-icon.png" width="15" height="15" alt="Click for RSS Feed"/> </a> </div> +2020-08-05 <a class="feed-item" href="blog/use-xterm-256color-with-alacritty">Use xterm-256color With Alacritty For Better ls Output</a> + 2020-08-03 <a class="feed-item" href="blog/my-journey-with-computers">My Journey With Computers</a> 2020-08-02 <a class="feed-item" href="blog/vortex-vibe-keyboard">The Vortex ViBE Mechanical Keyboard</a> @@ -36,8 +38,6 @@ This site will soon™️ be available over Gopher and Gemini. 2020-07-21 <a class="feed-item" href="blog/mastodon-to-pleroma-1-setting-up-a-pleroma-server">Mastodon to Pleroma — 1 — Setting up a Pleroma Server</a> -2020-07-19 <a class="feed-item" href="blog/two-months-with-aerc">Two Months with aerc</a> - ### What is a Parity Bit? It is a bit (in the 1's and 0's sense) used in checking for errors in digital diff --git a/public/feeds/sitewide-feed.xml b/public/feeds/sitewide-feed.xml @@ -7,6 +7,32 @@ <description>The feed that covers all notable additions, updates, announcements, and other changes for the entire paritybit.ca website.</description> <item> + <title>Use xterm-256color With Alacritty For Better ls Output</title> + <link>https://www.paritybit.ca/blog/use-xterm-256color-with-alacritty</link> + <guid>https://www.paritybit.ca/blog/use-xterm-256color-with-alacritty</guid> + <pubDate>Wed, 05 Aug 2020 19:59:31 -0400</pubDate> + <description><![CDATA[<h2 id="use-xterm-256color-with-alacritty-for-better-ls-output">Use xterm-256color With Alacritty For Better ls Output</h2> +<div class="byline"> +<p><b>Written By:</b> Jake Bauer | <b>Posted:</b> 2020-08-05 | <b>Last Updated:</b> 2020-08-05</p> +</div> +<p>In <a href="/blog/switching-to-alacritty">switching to alacritty</a>, I noticed something off about my <code>ls</code> output. Previously, when I was using st, ls would highlight different files in different colours. For example, image files would be bold and purple and other files like <code>.deb.</code> or <code>.zip</code> files would be bold and red. Here is an example:</p> +<figure> +<a href="/img/ls-highlights.png"><img src="/img/ls-highlights.png" alt="A + screenshot of a terminal where ls shows media files highlighted in purple + and .deb files in red."/></a> +</figure> +<p>As opposed to what I was encountering:</p> +<figure> +<a href="/img/ls-no-highlights.png"><img src="/img/ls-no-highlights.png" alt="A + screenshot of a terminal where ls shows every non-folder and non-executable + with default colours (i.e. non-bold white)"/></a> +</figure> +<p>Which is what you get if you use a <code>TERM</code> variable set to <code>alacritty</code> in your <code>alacritty.yml</code> while you have another <code>TERM</code> variable set in <code>.profile</code>. Since changing that variable in my <code>alacritty.yml</code> file to <code>xterm-256color</code> and removing it entirely from my <code>.profile</code>, the highlights have returned.</p> +<p>It would seem that the terminfo for alacritty is not in the default installations for any of the systems I use (Debian and OpenBSD, at the moment) nor is it included in the <code>.deb</code> package I grabbed from their GitHub releases page. Therefore, setting the <code>TERM</code> variable to <code>alacritty</code> in <code>alacritty.yml</code> without having anything in <code>.profile</code> actually results in an almost completely broken terminal experience where there are no colours by default and SSH sessions do not behave well unless I <code>export TERM=xterm-256color</code> beforehand.</p> +<p>Also, <a href="https://github.com/alacritty/alacritty/releases">Alacritty 5.0 is out</a> which includes a new Vi mode!</p> +<p><em>This is my eighty-fifth post for the <a href="https://social.paritybit.ca/tags/100DaysToOffload">#100DaysToOffload</a> challenge. You can learn more about this challenge over at <a href="https://100daystooffload.com">https://100daystooffload.com</a>.</em></p>]]></description> + </item> +<item> <title>My Journey With Computers</title> <link>https://www.paritybit.ca/blog/my-journey-with-computers</link> <guid>https://www.paritybit.ca/blog/my-journey-with-computers</guid> diff --git a/public/img/ls-highlights.png b/public/img/ls-highlights.png Binary files differ. diff --git a/public/img/ls-no-highlights.png b/public/img/ls-no-highlights.png Binary files differ. diff --git a/public/sitemap.xml b/public/sitemap.xml @@ -3,6 +3,7 @@ <url><loc>https://www.paritybit.ca</loc></url> <url><loc>https://www.paritybit.ca/home</loc></url> <url><loc>https://www.paritybit.ca/blog</loc></url> + <url><loc>https://www.paritybit.ca/blog/use-xterm-256color-with-alacritty</loc></url> <url><loc>https://www.paritybit.ca/blog/my-journey-with-computers</loc></url> <url><loc>https://www.paritybit.ca/blog/vortex-vibe-keyboard</loc></url> <url><loc>https://www.paritybit.ca/blog/my-git-server-was-ddosed</loc></url>