sqrtminusone.github.io/packages/password-store-ivy/index.html
2024-04-26 20:23:13 +00:00

186 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang=""><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>password-store-ivy</title>
<meta name="description" content="Freedom is a state of mind">
<meta name="author" content='SqrtMinusOne'>
<link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous">
<link rel="stylesheet" href="/sass/researcher.min.css">
<link rel="icon" type="image/ico" href="https://sqrtminusone.xyz/favicon.ico">
<script defer data-domain="sqrtminusone.xyz" src="https://plausible.sqrtminusone.xyz/js/plausible.js"></script>
</head>
<body><div class="container mt-5">
<nav class="navbar navbar-expand-sm flex-column flex-sm-row text-nowrap p-0">
<a class="navbar-brand mx-0 mr-sm-auto" href="https://sqrtminusone.xyz/" title="SqrtMinusOne">
SqrtMinusOne
</a>
<div class="navbar-nav flex-row flex-wrap justify-content-center">
<a class="nav-item nav-link" href="/" title="Index">
Index
</a>
<span class="nav-item navbar-text mx-1">/</span>
<a class="nav-item nav-link" href="/posts/" title="Posts">
Posts
</a>
<span class="nav-item navbar-text mx-1">/</span>
<a class="nav-item nav-link" href="/configs/readme" title="Configs">
Configs
</a>
<span class="nav-item navbar-text mx-1">/</span>
<a class="nav-item nav-link" href="/emacs-packages/" title="Emacs packages">
Emacs packages
</a>
</div>
</nav>
</div>
<hr>
<div id="content">
<script defer language="javascript" type="text/javascript" src="/js/dynamic-toc.js"></script>
<div class="root">
<h1 id="title-small-screen">
password-store-ivy
<iframe src="https://ghbtns.com/github-btn.html?user=SqrtMinusOne&repo=password-store-ivy&type=star&count=true" frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>
</h1>
<div class="container" id="actual-content">
<h1 id="title-large-screen" class="dotfiles-title">
password-store-ivy
<iframe src="https://ghbtns.com/github-btn.html?user=SqrtMinusOne&repo=password-store-ivy&type=star&count=true" frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>
</h1>
<p>A <a href="https://www.passwordstore.org/">pass</a> frontend based on <a href="https://github.com/abo-abo/swiper#ivy">Ivy</a>, made primarily to use with <a href="https://github.com/ch11ng/exwm">EXWM</a> and <a href="https://github.com/tumashu/ivy-posframe">ivy-posframe</a>. Types fields from entries.</p>
<p>Also take a look at Nicolas Petton&rsquo;s <a href="https://github.com/NicolasPetton/pass">pass</a>, <code>password-store-ivy</code> is designed as complementary to the Nicolas&rsquo; package.</p>
<p>This package is made with Ivy because I need some fine-tuning like actions and turning off sorting in some completions, and Ivy happens to be the completion system I&rsquo;m using now.</p>
<h2 id="installation">Installation</h2>
<p>As the package isnt yet available anywhere but in this repository, you can clone the repository, add it to the load-path and require the package. My preferred way is <code>use-package</code> with <code>straight</code>:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">use-package</span> <span style="color:#19177c">password-store-ivy</span>
</span></span><span style="display:flex;"><span> <span style="color:#008000">:straight</span> (<span style="color:#008000">:host</span> <span style="color:#19177c">github</span> <span style="color:#008000">:repo</span> <span style="color:#ba2121">&#34;SqrtMinusOne/password-store-ivy&#34;</span>)
</span></span><span style="display:flex;"><span> <span style="color:#008000">:after</span> (<span style="color:#19177c">exwm</span>))
</span></span></code></pre></div><p>This package types stuff with <code>xdotool</code>, so you need to have that available in your <code>$PATH</code>.</p>
<h2 id="usage">Usage</h2>
<p>Emacs&rsquo; built-in <a href="https://www.gnu.org/software/emacs/manual/html_node/auth/The-Unix-password-store.html">password store</a> integration has to be set up.</p>
<p>The only command is <code>M-x password-store-ivy</code>, which invokes Ivy to select an entry from the pass database. Available commands in the selection buffer:</p>
<ul>
<li><code>M-a</code>. Perform autotype</li>
<li><code>M-p</code>. Type password</li>
<li><code>M-u</code>. Type username</li>
<li><code>M-U</code>. Type url</li>
<li><code>M-f</code>. Select a field to type</li>
</ul>
<h2 id="customization">Customization</h2>
<p>There are a few parameters that control delays:</p>
<ul>
<li><code>password-store-ivy-initial-wait</code> controls the initial delay before starting to type a sequence (in milliseconds)</li>
<li><code>password-store-ivy-delay</code> controls the delay between typing characters (in milliseconds)</li>
</ul>
<p>There is also <code>password-store-ivy-sequences</code> that determines the sequence of actions <code>password-store-ivy</code> performs.</p>
<p>It is an alist with the following required keys (corresponding to the basic actions):</p>
<ul>
<li><code>autotype</code></li>
<li><code>password</code></li>
<li><code>username</code></li>
<li><code>url</code></li>
</ul>
<p>The values are lists of the following elements:</p>
<ul>
<li><code>wait</code>. Wait for <code>password-store-ivy-initial-wait</code> milliseconds</li>
<li><code>(wait &lt;milliseconds&gt;)</code>. Wait for <code>&lt;milliseconds&gt;</code>.</li>
<li><code>(key &lt;key&gt;)</code>. Type <code>&lt;key&gt;</code>.</li>
<li><code>(field &lt;field&gt;)</code>. Type <code>&lt;field&gt;</code> of entry.</li>
</ul>
<p>For example, the starting values:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span><span style="color:#666">&#39;</span>((<span style="color:#19177c">autotype</span> <span style="color:#666">.</span> (<span style="color:#19177c">wait</span>
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">field</span> <span style="color:#666">.</span> <span style="color:#ba2121">&#34;username&#34;</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">key</span> <span style="color:#666">.</span> <span style="color:#ba2121">&#34;Tab&#34;</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">field</span> <span style="color:#666">.</span> <span style="color:#19177c">secret</span>)
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">key</span> <span style="color:#666">.</span> <span style="color:#ba2121">&#34;Return&#34;</span>)))
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">password</span> <span style="color:#666">.</span> (<span style="color:#19177c">wait</span> (<span style="color:#19177c">field</span> <span style="color:#666">.</span> <span style="color:#19177c">secret</span>)))
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">username</span> <span style="color:#666">.</span> (<span style="color:#19177c">wait</span> (<span style="color:#19177c">field</span> <span style="color:#666">.</span> <span style="color:#ba2121">&#34;username&#34;</span>)))
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">url</span> <span style="color:#666">.</span> (<span style="color:#19177c">wait</span> (<span style="color:#19177c">field</span> <span style="color:#666">.</span> <span style="color:#ba2121">&#34;url&#34;</span>))))
</span></span></code></pre></div><p>In addition to the global override, sequences can be overriden per-entry with a field called <code>sequence-&lt;name&gt;</code>, where <code>&lt;name&gt;</code> is a key of <code>password-store-ivy-sequences</code>.</p>
<p>For example, here is an override to press <code>Tab</code> twice:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>&lt;pass&gt;
</span></span><span style="display:flex;"><span>username: thexcloud@gmail.com
</span></span><span style="display:flex;"><span>url: &lt;url&gt;
</span></span><span style="display:flex;"><span>sequence-autotype: (wait (field . &#34;username&#34;) (key . &#34;Tab&#34;) (key . &#34;Tab&#34;) (field . secret) (key . &#34;Return&#34;))
</span></span></code></pre></div>
</div>
<div class="table-of-contents">
<div class="table-of-contents-text">
<b><a href="#">Table of Contents</a></b>
<nav id="TableOfContents">
<ul>
<li><a href="#installation">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#customization">Customization</a></li>
</ul>
</nav>
</div>
<a id="unhide-all-button" class="hidden">&lt;Expand&gt;</a>
<a id="hide-all-button" class="hidden">&lt;Collapse&gt;</a>
</div>
</div>
</div><div id="footer" class="mb-5">
<hr>
<div class="container text-center">
</div>
<div class="container text-center">
<a href="https://creativecommons.org/licenses/by/4.0/legalcode" title="Licensed under CC-BY 4.0"><small>Licensed under CC-BY 4.0</small></a>
|
<a href="https://plausible.io/" title="Uses Plausible Analytics"><small>Uses Plausible Analytics</small></a>
<br>
<a href="https://sqrtminusone.xyz/" title="Pavel Korytov, 2024"><small>Pavel Korytov, 2024</small></a>
</div>
</div>
</body>
</html>