<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>项目onDocs</title><link>https://hiraethecho.github.io/docs/project/</link><description>Recent contentin项目onDocs</description><generator>Hugo --0.152.2</generator><language>en</language><managingEditor>wyz2016zxc@outlook.com(Hiraeth)</managingEditor><webMaster>wyz2016zxc@outlook.com(Hiraeth)</webMaster><atom:link href="https://hiraethecho.github.io/docs/project/index.xml" rel="self" type="application/rss+xml"/><item><title>hugo theme记录</title><link>https://hiraethecho.github.io/docs/project/hugo-theme-log/</link><pubDate>Sat, 06 Dec 2025 00:00:00 +0000</pubDate><author>wyz2016zxc@outlook.com(Hiraeth)</author><guid>https://hiraethecho.github.io/docs/project/hugo-theme-log/</guid><description>写hugo主题时候的一些记录</description><content:encoded><![CDATA[<h1 id="开发记录">
  <a class="anchor inpage" href="#%e5%bc%80%e5%8f%91%e8%ae%b0%e5%bd%95">#</a>开发记录</h1>
<h2 id="一阶段">
  <a class="anchor inpage" href="#%e4%b8%80%e9%98%b6%e6%ae%b5">##</a>一阶段</h2>
<p>用 hugo new theme生成的样子，复制了一些文章做测试。这里加了文件树的功能，用AI写的，完全不懂go template
<figure>
  <a
    href="https://asset.877675.xyz/1.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/1.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>然后开始做css，先分了区，为了前期方便，随便加了background color，太刺激了
<figure>
  <a
    href="https://asset.877675.xyz/2.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/2.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>用details而不是ul，加了点button
<figure>
  <a
    href="https://asset.877675.xyz/3.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/3.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>太刺眼了，换颜色了。稍微搞了点响应式，微调一点css，加了代码复制按钮之类的功能。
<figure>
  <a
    href="https://asset.877675.xyz/4.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/4.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>一边加各种layout里的功能，一边调css，打算确定颜色风格
<figure>
  <a
    href="https://asset.877675.xyz/5.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/5.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>加了callouts等，打算用柔和一点的阴影类的装饰，用更少颜色
<figure>
  <a
    href="https://asset.877675.xyz/6.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/6.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>开始无休止的微调。
<figure>
  <a
    href="https://asset.877675.xyz/7.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/7.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<h2 id="实装">
  <a class="anchor inpage" href="#%e5%ae%9e%e8%a3%85">##</a>实装</h2>
<p>基本上开始使用，加了评论、搜索，偶尔调一调样式和bug。<br>
以及名称换成了lichtung而不是glade。</p>
<h2 id="稳定">
  <a class="anchor inpage" href="#%e7%a8%b3%e5%ae%9a">##</a>稳定</h2>
<p>2026-03-16 又翻出这个log，发现已经很久没有动主题了，算是稳定了。<br>
有闲情逸致的时候写个文档吧。<br>
没有文档的
，也不是不能用。</p>
]]></content:encoded></item><item><title>hugo主题lichtung</title><link>https://hiraethecho.github.io/docs/project/example/</link><pubDate>Sun, 05 Oct 2025 00:00:00 +0000</pubDate><author>wyz2016zxc@outlook.com(Hiraeth)</author><guid>https://hiraethecho.github.io/docs/project/example/</guid><description>&lt;h1 id="my-hugo-theme"&gt;
&lt;a class="anchor inpage" href="#my-hugo-theme"&gt;#&lt;/a&gt;My hugo theme&lt;/h1&gt;
&lt;p&gt;&lt;figure&gt;
&lt;a
href="https://asset.877675.xyz/202510101905530.webp"
class="img-link"
data-sub-html=""
target="_blank"
&gt;
&lt;img
src="https://asset.877675.xyz/202510101905530.webp"
alt=""loading="lazy"
/&gt;
&lt;/a&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;some thing.&lt;br&gt;
another line
a
&lt;/p&gt;
&lt;h2 id="titles"&gt;
&lt;a class="anchor inpage" href="#titles"&gt;##&lt;/a&gt;titles&lt;/h2&gt;
&lt;h3 id="h3"&gt;
&lt;a class="anchor inpage" href="#h3"&gt;###&lt;/a&gt;h3&lt;/h3&gt;
&lt;h4 id="h4"&gt;
&lt;a class="anchor inpage" href="#h4"&gt;####&lt;/a&gt;h4&lt;/h4&gt;
&lt;h5 id="h5"&gt;
&lt;a class="anchor inpage" href="#h5"&gt;#####&lt;/a&gt;h5&lt;/h5&gt;
&lt;h6 id="h6"&gt;
&lt;a class="anchor inpage" href="#h6"&gt;######&lt;/a&gt;h6&lt;/h6&gt;
&lt;h2 id="fonts"&gt;
&lt;a class="anchor inpage" href="#fonts"&gt;##&lt;/a&gt;fonts&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;bold text&lt;/strong&gt; and &lt;em&gt;italic text&lt;/em&gt;. and both &lt;strong&gt;&lt;em&gt;bold and italic&lt;/em&gt;&lt;/strong&gt; and &lt;em&gt;&lt;strong&gt;jlkfas&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;try some thing new: &lt;del&gt;delete&lt;/del&gt;, &lt;ins&gt;insert&lt;/ins&gt;, &lt;mark&gt;mark&lt;/mark&gt;, superscript&lt;sup&gt;2&lt;/sup&gt; and subscript&lt;sub&gt;2&lt;/sub&gt;&lt;/p&gt;
&lt;p&gt;some Typographer&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;... &amp;amp;hellip; horizontal ellipsis
' &amp;amp;rsquo; apostrophe
-- &amp;amp;ndash; en dash
--- &amp;amp;mdash; em dash
« &amp;amp;laquo; left angle quote
“ &amp;amp;ldquo; left double quote
‘ &amp;amp;lsquo; left single quote
» &amp;amp;raquo; right angle quote
” &amp;amp;rdquo; right double quote
’ &amp;amp;rsquo; right single quote
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;as&lt;/p&gt;</description><content:encoded><![CDATA[<h1 id="my-hugo-theme">
  <a class="anchor inpage" href="#my-hugo-theme">#</a>My hugo theme</h1>
<p><figure>
  <a
    href="https://asset.877675.xyz/202510101905530.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/202510101905530.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>some thing.<br>
another line
a 
</p>
<h2 id="titles">
  <a class="anchor inpage" href="#titles">##</a>titles</h2>
<h3 id="h3">
  <a class="anchor inpage" href="#h3">###</a>h3</h3>
<h4 id="h4">
  <a class="anchor inpage" href="#h4">####</a>h4</h4>
<h5 id="h5">
  <a class="anchor inpage" href="#h5">#####</a>h5</h5>
<h6 id="h6">
  <a class="anchor inpage" href="#h6">######</a>h6</h6>
<h2 id="fonts">
  <a class="anchor inpage" href="#fonts">##</a>fonts</h2>
<p><strong>bold text</strong> and <em>italic text</em>. and both <strong><em>bold and italic</em></strong> and <em><strong>jlkfas</strong></em></p>
<p>try some thing new: <del>delete</del>, <ins>insert</ins>, <mark>mark</mark>, superscript<sup>2</sup> and subscript<sub>2</sub></p>
<p>some Typographer</p>
<pre><code>... &amp;hellip;    horizontal ellipsis
'   &amp;rsquo; apostrophe
--  &amp;ndash; en dash
--- &amp;mdash; em dash
«   &amp;laquo; left angle quote
“   &amp;ldquo; left double quote
‘   &amp;lsquo; left single quote
»   &amp;raquo; right angle quote
”   &amp;rdquo; right double quote
’   &amp;rsquo; right single quote
</code></pre>
<p>as</p>
<p>&hellip; … horizontal ellipsis
&rsquo; ’ apostrophe
&ndash; – en dash
&mdash; — em dash
« « left angle quote
“ “ left double quote
‘ ‘ left single quote
» » right angle quote
” ” right double quote
’ ’ right single quote</p>
<h2 id="callouts">
  <a class="anchor inpage" href="#callouts">##</a>callouts</h2>
<p>some text</p>
<blockquote class="alert alert-note">
      <p class="alert-heading">a</p></blockquote><p>and other</p>
<blockquote class="alert alert-tip">
      <p class="alert-heading">b</p></blockquote><blockquote class="alert alert-important">
      <p class="alert-heading">重要</p></blockquote><blockquote class="alert alert-warning">
      <p class="alert-heading">WARNING</p><p>hell</p></blockquote><blockquote class="alert alert-caution">
      <p class="alert-heading">CAUTION</p><p>waow</p>
<blockquote class="alert alert-warning">
      <p class="alert-heading">WARNING</p><p>nested</p></blockquote><p>blocks</p></blockquote><h3 id="blockquotes">
  <a class="anchor inpage" href="#blockquotes">###</a>blockquotes</h3>
<blockquote class="alert"><p>just<br>
a quote</p>
</blockquote><p>nest</p>
<blockquote class="alert"><p>nest</p>
<blockquote class="alert"><p>anoth</p>
</blockquote></blockquote><p>and</p>
<blockquote class="alert"><p>nest</p>
<blockquote class="alert"><p>anoth</p>
</blockquote><p>a</p>
</blockquote><h2 id="latex">
  <a class="anchor inpage" href="#latex">##</a>latex</h2>
<p>行间</p>
<pre><code>\[
\mathrm{e}^{\theta \mathrm{i}} = \cos \theta + \mathrm{i}\sin \theta
\]
</code></pre>
<p>和</p>
<pre><code>\[
\mathcal{E}=\mathcal{O}^{\oplus n} \rightarrow \mathcal{F}
\]
</code></pre>
<p>为
</p>
\[
\mathrm{e}^{\theta \mathrm{i}} = \cos \theta + \mathrm{i}\sin \theta
\]<p>
和
</p>
\[
\mathcal{E}=\mathcal{O}^{\oplus n} \rightarrow \mathcal{F}
\]<p>
行中 <code>$E=mc^2$</code> 和 <code>\(E=mc^2\)</code> 为 $E=mc^2$ 和 \(E=mc^2\)</p>
<h2 id="footnotes">
  <a class="anchor inpage" href="#footnotes">##</a>footnotes</h2>
<p>some text.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> And named footnote<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup> another footnote<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup> what if <sup id="fnref1:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> same one.</p>
<h2 id="forms">
  <a class="anchor inpage" href="#forms">##</a>forms</h2>
<p>select 跳转</p>
<pre><code>&lt;select onchange=&quot;location = this.value;&quot;&gt;
&lt;option value=&quot;&quot;&gt;导航菜单&lt;/option&gt;
&lt;option value=&quot;/&quot;&gt;首页&lt;/option&gt;
&lt;option value=&quot;/glade&quot;&gt;关于&lt;/option&gt;
&lt;/select&gt;
</code></pre>
<select onchange="location = this.value;">
  <option value="">导航菜单</option>
  <option value="/">首页</option>
  <option value="/about">关于</option>
</select>
<details><summary>details</summary>
<ul>
  <li>nested</li>
  <li> ul </li>
</ul>
</details>
<h2 id="lists">
  <a class="anchor inpage" href="#lists">##</a>lists</h2>
<p>some texts</p>
<ul>
<li>askjdfk</li>
<li>jklasdf
<ul>
<li>nested
<ol>
<li>mixed type</li>
<li>ok</li>
</ol>
</li>
<li>sdajfl</li>
</ul>
</li>
<li>laksdfjlk</li>
</ul>
<p>ok, then another list</p>
<ol>
<li>i do</li>
<li>not</li>
</ol>
<h2 id="codes">
  <a class="anchor inpage" href="#codes">##</a>codes</h2>
<h3 id="inline-codes">
  <a class="anchor inpage" href="#inline-codes">###</a>inline codes</h3>
<p>asdfjlk <code>ajsdfj</code> sdjfakl</p>
<h3 id="code-fences">
  <a class="anchor inpage" href="#code-fences">###</a>code fences</h3>
<p>iolkjlkasdf</p>
<details open>
    <summary>bash</summary><pre
        class="chroma codeblock"
      ><code class="language-bash" data-lang="bash"
          ><span style="display:flex;"><span><span style="color:#75715e">#!/bin/bash --noprofile --norc
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>export MY_VARIABLE<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;value&#34;</span></span></span></code
        ><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><details open>
    <summary>TEXT</summary><pre
        class="codeblock"
      ><code class="language-" data-lang="">#!/bin/bash --noprofile --norc
export MY_VARIABLE=&#34;value&#34;
echo &#34;Current PATH: $PATH&#34;</code><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><p>this is confusing</p>
<pre><code>#!/bin/bash --noprofile --norc
export MY_VARIABLE=&quot;value&quot;
echo &quot;Current PATH: $PATH&quot;
</code></pre>
<h3 id="pre">
  <a class="anchor inpage" href="#pre">###</a>pre</h3>
<pre><code>       一剪梅·舟过吴江 蒋捷
一片春愁待酒浇。江上舟摇，楼上帘招。
秋娘渡与泰娘桥，风又飘飘，雨又萧萧。
何日归家洗客袍？银字笙调，心字香烧。
流光容易把人抛，红了樱桃，绿了芭蕉。
</code></pre>
<hr>
<h2 id="table">
  <a class="anchor inpage" href="#table">##</a>table</h2>
<table>
  <thead>
      <tr>
          <th>ajksldf</th>
          <th>dsf</th>
          <th>dfs</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>dfs</td>
          <td>dfs</td>
          <td>dfsx</td>
      </tr>
      <tr>
          <td>ss</td>
          <td>eet</td>
          <td>zzz</td>
      </tr>
      <tr>
          <td>dsfwe</td>
          <td>dsfb</td>
          <td>we</td>
      </tr>
  </tbody>
</table>
<h2 id="plain-text">
  <a class="anchor inpage" href="#plain-text">##</a>plain text</h2>
<p>ok Let me see.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>what is this&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a>&#160;<a href="#fnref1:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>a footnote with name.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p>another footnote&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>我的网站计划</title><link>https://hiraethecho.github.io/docs/project/mysites/</link><pubDate>Sun, 17 Aug 2025 00:00:00 +0000</pubDate><author>wyz2016zxc@outlook.com(Hiraeth)</author><guid>https://hiraethecho.github.io/docs/project/mysites/</guid><description>建站资料，技术和服务汇总</description><content:encoded><![CDATA[<h1 id="我的网站们">
  <a class="anchor inpage" href="#%e6%88%91%e7%9a%84%e7%bd%91%e7%ab%99%e4%bb%ac">#</a>我的网站们</h1>
<p>想要建站，各种方式建了很多站，试了很多技术功能。<br>
截至 2025-08-29前 汇总一下。</p>
<h2 id="服务器上的">
  <a class="anchor inpage" href="#%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e7%9a%84">##</a>服务器上的</h2>
<p>在starship上的服务器跑的服务，用zero trust-network-tunnel的方式绑定到877675.xyz域名下的子域名。</p>
<ul>
<li>
 一个类似flomo的轻量级笔记服务</li>
<li>
 一个结合AI的memo服务</li>
<li><del>
</del> 把github的copilot加上OpenAI的接口。找不到怎么加密，先关掉了。项目的
有本地部署方法。</li>
<li>
 网盘合集</li>
<li>
 用radicale做的日历和联系人服务</li>
</ul>
<h2 id="一些赛博善人">
  <a class="anchor inpage" href="#%e4%b8%80%e4%ba%9b%e8%b5%9b%e5%8d%9a%e5%96%84%e4%ba%ba">##</a>一些赛博善人</h2>
<h3 id="netlify">
  <a class="anchor inpage" href="#netlify">###</a>netlify</h3>
<ul>
<li>twikoo</li>
<li>waline</li>
<li>代替 obsidian publish的 
，要把<code>github-repo/content</code>作为obsidian repo，但是里面还有很多别的东西</li>
<li>digitalgarden 同上，但是可以选择哪些发布，并且不用放在github仓库里，简单但同时自定义差一点。</li>
</ul>
<h3 id="vercel">
  <a class="anchor inpage" href="#vercel">###</a>vercel</h3>
<ul>
<li>memos.top 一个memos的展示
，需要有memos</li>
<li>neno 类似flomo的
，功能很少。</li>
<li>digitalgarden</li>
</ul>
<h3 id="claw-cloud">
  <a class="anchor inpage" href="#claw-cloud">###</a>claw-cloud</h3>
<ul>
<li>企图host一个
，但自定义域名未遂。</li>
</ul>
<h3 id="github-pages">
  <a class="anchor inpage" href="#github-pages">###</a>github pages</h3>
<ul>
<li>
 
 
 这三个博客暂时都是</li>
<li>memos.top 同vercel的上，但是用github pages部署的
</li>
</ul>
<h2 id="cloudflare-属于赛博菩萨了">
  <a class="anchor inpage" href="#cloudflare-%e5%b1%9e%e4%ba%8e%e8%b5%9b%e5%8d%9a%e8%8f%a9%e8%90%a8%e4%ba%86">##</a>cloudflare 属于赛博菩萨了</h2>
<h3 id="pages">
  <a class="anchor inpage" href="#pages">###</a>pages</h3>
<ul>
<li>
 把桶存储变成webdav。目前是把图床和memos的桶放在这。</li>
</ul>
<h3 id="workers">
  <a class="anchor inpage" href="#workers">###</a>workers</h3>
<p>用cloudflare works创建的服务。</p>
<ul>
<li>
 用resend服务发邮件
<ul>
<li>
</li>
<li>
</li>
</ul>
</li>
<li>
 用cloudflare的ai</li>
</ul>
<h3 id="mails">
  <a class="anchor inpage" href="#mails">###</a>mails</h3>
<p>cloudflare自己转发的邮件服务。有点乱，看图吧。</p>
<p><figure>
  <a
    href="https://asset.877675.xyz/202508171454341.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/202508171454341.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p><figure>
  <a
    href="https://asset.877675.xyz/202508171455969.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/202508171455969.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<h3 id="bucket">
  <a class="anchor inpage" href="#bucket">###</a>bucket</h3>
<ul>
<li>图床</li>
<li>rclone连接，当备份的网盘。</li>
</ul>
<h2 id="为博客添加的功能">
  <a class="anchor inpage" href="#%e4%b8%ba%e5%8d%9a%e5%ae%a2%e6%b7%bb%e5%8a%a0%e7%9a%84%e5%8a%9f%e8%83%bd">##</a>为博客添加的功能</h2>
<h3 id="闲言碎语">
  <a class="anchor inpage" href="#%e9%97%b2%e8%a8%80%e7%a2%8e%e8%af%ad">###</a>闲言碎语</h3>
<ul>
<li>artitalk 一个说说或即刻页面，无后端，leancloud存储。可以用js插入到html里。Github pages上有一个
</li>
<li>nonsense 无后端，leancloud存储。可以单独页面，也可以插入到博客里。这个写入有点费劲。</li>
<li>memos 似乎也可以插入到博客里。
</li>
</ul>
<h3 id="评论">
  <a class="anchor inpage" href="#%e8%af%84%e8%ae%ba">###</a>评论</h3>
<ul>
<li>valine 无后端，leancloud存储</li>
<li>waline 有后端，在netlify。leancloud存储。 
试用。</li>
<li>twikoo 有后端，在netlify。MongDB存储。</li>
</ul>
<h3 id="图床">
  <a class="anchor inpage" href="#%e5%9b%be%e5%ba%8a">###</a>图床</h3>
<p>cloudflare的桶存储，和picgo上传</p>
<p>merge了picgo和memos的桶，把<code>pic</code>和<code>memos</code>的删掉，合并到<code>asset</code>，然后似乎出了点问题，openlist有点bug似乎。删掉重新添加就行，只改bucket不行，好神秘啊。<br>
以及<code>picgo</code>的url全错了，看不到预览，不好找图片了。</p>
]]></content:encoded></item><item><title>买域名上瘾</title><link>https://hiraethecho.github.io/docs/project/my-domain/</link><pubDate>Sun, 10 Aug 2025 00:00:00 +0000</pubDate><author>wyz2016zxc@outlook.com(Hiraeth)</author><guid>https://hiraethecho.github.io/docs/project/my-domain/</guid><description>买域名上瘾</description><content:encoded><![CDATA[<h1 id="买域名上瘾">
  <a class="anchor inpage" href="#%e4%b9%b0%e5%9f%9f%e5%90%8d%e4%b8%8a%e7%98%be">#</a>买域名上瘾</h1>
<p>前一段发现了cloudflare，于是想要买域名。</p>
<h2 id="domain-name">
  <a class="anchor inpage" href="#domain-name">##</a>domain name</h2>
<p>买了三个域名，申请了一个免费的。<br>
第一个是hiraethecho.online，在namecheap，买的第一年便宜，但是买了之后才发现续费好贵，好烦。要用palpay，好麻烦。<br>
然后312220.xyz在namesilo上买的，超级便宜。<br>
但是877675.xyz更便宜，在spaceship上搞的。这里居然可以用支付宝。</p>
<p>然后还想买域名，加了一堆购物车</p>
<table>
  <thead>
      <tr>
          <th>域名</th>
          <th>第一年</th>
          <th>续订</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>hiraeth.meme</td>
          <td>74</td>
          <td>74</td>
      </tr>
      <tr>
          <td>hiraeth.casa</td>
          <td>7.5</td>
          <td>75</td>
      </tr>
      <tr>
          <td>hiraeth.one</td>
          <td>41</td>
          <td>96</td>
      </tr>
      <tr>
          <td>hiraeth.page</td>
          <td>57</td>
          <td>74</td>
      </tr>
      <tr>
          <td>hiraethecho.com</td>
          <td>64</td>
          <td>72</td>
      </tr>
      <tr>
          <td>hiraethecho.top</td>
          <td>7.54</td>
          <td>27.65</td>
      </tr>
      <tr>
          <td>hiraethecho.cc</td>
          <td>22</td>
          <td>60</td>
      </tr>
      <tr>
          <td>hiraethecho.xyz</td>
          <td>13.36</td>
          <td>81.82</td>
      </tr>
      <tr>
          <td>keinmal.com</td>
          <td>64</td>
          <td>72</td>
      </tr>
      <tr>
          <td>keinmal.top</td>
          <td>7.54</td>
          <td>27.65</td>
      </tr>
      <tr>
          <td>keinmal.cc</td>
          <td>22</td>
          <td>60</td>
      </tr>
      <tr>
          <td>keinmal.xyz</td>
          <td>13.36</td>
          <td>81.82</td>
      </tr>
      <tr>
          <td>essmussein.com</td>
          <td>NULL</td>
          <td>NULL</td>
      </tr>
      <tr>
          <td>essmussein.top</td>
          <td>7.54</td>
          <td>27.65</td>
      </tr>
      <tr>
          <td>esmussein.cc</td>
          <td>22</td>
          <td>60</td>
      </tr>
      <tr>
          <td>essmussein.xyz</td>
          <td>13.36</td>
          <td>81.82</td>
      </tr>
  </tbody>
</table>
<p>应该挑一个短的、顶级域名不是特别奇怪的、便宜的。<br>
打算保留877675.xyz，用作我的各种服务或api之类的。然后再买一个当博客的地址。</p>
<h2 id="服务器">
  <a class="anchor inpage" href="#%e6%9c%8d%e5%8a%a1%e5%99%a8">##</a>服务器</h2>
<p>于是又在spaceship上买了个虚拟机，很寒酸，fedora 1 vGPU 2GiB memory, 25G ssd. 但是一个月27，搞点简单的小服务也够用。比如
</p>
]]></content:encoded></item><item><title>折腾的linux+X11+dwm</title><link>https://hiraethecho.github.io/docs/project/dwm/</link><pubDate>Mon, 29 Jul 2024 00:00:00 +0000</pubDate><author>wyz2016zxc@outlook.com(Hiraeth)</author><guid>https://hiraethecho.github.io/docs/project/dwm/</guid><description>关于linux C dwm等</description><content:encoded><![CDATA[<h1 id="近期折腾的archlinux">
  <a class="anchor inpage" href="#%e8%bf%91%e6%9c%9f%e6%8a%98%e8%85%be%e7%9a%84archlinux">#</a>近期折腾的archlinux</h1>
<p>也算是一些业余学习吧。先叠个甲，业余学习所以可能有错误，只是个人理解。</p>
<h2 id="linux">
  <a class="anchor inpage" href="#linux">##</a>linux</h2>
<p>linux内核的功能是调用硬件，为程序分配使用<br>
GNU is not unix. 在斯托曼的组织下，为了取代unix开发了一系列自由软件，但是没有内核，用了linus的内核。<br>
shell是包裹在内核外面的外壳，用来和内核沟通。并且有POSIX的shell标准，来规范shell的语言。常见的shell有<code>bash</code> <code>zsh</code>等。而另一个常见的<code>fish</code>不符合POSIX.<br>
Terminal是使用shell的界面。最基础的terminal就是tty，是过去计算机的一个物理部件（console控制台是另一个过去的物理部件，直接控制机器。tty是<em>远程</em>的控制方式。）常见的terminal有alacritty、kitty和各大桌面环境配套的。</p>
<p>linux的哲学之一在于，每一个程序只做一件事，并努力做到最好。像word这样的windows应用，常被认为是臃肿的，“每个人只用到了全部功能的1%
”。但这是因为“每个人用的都是不同的1%”。然而在linux的世界里，为了自己需要的那1%，通常只需要安装对应的那1%。当然，困难之处在于在广大社区中找到对应的程序，并且使自己所需要的各种程序和谐共存互相协调。</p>
<p>GNU/linux有各种发行版，虽然个人感到主要区别在包管理器和预装软件。包管理器的其中一个功能就是尽量保证各个程序可以互相协调，自动解决程序的依赖等问题。至于预装软件可能是发行版制作者的个人倾向。<br>
BTW，I use arch.</p>
<p>Arch发行版是一个Geek风格的linux发行版，目的在于用户尽可能自由配置自己的linux（当然似乎比不上Gentoo甚至lfs）。它有两个特点，其一是滚动更新，即没有稳定版本，总可以获得最新的软件版本。好处是获得最新功能，第一时间获得已知bug的修复；坏处是，也可以第一时间获得bug，以及面临软件之间版本不兼容的问题（这也是linux哲学的负面影响）。第二个特点是AUR，既用户仓库。每个发行版的包管理器通常有对应的软件源，而arch除了官方软件源外还有用户仓库，即每个用户都可以把应用按照规范打包供他人使用。优点在于AUR里什么都有，缺点在于很多应用无人负责或没有充分维护。</p>
<h2 id="图形化界面x11">
  <a class="anchor inpage" href="#%e5%9b%be%e5%bd%a2%e5%8c%96%e7%95%8c%e9%9d%a2x11">##</a>图形化界面X11</h2>
<p>为了在tty外情景使用linux，需要图形化界面。</p>
<p>X11是linux的一个图形化界面的协议，每个图形化程序并不是靠它自己显示画面，而是通过协议用Xorg来创建图形的。除此之外还有混成器（例如picom）来提供一些画面特效等。wayland是另一套图形化方案，本身替代了Xorg和混成器的功能。</p>
<p>linux下的桌面环境（Desktop Environment），如KDE GNOME Xfce等，提供了一整套日常使用的基本功能，例如窗口管理，应用启动器，托盘，设置，蓝牙，网络等。但事实上如果追求极简，那么仅仅使用窗口管理器（Windows Manager）也是可行的。</p>
<p>Windows Manager，通俗的解释，就是显示应用程序的窗口，并且拖动、调整大小、最大化等功能的部分，不包括壁纸、声音网络蓝牙键盘触摸板等设置、应用启动器和托盘。<br>
常见的独立窗口管理器包括i3，openbox，awesome等。而我选择的是dwm，属于suckless系列，用C语言编写，代码仅2000余行，更改配置需要修改源码重新编译，添加功能是通过.diff文件打补丁实现。</p>
<h2 id="dwm和c">
  <a class="anchor inpage" href="#dwm%e5%92%8cc">##</a>dwm和C</h2>
<p>这几周时间一直在加强的我dwm，被迫学习了C语言的使用，以及基于lazygit的自娱自乐式历史管理。</p>
<p>C语言是面向过程的，以函数为中心的。但实际写dwm代码的时候，则主要用“面向对象”的思路在写。对象里的函数和变量是用指针或者全局变量，实现地很曲折。</p>
<p>C语言算是很底层的编程语言了，指针可能是其最重要的特性。指针直接指向变量的存储地址，非常有趣。在函数调用时，传参传指针进去，可以直接在物理存贮的意义上理解程序是如何使用和修改变量的值的。另外还有位运算，也很有趣。</p>
<p>C语言同时还是非常省内存（这里应该指的是内存吗？）的语言，每次写一个新变量都小心翼翼地。遥想大一学C语言的时候，还要注意变量要在代码块之前先声明，开个动态数组都麻烦的一匹，用完还要free掉。后来看见其他语言随便新建变量，太难接受了。不过这种节省也导致一些逆天的feature.例如一个结构体</p>
<details open>
    <summary>C</summary><pre
        class="chroma codeblock"
      ><code class="language-C" data-lang="C"
          ><span style="display:flex;"><span><span style="color:#66d9ef">typedef</span> <span style="color:#66d9ef">struct</span> {
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">int</span> i;
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">float</span> f;
</span></span><span style="display:flex;"><span>} Arg1;</span></span></code
        ><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><p>那么一个Arg就会有两个成员。但是还有一种操作</p>
<details open>
    <summary>C</summary><pre
        class="chroma codeblock"
      ><code class="language-C" data-lang="C"
          ><span style="display:flex;"><span><span style="color:#66d9ef">typedef</span> <span style="color:#66d9ef">union</span> {
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">int</span> i;
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">float</span> f;
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">void</span> <span style="color:#f92672">*</span>v;
</span></span><span style="display:flex;"><span>} Arg2;</span></span></code
        ><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><p>乍一看和上一个差不多，但这个<code>union</code>的意思是，<code>Arg2</code>只能有一个类型。当创建一个<code>Arg1 a1</code>时，会给 <code>a1.i</code>和<code>a1.f</code>都分配地址。但是<code>Arg2 a2</code>就只有一个地址，当用了<code>a2.i=1</code>之后就不能再赋值<code>a2.f</code>了。这样如果不同函数的输入一个是<code>int</code>另一个是<code>float</code>，那就可以都写成<code>Arg2</code>，十分优雅。但是需要复杂功能是就很难用。<br>
除此之外，这个<code>void *v</code>也是个奇妙的用法，只要用上强制类型转换<code>Client *c=(Client *)v</code>就可以很灵活的使用各种类型的变量了。</p>
<h2 id="">
  <a class="anchor inpage" href="#">##</a></h2>
<p>最后，可以在我的
找到我的dotfiles和dwm。还没有整理，也没文档，以后有时间心情再说吧。</p>
<h2 id="tabbed-scratchpad">
  <a class="anchor inpage" href="#tabbed-scratchpad">##</a>tabbed scratchpad</h2>
<p><code>st -c class -n name</code> with <code>precmd () {print -Pn &quot;\e]0;%~\a&quot;}</code> in <code>.zshrc</code></p>
<details open>
    <summary>TEXT</summary><pre
        class="codeblock"
      ><code class="language-" data-lang="">_NET_WM_ICON_NAME(UTF8_STRING) = &#34;~&#34;
WM_ICON_NAME(UTF8_STRING) = &#34;~&#34;
WM_CLASS(STRING) = &#34;name&#34;, &#34;class&#34;
_NET_WM_NAME(UTF8_STRING) = &#34;~&#34;
WM_NAME(UTF8_STRING) = &#34;~&#34;</code><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><p><code>tabbed -n &quot;scratchpad&quot; -c -r 2 st -w '' -g 150x40 -c class -n name</code> with <code>precmd () {print -Pn &quot;\e]0;%~\a&quot;}</code> in <code>.zshrc</code></p>
<details open>
    <summary>TEXT</summary><pre
        class="codeblock"
      ><code class="language-" data-lang="">WM_NAME(UTF8_STRING) = &#34;~&#34;
_NET_WM_NAME(UTF8_STRING) = &#34;~&#34;
WM_CLASS(STRING) = &#34;scratchpad&#34;, &#34;tabbed&#34;</code><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><p><strong>summary</strong>: In <code>WM_CLASS(STRING)=&quot;name&quot;,&quot;class&quot;</code>, <code>&quot;name&quot;</code> is for <code>st -n name</code> and <code>tabbed -n name</code>, and is also <code>instance</code> in <code>rules</code>; <code>class</code> is for <code>st -c class</code>, and class of <code>tabbed</code> is always <code>tabbed</code>.</p>
<p>origin <code>manage()</code>:</p>
<details open>
    <summary>TEXT</summary><pre
        class="codeblock"
      ><code class="language-" data-lang="">  selmon-&gt;tagset[selmon-&gt;seltags] &amp;= ~scratchtag;
  if (!strcmp(c-&gt;name, scratchpadname)) {
    c-&gt;mon-&gt;tagset[c-&gt;mon-&gt;seltags] |= c-&gt;tags = scratchtag;
    c-&gt;isfloating = True;
  }</code><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><p>we can modify to</p>
<details open>
    <summary>TEXT</summary><pre
        class="codeblock"
      ><code class="language-" data-lang="">void manage(Window w, XWindowAttributes *wa) {
  Client *c, *t = NULL;
&#43; XClassHint ch = {NULL, NULL};
&#43; const char *class, *instance;
    ...
&#43; XGetClassHint(dpy, c-&gt;win, &amp;ch);
&#43;  instance = ch.res_name ? ch.res_name : broken;
  selmon-&gt;tagset[selmon-&gt;seltags] &amp;= ~scratchtag;
~ if (!strcmp(instance, scratchpadname)) {
    c-&gt;mon-&gt;tagset[c-&gt;mon-&gt;seltags] |= c-&gt;tags = scratchtag;
    c-&gt;isfloating = True;
  }
}</code><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><p>btw, <code>apply_rules</code>:</p>
<details open>
    <summary>TEXT</summary><pre
        class="codeblock"
      ><code class="language-" data-lang="">  XGetClassHint(dpy, c-&gt;win, &amp;ch);
  class = ch.res_class ? ch.res_class : broken;
  instance = ch.res_name ? ch.res_name : broken;

  for (i = 0; i &lt; LENGTH(rules); i&#43;&#43;) {
    r = &amp;rules[i];
    if ((!r-&gt;title || strstr(c-&gt;name, r-&gt;title)) &amp;&amp;
        (!r-&gt;class || strstr(class, r-&gt;class)) &amp;&amp;
        (!r-&gt;instance || strstr(instance, r-&gt;instance))) {
      c-&gt;isfloating = r-&gt;isfloating;
      c-&gt;tags |= r-&gt;tags;
      c-&gt;opacity = r-&gt;opacity;
      c-&gt;unfocusopacity = r-&gt;unfocusopacity;
      for (m = mons; m &amp;&amp; m-&gt;num != r-&gt;monitor; m = m-&gt;next) ;
      if (m)
        c-&gt;mon = m;
    }
  }</code><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script>]]></content:encoded></item></channel></rss>