mirror of
https://github.com/SqrtMinusOne/sqrtminusone.github.io.git
synced 2025-12-10 15:53:03 +03:00
190 lines
12 KiB
HTML
190 lines
12 KiB
HTML
<!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-completion</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-completion
|
|
|
|
<iframe src="https://ghbtns.com/github-btn.html?user=SqrtMinusOne&repo=password-store-completion&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-completion
|
|
|
|
<iframe src="https://ghbtns.com/github-btn.html?user=SqrtMinusOne&repo=password-store-completion&type=star&count=true" frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>
|
|
|
|
</h1>
|
|
<p>A completion-based pass frontend inspired by <a href="https://github.com/carnager/rofi-pass">rofi-pass</a>. Integrates with <a href="https://github.com/abo-abo/swiper">Ivy</a> or <a href="https://github.com/oantolin/embark">Embark</a>.</p>
|
|
<p>The main purpose is typing passwords with <code>xdotool</code> (useful in <a href="https://github.com/emacs-exwm/exwm">EXWM</a>).</p>
|
|
<p>Also take a look at Nicolas Petton’s <a href="https://github.com/NicolasPetton/pass">pass</a>. <code>password-store-completion</code> is designed as complementary to Nicolas’ package.</p>
|
|
<h2 id="installation">Installation</h2>
|
|
<p>As the package isn’t 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-completion</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">"SqrtMinusOne/password-store-completion"</span>))
|
|
</span></span></code></pre></div><p><code>xdotool</code> has to be available in <code>$PATH</code>.</p>
|
|
<p>For Ivy integration:</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">require</span> <span style="color:#19177c">'password-store-ivy</span>)
|
|
</span></span></code></pre></div><p>Also be sure to load the main package before Ivy.</p>
|
|
<p>For Embark integration:</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">require</span> <span style="color:#19177c">'password-store-embark</span>)
|
|
</span></span><span style="display:flex;"><span>(<span style="color:#19177c">password-store-embark-mode</span>)
|
|
</span></span></code></pre></div><h2 id="usage">Usage</h2>
|
|
<p>Emacs’ 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>For Ivy integration, the 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>
|
|
<p>For other completion frameworks, run <code>M-x password-store-completion</code>. If Embark integration is enabled, the same actions are added.</p>
|
|
<h2 id="customization">Customization</h2>
|
|
<p>The following parameters control delays:</p>
|
|
<ul>
|
|
<li><code>password-store-completion-initial-wait</code> controls the initial delay before starting to type a sequence (in milliseconds)</li>
|
|
<li><code>password-store-completion-delay</code> controls the delay between typing characters (in milliseconds)</li>
|
|
</ul>
|
|
<p><code>password-store-completion-sequences</code> determines the steps of sequences. It is an alist; the keys correspond to the default sequences:</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-completion-initial-wait</code> milliseconds</li>
|
|
<li><code>(wait <milliseconds>)</code>: Wait for <code><milliseconds></code></li>
|
|
<li><code>(key <key>)</code>: Type <code><key></code></li>
|
|
<li><code>(field <field>)</code>: Type <code><field></code> of entry</li>
|
|
</ul>
|
|
<p>The default value is as follows:</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">'</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">"username"</span>)
|
|
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">key</span> <span style="color:#666">.</span> <span style="color:#ba2121">"Tab"</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">"Return"</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">"username"</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">"url"</span>))))
|
|
</span></span></code></pre></div><p>Sequences can also be overridden in a particular entry with a field called <code>sequence-<name></code>, where <code><name></code> is a key of <code>password-store-completion-sequences</code>.</p>
|
|
<p>For example, to press <code>Tab</code> twice in the <code>autotype</code> sequence:</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><pass>
|
|
</span></span><span style="display:flex;"><span>username: thexcloud@gmail.com
|
|
</span></span><span style="display:flex;"><span>url: <url>
|
|
</span></span><span style="display:flex;"><span>sequence-autotype: (wait (field . "username") (key . "Tab") (key . "Tab") (field . secret) (key . "Return"))
|
|
</span></span></code></pre></div><p>Or, create a custom sequence:</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><pass>
|
|
</span></span><span style="display:flex;"><span>username: thexcloud@gmail.com
|
|
</span></span><span style="display:flex;"><span>url: <url>
|
|
</span></span><span style="display:flex;"><span>sequence-doubletab: (wait (field . "username") (key . "Tab") (key . "Tab") (field . secret) (key . "Return"))
|
|
</span></span></code></pre></div><p>Custom sequences can be run in the field selection interface (<code>M-f</code> in Ivy, <code>M-x embark-act f</code> in Embark).</p>
|
|
|
|
</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"><Expand></a>
|
|
<a id="hide-all-button" class="hidden"><Collapse></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>
|