<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>macos on Aldrin Jenson</title>
    <link>/tags/macos/</link>
    <description>Aldrin Jenson (macos)</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 20 Mar 2024 12:00:00 -0400</lastBuildDate>
    
    <atom:link href="/tags/macos/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Drag and drop files from the macOS terminal</title>
      <link>/til/adding-drag-drop-from-terminal-in-mac-os/</link>
      <pubDate>Wed, 20 Mar 2024 12:00:00 -0400</pubDate>
      
      <guid>/til/adding-drag-drop-from-terminal-in-mac-os/</guid>
      <description>&lt;p&gt;Use this cool tool:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/Wevah/dragterm&#34;&gt;https://github.com/Wevah/dragterm&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;steps-to-install&#34;&gt;Steps to install:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;git clone the above repo&lt;/li&gt;
&lt;li&gt;cd dragterm&lt;/li&gt;
&lt;li&gt;&lt;code&gt;brew install cocoapods&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;g++ DTDraggingSourceView.m main.m -framework Cocoa -o drag&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Add the folder to PATH&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;code&gt;export PATH=&amp;quot;&amp;lt;your drag term folder path&amp;gt;:$PATH&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;usage&#34;&gt;Usage:&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;drag &amp;lt;filename&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;bonus&#34;&gt;Bonus&lt;/h3&gt;
&lt;p&gt;If you are using &lt;code&gt;ranger&lt;/code&gt; or some other CLI based file manager, you can easily add support to dragging from terminal using &lt;code&gt;dragterm&lt;/code&gt; with a key-map as follows:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;map &amp;lt;C-d&amp;gt; shell drag %p
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Paste the above to &lt;code&gt;.config/ranger/rc.conf&lt;/code&gt; to map ctrl+d to drag a file from ranger&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
