<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Obsidian on /home/amgsk</title><link>https://amgsk.dev/tags/obsidian/</link><description>Recent content in Obsidian on /home/amgsk</description><generator>Hugo</generator><language>ja-JP</language><lastBuildDate>Mon, 16 Feb 2026 00:18:33 +0900</lastBuildDate><atom:link href="https://amgsk.dev/tags/obsidian/index.xml" rel="self" type="application/rss+xml"/><item><title>小ネタ HyprlandでObsidianのトレイ格納をトグルする</title><link>https://amgsk.dev/posts/obsidian-toggle-on-hyprland/</link><pubDate>Mon, 16 Feb 2026 00:18:33 +0900</pubDate><guid>https://amgsk.dev/posts/obsidian-toggle-on-hyprland/</guid><description>&lt;p>HyprlandでObsidianのトレイアイコンをトグルする方法を紹介。&lt;/p>
&lt;h2 id="環境">環境&lt;/h2>
&lt;ul>
&lt;li>Arch Linux 6.18.9-zen1-2-zen&lt;/li>
&lt;li>Hyprland 0.53.3&lt;/li>
&lt;li>Obsidian 1.11.7&lt;/li>
&lt;li>Obsidian Tray Fork &lt;a href="https://github.com/DozyDolphin/obsidian-tray">🔗GitHub&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="手順">手順&lt;/h2>
&lt;p>まずは普通にObsidian Trayをインストールする。&lt;br>
そして、Obsidian TrayのFork版のリポジトリを参照し、valut内の&lt;code>.obsidian/plugins/tray/main.js&lt;/code>をFork版のものに置き換えてObsidianを再起動。&lt;/p>
&lt;p>Obsidian TrayのFork版には、以下のようなURLスキームが用意されており、Hyprlandのexecで簡単にトグルができる。&lt;/p>
&lt;image src="./images/shortcut-uris.png" alt="Shortcut URIs" width="300">
&lt;p>obsidian-trayの設定画面のショートカットは何だって良いと思う。&lt;br>
今回はトグルしたいので、Hyprlandのキーバインド設定で以下のような設定を仕込んだ。&lt;/p>
&lt;div>&lt;div class="codeblock--name">hyprland.conf&lt;/div>
 &lt;div class="codeblock--content">&lt;div class="highlight">&lt;div style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#737679">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>bind &lt;span style="color:#ff7b72;font-weight:bold">=&lt;/span> Ctrl+Shift, Q, exec, xdg-open &lt;span style="color:#a5d6ff">&amp;#34;obsidian://tray?cmd=toggle&amp;#34;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
 &lt;/div>
&lt;/div>
&lt;p>挙動としてはめっちゃ望ましい感じになった。満足。&lt;/p>
&lt;ul>
&lt;li>ウィンドウが生成されていないとき
&lt;ul>
&lt;li>アクティブになる&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>ウィンドウが生成されていて、かつ 現在アクティブなウィンドウのとき
&lt;ul>
&lt;li>ウィンドウが閉じる（理想通りのtoggle）&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>ウィンドウが生成されているものの、現在アクティブなウィンドウではないとき
&lt;ul>
&lt;li>ウィンドウがアクティブになる&lt;/li>
&lt;li>ワークスペースが別の場合は、obsidianが存在するワークスペースに切り替わる&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>つまりウィンドウがアクティブではないときに、ウィンドウがアクティブになる挙動があるのがとても良い感じ。&lt;/p>
&lt;p>EOF&lt;/p></description></item></channel></rss>