<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
 <channel>
  <title>duh.se: TIL</title>
  <description>duh.se: TIL</description>
  <link>https://duh.se/til/index.html</link>
  <lastBuildDate>Thu, 28 May 2026 03:24:00 -0000</lastBuildDate>
 <item>
 <title>vim: save to macOS clipboard</title>
 <link>https://duh.se/2026/05/28/vim-save-to-macos-clipboard/</link>
 <guid isPermaLink="false">tag:duh.se,2026-05-28:/2026/05/28/vim-save-to-macos-clipboard/</guid>
 <pubDate>Thu, 28 May 2026 03:24:00 -0000</pubDate>
 <author>Johan Eckerström</author>
 <description>&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;w&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;!&lt;/span&gt;pbcopy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
</item>
<item>
 <title>Hide kernel processes in top with LIBPROC_HIDE_KERNEL</title>
 <link>https://duh.se/2025/03/26/libproc-hide-kernel-top/</link>
 <guid isPermaLink="false">tag:duh.se,2025-03-26:/2025/03/26/libproc-hide-kernel-top/</guid>
 <pubDate>Wed, 26 Mar 2025 11:00:00 -0000</pubDate>
 <author>Johan Eckerström</author>
 <description>&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;LIBPROC_HIDE_KERNEL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1 top
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;blockquote&gt;
  &lt;p&gt;Although the question has aged a bit, there is an interesting new
approach: Since version 4 of the &lt;strong&gt;procps&lt;/strong&gt; package, you can set
the environment variable &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LIBPROC_HIDE_KERNEL&lt;/code&gt;. If set, &lt;strong&gt;ps(1)&lt;/strong&gt;
and &lt;strong&gt;top(1)&lt;/strong&gt; will display user space processes, only.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
</item>
<item>
 <title>macOS: set the default app for a file type with duti</title>
 <link>https://duh.se/2025/03/08/macos-default-app-with-duti/</link>
 <guid isPermaLink="false">tag:duh.se,2025-03-08:/2025/03/08/macos-default-app-with-duti/</guid>
 <pubDate>Sat, 08 Mar 2025 11:00:00 -0000</pubDate>
 <author>Johan Eckerström</author>
 <description>&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;duti&lt;/code&gt; takes a bundle identifier and binds it to a file extension (or
UTI). Combine it with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;osascript&lt;/code&gt; to look up the bundle id of the app
you actually have installed.&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;brew &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;duti

&lt;span class=&quot;c&quot;&gt;# Figure out the bundle id of the app you want.&lt;/span&gt;
osascript &lt;span class=&quot;nt&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;id of app &quot;Zed&quot;&#39;&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Bind .yml files to that app, for all roles (viewer + editor).&lt;/span&gt;
duti &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;osascript &lt;span class=&quot;nt&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;id of app &quot;Zed&quot;&#39;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; .yml all
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
</item>
</channel>
</rss>
