1561 lines
81 KiB
HTML
1561 lines
81 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
<head>
|
|
<!-- 2020-01-12 dim. 17:28 -->
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Ranger Configuration</title>
|
|
<meta name="generator" content="Org mode" />
|
|
<meta name="author" content="Dehaeze Thomas" />
|
|
<style type="text/css">
|
|
<!--/*--><![CDATA[/*><!--*/
|
|
.title { text-align: center;
|
|
margin-bottom: .2em; }
|
|
.subtitle { text-align: center;
|
|
font-size: medium;
|
|
font-weight: bold;
|
|
margin-top:0; }
|
|
.todo { font-family: monospace; color: red; }
|
|
.done { font-family: monospace; color: green; }
|
|
.priority { font-family: monospace; color: orange; }
|
|
.tag { background-color: #eee; font-family: monospace;
|
|
padding: 2px; font-size: 80%; font-weight: normal; }
|
|
.timestamp { color: #bebebe; }
|
|
.timestamp-kwd { color: #5f9ea0; }
|
|
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
|
|
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
|
|
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
|
|
.underline { text-decoration: underline; }
|
|
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
|
p.verse { margin-left: 3%; }
|
|
pre {
|
|
border: 1px solid #ccc;
|
|
box-shadow: 3px 3px 3px #eee;
|
|
padding: 8pt;
|
|
font-family: monospace;
|
|
overflow: auto;
|
|
margin: 1.2em;
|
|
}
|
|
pre.src {
|
|
position: relative;
|
|
overflow: visible;
|
|
padding-top: 1.2em;
|
|
}
|
|
pre.src:before {
|
|
display: none;
|
|
position: absolute;
|
|
background-color: white;
|
|
top: -10px;
|
|
right: 10px;
|
|
padding: 3px;
|
|
border: 1px solid black;
|
|
}
|
|
pre.src:hover:before { display: inline;}
|
|
/* Languages per Org manual */
|
|
pre.src-asymptote:before { content: 'Asymptote'; }
|
|
pre.src-awk:before { content: 'Awk'; }
|
|
pre.src-C:before { content: 'C'; }
|
|
/* pre.src-C++ doesn't work in CSS */
|
|
pre.src-clojure:before { content: 'Clojure'; }
|
|
pre.src-css:before { content: 'CSS'; }
|
|
pre.src-D:before { content: 'D'; }
|
|
pre.src-ditaa:before { content: 'ditaa'; }
|
|
pre.src-dot:before { content: 'Graphviz'; }
|
|
pre.src-calc:before { content: 'Emacs Calc'; }
|
|
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
|
pre.src-fortran:before { content: 'Fortran'; }
|
|
pre.src-gnuplot:before { content: 'gnuplot'; }
|
|
pre.src-haskell:before { content: 'Haskell'; }
|
|
pre.src-hledger:before { content: 'hledger'; }
|
|
pre.src-java:before { content: 'Java'; }
|
|
pre.src-js:before { content: 'Javascript'; }
|
|
pre.src-latex:before { content: 'LaTeX'; }
|
|
pre.src-ledger:before { content: 'Ledger'; }
|
|
pre.src-lisp:before { content: 'Lisp'; }
|
|
pre.src-lilypond:before { content: 'Lilypond'; }
|
|
pre.src-lua:before { content: 'Lua'; }
|
|
pre.src-matlab:before { content: 'MATLAB'; }
|
|
pre.src-mscgen:before { content: 'Mscgen'; }
|
|
pre.src-ocaml:before { content: 'Objective Caml'; }
|
|
pre.src-octave:before { content: 'Octave'; }
|
|
pre.src-org:before { content: 'Org mode'; }
|
|
pre.src-oz:before { content: 'OZ'; }
|
|
pre.src-plantuml:before { content: 'Plantuml'; }
|
|
pre.src-processing:before { content: 'Processing.js'; }
|
|
pre.src-python:before { content: 'Python'; }
|
|
pre.src-R:before { content: 'R'; }
|
|
pre.src-ruby:before { content: 'Ruby'; }
|
|
pre.src-sass:before { content: 'Sass'; }
|
|
pre.src-scheme:before { content: 'Scheme'; }
|
|
pre.src-screen:before { content: 'Gnu Screen'; }
|
|
pre.src-sed:before { content: 'Sed'; }
|
|
pre.src-sh:before { content: 'shell'; }
|
|
pre.src-sql:before { content: 'SQL'; }
|
|
pre.src-sqlite:before { content: 'SQLite'; }
|
|
/* additional languages in org.el's org-babel-load-languages alist */
|
|
pre.src-forth:before { content: 'Forth'; }
|
|
pre.src-io:before { content: 'IO'; }
|
|
pre.src-J:before { content: 'J'; }
|
|
pre.src-makefile:before { content: 'Makefile'; }
|
|
pre.src-maxima:before { content: 'Maxima'; }
|
|
pre.src-perl:before { content: 'Perl'; }
|
|
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
|
pre.src-scala:before { content: 'Scala'; }
|
|
pre.src-shell:before { content: 'Shell Script'; }
|
|
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
|
/* additional language identifiers per "defun org-babel-execute"
|
|
in ob-*.el */
|
|
pre.src-cpp:before { content: 'C++'; }
|
|
pre.src-abc:before { content: 'ABC'; }
|
|
pre.src-coq:before { content: 'Coq'; }
|
|
pre.src-groovy:before { content: 'Groovy'; }
|
|
/* additional language identifiers from org-babel-shell-names in
|
|
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
|
the execution function name together. */
|
|
pre.src-bash:before { content: 'bash'; }
|
|
pre.src-csh:before { content: 'csh'; }
|
|
pre.src-ash:before { content: 'ash'; }
|
|
pre.src-dash:before { content: 'dash'; }
|
|
pre.src-ksh:before { content: 'ksh'; }
|
|
pre.src-mksh:before { content: 'mksh'; }
|
|
pre.src-posh:before { content: 'posh'; }
|
|
/* Additional Emacs modes also supported by the LaTeX listings package */
|
|
pre.src-ada:before { content: 'Ada'; }
|
|
pre.src-asm:before { content: 'Assembler'; }
|
|
pre.src-caml:before { content: 'Caml'; }
|
|
pre.src-delphi:before { content: 'Delphi'; }
|
|
pre.src-html:before { content: 'HTML'; }
|
|
pre.src-idl:before { content: 'IDL'; }
|
|
pre.src-mercury:before { content: 'Mercury'; }
|
|
pre.src-metapost:before { content: 'MetaPost'; }
|
|
pre.src-modula-2:before { content: 'Modula-2'; }
|
|
pre.src-pascal:before { content: 'Pascal'; }
|
|
pre.src-ps:before { content: 'PostScript'; }
|
|
pre.src-prolog:before { content: 'Prolog'; }
|
|
pre.src-simula:before { content: 'Simula'; }
|
|
pre.src-tcl:before { content: 'tcl'; }
|
|
pre.src-tex:before { content: 'TeX'; }
|
|
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
|
pre.src-verilog:before { content: 'Verilog'; }
|
|
pre.src-vhdl:before { content: 'VHDL'; }
|
|
pre.src-xml:before { content: 'XML'; }
|
|
pre.src-nxml:before { content: 'XML'; }
|
|
/* add a generic configuration mode; LaTeX export needs an additional
|
|
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
|
pre.src-conf:before { content: 'Configuration File'; }
|
|
|
|
table { border-collapse:collapse; }
|
|
caption.t-above { caption-side: top; }
|
|
caption.t-bottom { caption-side: bottom; }
|
|
td, th { vertical-align:top; }
|
|
th.org-right { text-align: center; }
|
|
th.org-left { text-align: center; }
|
|
th.org-center { text-align: center; }
|
|
td.org-right { text-align: right; }
|
|
td.org-left { text-align: left; }
|
|
td.org-center { text-align: center; }
|
|
dt { font-weight: bold; }
|
|
.footpara { display: inline; }
|
|
.footdef { margin-bottom: 1em; }
|
|
.figure { padding: 1em; }
|
|
.figure p { text-align: center; }
|
|
.equation-container {
|
|
display: table;
|
|
text-align: center;
|
|
width: 100%;
|
|
}
|
|
.equation {
|
|
vertical-align: middle;
|
|
}
|
|
.equation-label {
|
|
display: table-cell;
|
|
text-align: right;
|
|
vertical-align: middle;
|
|
}
|
|
.inlinetask {
|
|
padding: 10px;
|
|
border: 2px solid gray;
|
|
margin: 10px;
|
|
background: #ffffcc;
|
|
}
|
|
#org-div-home-and-up
|
|
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
|
textarea { overflow-x: auto; }
|
|
.linenr { font-size: smaller }
|
|
.code-highlighted { background-color: #ffff00; }
|
|
.org-info-js_info-navigation { border-style: none; }
|
|
#org-info-js_console-label
|
|
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
|
.org-info-js_search-highlight
|
|
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
|
.org-svg { width: 90%; }
|
|
/*]]>*/-->
|
|
</style>
|
|
<link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
|
|
<link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
|
|
<script type="text/javascript" src="./js/jquery.min.js"></script>
|
|
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
|
|
<script type="text/javascript" src="./js/jquery.stickytableheaders.min.js"></script>
|
|
<script type="text/javascript" src="./js/readtheorg.js"></script>
|
|
<script type="text/javascript">
|
|
/*
|
|
@licstart The following is the entire license notice for the
|
|
JavaScript code in this tag.
|
|
|
|
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
|
|
|
The JavaScript code in this tag is free software: you can
|
|
redistribute it and/or modify it under the terms of the GNU
|
|
General Public License (GNU GPL) as published by the Free Software
|
|
Foundation, either version 3 of the License, or (at your option)
|
|
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
|
|
|
As additional permission under GNU GPL version 3 section 7, you
|
|
may distribute non-source (e.g., minimized or compacted) forms of
|
|
that code without the copy of the GNU GPL normally required by
|
|
section 4, provided you include this license notice and a URL
|
|
through which recipients can access the Corresponding Source.
|
|
|
|
|
|
@licend The above is the entire license notice
|
|
for the JavaScript code in this tag.
|
|
*/
|
|
<!--/*--><![CDATA[/*><!--*/
|
|
function CodeHighlightOn(elem, id)
|
|
{
|
|
var target = document.getElementById(id);
|
|
if(null != target) {
|
|
elem.cacheClassElem = elem.className;
|
|
elem.cacheClassTarget = target.className;
|
|
target.className = "code-highlighted";
|
|
elem.className = "code-highlighted";
|
|
}
|
|
}
|
|
function CodeHighlightOff(elem, id)
|
|
{
|
|
var target = document.getElementById(id);
|
|
if(elem.cacheClassElem)
|
|
elem.className = elem.cacheClassElem;
|
|
if(elem.cacheClassTarget)
|
|
target.className = elem.cacheClassTarget;
|
|
}
|
|
/*]]>*///-->
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="org-div-home-and-up">
|
|
<a accesskey="h" href="./index.html"> UP </a>
|
|
|
|
|
<a accesskey="H" href="./index.html"> HOME </a>
|
|
</div><div id="content">
|
|
<h1 class="title">Ranger Configuration</h1>
|
|
<div id="table-of-contents">
|
|
<h2>Table of Contents</h2>
|
|
<div id="text-table-of-contents">
|
|
<ul>
|
|
<li><a href="#orgb698ce8">Config</a>
|
|
<ul>
|
|
<li><a href="#orgb7bec10">Options</a></li>
|
|
<li><a href="#org951cbf1">Command Aliases in the Console</a></li>
|
|
<li><a href="#org100bad8">Some Custom Keybindings</a>
|
|
<ul>
|
|
<li><a href="#org05a21e6">Extract</a></li>
|
|
<li><a href="#orgd0d45b3">Compress</a></li>
|
|
<li><a href="#org33076f2">Delete first page of pdf</a></li>
|
|
<li><a href="#org3f70c1c">Convert PDF to PNG</a></li>
|
|
<li><a href="#orge52c50c">Magit Status</a></li>
|
|
<li><a href="#org0f1fa3f">Upload with Tansfer.sh</a></li>
|
|
<li><a href="#orge19a16e">Open current folder with PCManFM</a></li>
|
|
<li><a href="#org1886892">Open with Emacs</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orgd08d096">Define keys for the browser</a>
|
|
<ul>
|
|
<li><a href="#org60cdc4b">Basic</a></li>
|
|
<li><a href="#org5904486">Open Shell in current directory</a></li>
|
|
<li><a href="#org8c9137b">Print on Rnice</a></li>
|
|
<li><a href="#orgada203d">Filter</a></li>
|
|
<li><a href="#org0c0165f">Change the line mode</a></li>
|
|
<li><a href="#orgb764b86">Tagging / Marking</a></li>
|
|
<li><a href="#orge2aa1a3">VIM-like</a></li>
|
|
<li><a href="#orgffebb62">Jumping around</a></li>
|
|
<li><a href="#orgd53d40d"><span class="todo TODO">TODO</span> Go to special folders</a></li>
|
|
<li><a href="#org0c81d35"><span class="todo TODO">TODO</span> Open With</a></li>
|
|
<li><a href="#org2a0ce0d">External Programs</a></li>
|
|
<li><a href="#orge844226">Get size of folders</a></li>
|
|
<li><a href="#org09eae76">Yank path of directory/file</a></li>
|
|
<li><a href="#orga975d9b">Filesystem Operations</a></li>
|
|
<li><a href="#orgf96f786">Drag and Drop</a></li>
|
|
<li><a href="#orge5d17bd"><span class="todo TODO">TODO</span> Rename</a></li>
|
|
<li><a href="#org16777fd">Rename files - like vim bindings</a></li>
|
|
<li><a href="#orgb374e3c">Paste files</a></li>
|
|
<li><a href="#org2b7dea6">Delete and move files</a></li>
|
|
<li><a href="#orgb3c7fc8">Copy files</a></li>
|
|
<li><a href="#org380261d">Temporary workarounds</a></li>
|
|
<li><a href="#org71e2066">Searching</a></li>
|
|
<li><a href="#org553185e">Tabs</a></li>
|
|
<li><a href="#org1d2e389">Sorting</a></li>
|
|
<li><a href="#orgbaecc7e">Settings</a></li>
|
|
<li><a href="#orgc0b9c58">Bookmarks</a></li>
|
|
<li><a href="#org49ef9ef">Custom Mapping</a></li>
|
|
<li><a href="#org7fe9653">Generate all the chmod bindings with some python help:</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orgdcee9fb">Define keys for the console</a>
|
|
<ul>
|
|
<li><a href="#org895632b">Basic</a></li>
|
|
<li><a href="#orgb9d20bd">Move around</a></li>
|
|
<li><a href="#org357eb3a">Line Editing</a></li>
|
|
<li><a href="#orgd6a7ee3">And of course the emacs way</a></li>
|
|
<li><a href="#org19abab4">Others</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org6e5bd62">Pager Keybindings</a>
|
|
<ul>
|
|
<li><a href="#org5c6c444">Movement</a></li>
|
|
<li><a href="#org4cc656f">Basic</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org6675602">Taskview Keybindings</a>
|
|
<ul>
|
|
<li><a href="#org87aa8b8">Movement</a></li>
|
|
<li><a href="#orgc3a5d1e">Changing priority and deleting tasks</a></li>
|
|
<li><a href="#org4d175ab">Basic</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org2e76cf4">Rifle</a></li>
|
|
<li><a href="#orga4ef9e0">Ranger Commands</a>
|
|
<ul>
|
|
<li><a href="#orgb5beb5c">Import</a></li>
|
|
<li><a href="#org72e240f">fzf<sub>select</sub></a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb698ce8" class="outline-2">
|
|
<h2 id="orgb698ce8">Config</h2>
|
|
<div class="outline-text-2" id="text-orgb698ce8">
|
|
</div>
|
|
|
|
<div id="outline-container-orgb7bec10" class="outline-3">
|
|
<h3 id="orgb7bec10">Options</h3>
|
|
<div class="outline-text-3" id="text-orgb7bec10">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-comment-delimiter"># </span><span class="org-comment">Which viewmode should be used? Possible values are:</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">miller: Use miller columns which show multiple levels of the hierarchy</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">multipane: Midnight-commander like multipane view showing all tabs next</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">to each other</span>
|
|
set viewmode miller
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">set viewmode multipane</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">How many columns are there, and what are their relative widths?</span>
|
|
set column_ratios <span class="org-highlight-numbers-number">1</span>,<span class="org-highlight-numbers-number">1</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Which files should be hidden? (regular expression)</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$</span>
|
|
set hidden_filter ^\.|\.(?:pyc|vrb|pyo|lof|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Show hidden files? You can toggle this by typing 'zh'</span>
|
|
set show_hidden false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Ask for a confirmation when running the "delete" command?</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Valid values are "always", "never", "multiple" (default)</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">With "multiple", ranger will ask only if you delete multiple files at once.</span>
|
|
set confirm_on_delete multiple
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Which script is used to generate file previews?</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">ranger ships with scope.sh, a script that calls external programs (see</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">README.md for dependencies) to preview images, archives, etc.</span>
|
|
set preview_script ~/.config/ranger/scope.sh
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Use the external preview script or display simple plain text or image previews?</span>
|
|
set use_preview_script true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Automatically count files in the directory, even before entering them?</span>
|
|
set automatically_count_files true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Open all images in this directory when running certain image viewers</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">like feh or sxiv? You can still open selected files by marking them.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">TODO</span>
|
|
set open_all_images true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Be aware of version control systems and display information.</span>
|
|
set vcs_aware false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">State of the three backends git, hg, bzr. The possible states are</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">disabled, local (only show local info), enabled (show local and remote</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">information).</span>
|
|
set vcs_backend_git enabled
|
|
set vcs_backend_hg disabled
|
|
set vcs_backend_bzr disabled
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Use one of the supported image preview protocols</span>
|
|
set preview_images true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Set the preview image method</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">TODO</span>
|
|
set preview_images_method w3m
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Use a unicode "..." character to mark cut-off filenames?</span>
|
|
set unicode_ellipsis false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Show dotfiles in the bookmark preview box?</span>
|
|
set show_hidden_bookmarks true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Which colorscheme to use? These colorschemes are available by default:</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">default, jungle, snow, solarized</span>
|
|
set colorscheme default
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Preview files on the rightmost column?</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">And collapse (shrink) the last column if there is nothing to preview?</span>
|
|
set preview_files true
|
|
set preview_directories true
|
|
set collapse_preview true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Save the console history on exit?</span>
|
|
set save_console_history false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Draw the status bar on top of the browser window (default: bottom)</span>
|
|
set status_bar_on_top false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Draw a progress bar in the status bar which displays the average state of all</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">currently running tasks which support progress bars?</span>
|
|
set draw_progress_bar_in_status_bar true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Draw borders around columns?</span>
|
|
set draw_borders true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Display the directory name in tabs?</span>
|
|
set dirname_in_tabs false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Enable the mouse support?</span>
|
|
set mouse_enabled true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Display the file size in the main column or status bar?</span>
|
|
set display_size_in_main_column true
|
|
set display_size_in_status_bar true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Display files tags in all columns or only in main column?</span>
|
|
set display_tags_in_all_columns true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Set a title for the window?</span>
|
|
set update_title false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Set the title to "ranger" in the tmux program?</span>
|
|
set update_tmux_title false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Shorten the title if it gets long? The number defines how many</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">directories are displayed at once, 0 turns off this feature.</span>
|
|
set shorten_title <span class="org-highlight-numbers-number">3</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Abbreviate $HOME with ~ in the titlebar (first line) of ranger?</span>
|
|
set tilde_in_titlebar true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">How many directory-changes or console-commands should be kept in history?</span>
|
|
set max_history_size <span class="org-highlight-numbers-number">20</span>
|
|
set max_console_history_size <span class="org-highlight-numbers-number">50</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Try to keep so much space between the top/bottom border when scrolling:</span>
|
|
set scroll_offset <span class="org-highlight-numbers-number">8</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Flush the input after each key hit? (Noticeable when ranger lags)</span>
|
|
set flushinput true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Padding on the right when there's no preview?</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">This allows you to click into the space to run the file.</span>
|
|
set padding_right true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Save bookmarks (used with mX and `X) instantly?</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">This helps to synchronize bookmarks between multiple ranger</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">instances but leads to *slight* performance loss.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">When false, bookmarks are saved when ranger is exited.</span>
|
|
set autosave_bookmarks false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">You can display the "real" cumulative size of directories by using the</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">command :get_cumulative_size or typing "dc". The size is expensive to</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">calculate and will not be updated automatically. You can choose</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">to update it automatically though by turning on this option:</span>
|
|
set autoupdate_cumulative_size false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Turning this on makes sense for screen readers:</span>
|
|
set show_cursor false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">One of: size, natural, basename, atime, ctime, mtime, type, random</span>
|
|
set sort natural
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Additional sorting options</span>
|
|
set sort_reverse false
|
|
set sort_case_insensitive true
|
|
set sort_directories_first true
|
|
set sort_unicode false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Enable this if key combinations with the Alt Key don't work for you.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">(Especially on xterm)</span>
|
|
set xterm_alt_key false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Whether to include bookmarks in cd command</span>
|
|
set cd_bookmarks false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Avoid previewing files larger than this size, in bytes. Use a value of 0 to</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">disable this feature.</span>
|
|
set preview_max_size <span class="org-highlight-numbers-number">0</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Add the highlighted file to the path in the titlebar</span>
|
|
set show_selection_in_titlebar true
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">The delay that ranger idly waits for user input, in milliseconds, with a</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">resolution of 100ms. Lower delay reduces lag between directory updates but</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">increases CPU load.</span>
|
|
set idle_delay <span class="org-highlight-numbers-number">2000</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">When the metadata manager module looks for metadata, should it only look for</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">a ".metadata.json" file in the current directory, or do a deep search and</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">check all directories above the current one as well?</span>
|
|
set metadata_deep_search false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Clear all existing filters when leaving a directory</span>
|
|
set clear_filters_on_dir_change false
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Disable displaying line numbers in main column</span>
|
|
set line_numbers false
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org951cbf1" class="outline-3">
|
|
<h3 id="org951cbf1">Command Aliases in the Console</h3>
|
|
<div class="outline-text-3" id="text-org951cbf1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">alias e edit
|
|
alias q quit
|
|
alias q! quitall
|
|
alias qa quitall
|
|
alias qall quitall
|
|
alias setl setlocal
|
|
|
|
alias filter scout -prt
|
|
alias find scout -aeit
|
|
alias mark scout -mr
|
|
alias unmark scout -Mr
|
|
alias search scout -rs
|
|
alias search_inc scout -rts
|
|
alias travel scout -aefiklst
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org100bad8" class="outline-3">
|
|
<h3 id="org100bad8">Some Custom Keybindings</h3>
|
|
<div class="outline-text-3" id="text-org100bad8">
|
|
</div>
|
|
<div id="outline-container-org05a21e6" class="outline-4">
|
|
<h4 id="org05a21e6">Extract</h4>
|
|
<div class="outline-text-4" id="text-org05a21e6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map ,x shell atool -x %f
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgd0d45b3" class="outline-4">
|
|
<h4 id="orgd0d45b3">Compress</h4>
|
|
<div class="outline-text-4" id="text-orgd0d45b3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map ,z shell apack %f.zip %f
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org33076f2" class="outline-4">
|
|
<h4 id="org33076f2">Delete first page of pdf</h4>
|
|
<div class="outline-text-4" id="text-org33076f2">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map ,d shell ~/scripts/pdf-delete-first-page.sh %f
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org3f70c1c" class="outline-4">
|
|
<h4 id="org3f70c1c">Convert PDF to PNG</h4>
|
|
<div class="outline-text-4" id="text-org3f70c1c">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map ,cp shell pdftoppm -png %f > $(echo %f | cut -f <span class="org-highlight-numbers-number">1</span> -d <span class="org-string">'.'</span> | sed <span class="org-string">'s/$/.png/'</span>)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orge52c50c" class="outline-4">
|
|
<h4 id="orge52c50c">Magit Status</h4>
|
|
<div class="outline-text-4" id="text-orge52c50c">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-variable-name">map ,gs shell emacsclient -create-frame --alternate-editor</span>=<span class="org-string">""</span> -n --eval <span class="org-string">'(magit-status)'</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org0f1fa3f" class="outline-4">
|
|
<h4 id="org0f1fa3f">Upload with Tansfer.sh</h4>
|
|
<div class="outline-text-4" id="text-org0f1fa3f">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map ,t shell curl --progress-bar --upload-file %f https://transfer.sh/$(basename $1) | xclip -in -selection clipboard;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orge19a16e" class="outline-4">
|
|
<h4 id="orge19a16e">Open current folder with PCManFM</h4>
|
|
<div class="outline-text-4" id="text-orge19a16e">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map ,o shell nohup pcmanfm %d &
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org1886892" class="outline-4">
|
|
<h4 id="org1886892">Open with Emacs</h4>
|
|
<div class="outline-text-4" id="text-org1886892">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-variable-name">map ,e shell emacsclient -create-frame --alternate-editor</span>=<span class="org-string">""</span> -n %f
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgd08d096" class="outline-3">
|
|
<h3 id="orgd08d096">Define keys for the browser</h3>
|
|
<div class="outline-text-3" id="text-orgd08d096">
|
|
</div>
|
|
<div id="outline-container-org60cdc4b" class="outline-4">
|
|
<h4 id="org60cdc4b">Basic</h4>
|
|
<div class="outline-text-4" id="text-org60cdc4b">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map Q quit!
|
|
map q quit
|
|
copymap q ZZ ZQ
|
|
|
|
map R reload_cwd
|
|
map <C-r> reset
|
|
map <C-l> redraw_window
|
|
map <C-c> abort
|
|
map <esc> change_mode normal
|
|
map ~ set viewmode!
|
|
|
|
map i display_file
|
|
map ? help
|
|
map W display_log
|
|
map w taskview_open
|
|
|
|
map : console
|
|
map ; console
|
|
map ! console shell%space
|
|
map @ console -p6 shell %%s
|
|
map <span class="org-comment-delimiter"># </span><span class="org-comment">console shell -p%space</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org5904486" class="outline-4">
|
|
<h4 id="org5904486">Open Shell in current directory</h4>
|
|
<div class="outline-text-4" id="text-org5904486">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map s shell $SHELL
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Open External Shell in current directory</span>
|
|
map S shell nohup $TERMINAL &
|
|
|
|
map r chain draw_possible_programs; console open_with%%space
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org8c9137b" class="outline-4">
|
|
<h4 id="org8c9137b">Print on Rnice</h4>
|
|
<div class="outline-text-4" id="text-org8c9137b">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map ,p shell print-rnice %f &
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgada203d" class="outline-4">
|
|
<h4 id="orgada203d">Filter</h4>
|
|
<div class="outline-text-4" id="text-orgada203d">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map f console filter%space
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Reset filter</span>
|
|
map F filter
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org0c0165f" class="outline-4">
|
|
<h4 id="org0c0165f">Change the line mode</h4>
|
|
<div class="outline-text-4" id="text-org0c0165f">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map Mf linemode filename
|
|
map Mi linemode fileinfo
|
|
map Mm linemode mtime
|
|
map Mp linemode permissions
|
|
map Ms linemode sizemtime
|
|
map Mt linemode metatitle
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb764b86" class="outline-4">
|
|
<h4 id="orgb764b86">Tagging / Marking</h4>
|
|
<div class="outline-text-4" id="text-orgb764b86">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map t tag_toggle
|
|
map ut tag_remove
|
|
<span class="org-variable-name">map <Space> mark_files toggle</span>=True
|
|
<span class="org-variable-name">map v mark_files all</span>=True toggle=True
|
|
<span class="org-variable-name">map uv mark_files all</span>=True val=False
|
|
map V toggle_visual_mode
|
|
<span class="org-variable-name">map uV toggle_visual_mode reverse</span>=True
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orge2aa1a3" class="outline-4">
|
|
<h4 id="orge2aa1a3">VIM-like</h4>
|
|
<div class="outline-text-4" id="text-orge2aa1a3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">copymap <UP> k
|
|
copymap <DOWN> j
|
|
copymap <LEFT> h
|
|
copymap <RIGHT> l
|
|
copymap <HOME> gg
|
|
copymap <END> G
|
|
copymap <PAGEDOWN> <C-F>
|
|
copymap <PAGEUP> <C-B>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgffebb62" class="outline-4">
|
|
<h4 id="orgffebb62">Jumping around</h4>
|
|
<div class="outline-text-4" id="text-orgffebb62">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map H history_go -1
|
|
map L history_go <span class="org-highlight-numbers-number">1</span>
|
|
map ] move_parent <span class="org-highlight-numbers-number">1</span>
|
|
map [ move_parent -1
|
|
map } traverse
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgd53d40d" class="outline-4">
|
|
<h4 id="orgd53d40d"><span class="todo TODO">TODO</span> Go to special folders</h4>
|
|
<div class="outline-text-4" id="text-orgd53d40d">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map cd console cd%space
|
|
|
|
map gh cd ~
|
|
map ga cd ~/Cloud/administratif
|
|
map gm cd ~/Cloud/thesis
|
|
map gp cd ~/Pictures
|
|
map gd cd ~/Downloads
|
|
map gc cd ~/.config/literate-dotfiles
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org0c81d35" class="outline-4">
|
|
<h4 id="org0c81d35"><span class="todo TODO">TODO</span> Open With</h4>
|
|
<div class="outline-text-4" id="text-org0c81d35">
|
|
<p>
|
|
Should automatically close mimeopen after the program is chosen.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map O shell mimeopen -a %f
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org2a0ce0d" class="outline-4">
|
|
<h4 id="org2a0ce0d">External Programs</h4>
|
|
<div class="outline-text-4" id="text-org2a0ce0d">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map E edit
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orge844226" class="outline-4">
|
|
<h4 id="orge844226">Get size of folders</h4>
|
|
<div class="outline-text-4" id="text-orge844226">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-comment-delimiter"># </span><span class="org-comment">Get size of all folders</span>
|
|
<span class="org-variable-name">map du shell -p du --max-depth</span>=<span class="org-highlight-numbers-number">1</span> -h --apparent-size
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Get size of all folders and sort them</span>
|
|
<span class="org-variable-name">map dU shell -p du --max-depth</span>=<span class="org-highlight-numbers-number">1</span> -h --apparent-size | sort -rh
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org09eae76" class="outline-4">
|
|
<h4 id="org09eae76">Yank path of directory/file</h4>
|
|
<div class="outline-text-4" id="text-org09eae76">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-comment-delimiter"># </span><span class="org-comment">Yank path of current directory/file</span>
|
|
map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Yank path of directory</span>
|
|
map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Yank filename</span>
|
|
map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orga975d9b" class="outline-4">
|
|
<h4 id="orga975d9b">Filesystem Operations</h4>
|
|
<div class="outline-text-4" id="text-orga975d9b">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-variable-name">map</span> = chmod
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgf96f786" class="outline-4">
|
|
<h4 id="orgf96f786">Drag and Drop</h4>
|
|
<div class="outline-text-4" id="text-orgf96f786">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map D shell dragon-drag-and-drop -a -x %p
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orge5d17bd" class="outline-4">
|
|
<h4 id="orge5d17bd"><span class="todo TODO">TODO</span> Rename</h4>
|
|
<div class="outline-text-4" id="text-orge5d17bd">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">map cw console rename%space</span>
|
|
map cw eval fm.execute_console(<span class="org-string">"bulkrename"</span>) if fm.thisdir.marked_items else fm.open_console(<span class="org-string">"rename "</span>)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org16777fd" class="outline-4">
|
|
<h4 id="org16777fd">Rename files - like vim bindings</h4>
|
|
<div class="outline-text-4" id="text-org16777fd">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map a rename_append
|
|
map A eval fm.open_console(<span class="org-string">'rename '</span> + fm.thisfile.relative_path.replace(<span class="org-string">"%"</span>, <span class="org-string">"%%"</span>))
|
|
map I eval fm.open_console(<span class="org-string">'rename '</span> + fm.thisfile.relative_path.replace(<span class="org-string">"%"</span>, <span class="org-string">"%%"</span>), position=<span class="org-highlight-numbers-number">7</span>)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb374e3c" class="outline-4">
|
|
<h4 id="orgb374e3c">Paste files</h4>
|
|
<div class="outline-text-4" id="text-orgb374e3c">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map pp paste
|
|
<span class="org-variable-name">map po paste overwrite</span>=True
|
|
<span class="org-variable-name">map pP paste append</span>=True
|
|
<span class="org-variable-name">map pO paste overwrite</span>=True append=True
|
|
<span class="org-variable-name">map pl paste_symlink relative</span>=False
|
|
<span class="org-variable-name">map pL paste_symlink relative</span>=True
|
|
map phl paste_hardlink
|
|
map pht paste_hardlinked_subtree
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org2b7dea6" class="outline-4">
|
|
<h4 id="org2b7dea6">Delete and move files</h4>
|
|
<div class="outline-text-4" id="text-org2b7dea6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map dD console delete
|
|
map dd cut
|
|
map ud uncut
|
|
<span class="org-variable-name">map da cut mode</span>=add
|
|
<span class="org-variable-name">map dr cut mode</span>=remove
|
|
<span class="org-variable-name">map dt cut mode</span>=toggle
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb3c7fc8" class="outline-4">
|
|
<h4 id="orgb3c7fc8">Copy files</h4>
|
|
<div class="outline-text-4" id="text-orgb3c7fc8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map yy copy
|
|
map uy uncut
|
|
<span class="org-variable-name">map ya copy mode</span>=add
|
|
<span class="org-variable-name">map yr copy mode</span>=remove
|
|
<span class="org-variable-name">map yt copy mode</span>=toggle
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org380261d" class="outline-4">
|
|
<h4 id="org380261d">Temporary workarounds</h4>
|
|
<div class="outline-text-4" id="text-org380261d">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-variable-name">map dgg eval fm.cut(dirarg</span>=dict(to=<span class="org-highlight-numbers-number">0</span>), narg=quantifier)
|
|
<span class="org-variable-name">map dG eval fm.cut(dirarg</span>=dict(to=-1), narg=quantifier)
|
|
<span class="org-variable-name">map dj eval fm.cut(dirarg</span>=dict(down=<span class="org-highlight-numbers-number">1</span>), narg=quantifier)
|
|
<span class="org-variable-name">map dk eval fm.cut(dirarg</span>=dict(up=<span class="org-highlight-numbers-number">1</span>), narg=quantifier)
|
|
<span class="org-variable-name">map ygg eval fm.copy(dirarg</span>=dict(to=<span class="org-highlight-numbers-number">0</span>), narg=quantifier)
|
|
<span class="org-variable-name">map yG eval fm.copy(dirarg</span>=dict(to=-1), narg=quantifier)
|
|
<span class="org-variable-name">map yj eval fm.copy(dirarg</span>=dict(down=<span class="org-highlight-numbers-number">1</span>), narg=quantifier)
|
|
<span class="org-variable-name">map yk eval fm.copy(dirarg</span>=dict(up=<span class="org-highlight-numbers-number">1</span>), narg=quantifier)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org71e2066" class="outline-4">
|
|
<h4 id="org71e2066">Searching</h4>
|
|
<div class="outline-text-4" id="text-org71e2066">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map / console search%space
|
|
map n search_next
|
|
<span class="org-variable-name">map N search_next forward</span>=False
|
|
<span class="org-variable-name">map ct search_next order</span>=tag
|
|
<span class="org-variable-name">map cs search_next order</span>=size
|
|
<span class="org-variable-name">map ci search_next order</span>=mimetype
|
|
<span class="org-variable-name">map cc search_next order</span>=ctime
|
|
<span class="org-variable-name">map cm search_next order</span>=mtime
|
|
<span class="org-variable-name">map ca search_next order</span>=atime
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org553185e" class="outline-4">
|
|
<h4 id="org553185e">Tabs</h4>
|
|
<div class="outline-text-4" id="text-org553185e">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map <C-n> tab_new ~
|
|
map <C-w> tab_close
|
|
map <TAB> tab_move <span class="org-highlight-numbers-number">1</span>
|
|
map <S-TAB> tab_move -1
|
|
map <A-Right> tab_move <span class="org-highlight-numbers-number">1</span>
|
|
map <A-Left> tab_move -1
|
|
map gt tab_move <span class="org-highlight-numbers-number">1</span>
|
|
map gT tab_move -1
|
|
map gn tab_new ~
|
|
map uq tab_restore
|
|
map <a-1> tab_open <span class="org-highlight-numbers-number">1</span>
|
|
map <a-2> tab_open <span class="org-highlight-numbers-number">2</span>
|
|
map <a-3> tab_open <span class="org-highlight-numbers-number">3</span>
|
|
map <a-4> tab_open <span class="org-highlight-numbers-number">4</span>
|
|
map <a-5> tab_open <span class="org-highlight-numbers-number">5</span>
|
|
map <a-6> tab_open <span class="org-highlight-numbers-number">6</span>
|
|
map <a-7> tab_open <span class="org-highlight-numbers-number">7</span>
|
|
map <a-8> tab_open <span class="org-highlight-numbers-number">8</span>
|
|
map <a-9> tab_open <span class="org-highlight-numbers-number">9</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org1d2e389" class="outline-4">
|
|
<h4 id="org1d2e389">Sorting</h4>
|
|
<div class="outline-text-4" id="text-org1d2e389">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map or set sort_reverse!
|
|
<span class="org-variable-name">map oz set sort</span>=random
|
|
<span class="org-variable-name">map os chain set sort</span>=size; set sort_reverse=False
|
|
<span class="org-variable-name">map ob chain set sort</span>=basename; set sort_reverse=False
|
|
<span class="org-variable-name">map on chain set sort</span>=natural; set sort_reverse=False
|
|
<span class="org-variable-name">map om chain set sort</span>=mtime; set sort_reverse=False
|
|
<span class="org-variable-name">map oc chain set sort</span>=ctime; set sort_reverse=False
|
|
<span class="org-variable-name">map oa chain set sort</span>=atime; set sort_reverse=False
|
|
<span class="org-variable-name">map ot chain set sort</span>=type; set sort_reverse=False
|
|
<span class="org-variable-name">map oe chain set sort</span>=extension; set sort_reverse=False
|
|
|
|
<span class="org-variable-name">map oS chain set sort</span>=size; set sort_reverse=True
|
|
<span class="org-variable-name">map oB chain set sort</span>=basename; set sort_reverse=True
|
|
<span class="org-variable-name">map oN chain set sort</span>=natural; set sort_reverse=True
|
|
<span class="org-variable-name">map oM chain set sort</span>=mtime; set sort_reverse=True
|
|
<span class="org-variable-name">map oC chain set sort</span>=ctime; set sort_reverse=True
|
|
<span class="org-variable-name">map oA chain set sort</span>=atime; set sort_reverse=True
|
|
<span class="org-variable-name">map oT chain set sort</span>=type; set sort_reverse=True
|
|
<span class="org-variable-name">map oE chain set sort</span>=extension; set sort_reverse=True
|
|
|
|
map dc get_cumulative_size
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgbaecc7e" class="outline-4">
|
|
<h4 id="orgbaecc7e">Settings</h4>
|
|
<div class="outline-text-4" id="text-orgbaecc7e">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map zc set collapse_preview!
|
|
map zd set sort_directories_first!
|
|
map zh set show_hidden!
|
|
map <C-h> set show_hidden!
|
|
map zI set flushinput!
|
|
map zi set preview_images!
|
|
map zm set mouse_enabled!
|
|
map zp set preview_files!
|
|
map zP set preview_directories!
|
|
map zs set sort_case_insensitive!
|
|
map zu set autoupdate_cumulative_size!
|
|
map zv set use_preview_script!
|
|
map zf console filter%space
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgc0b9c58" class="outline-4">
|
|
<h4 id="orgc0b9c58">Bookmarks</h4>
|
|
<div class="outline-text-4" id="text-orgc0b9c58">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map `<any> enter_bookmark %any
|
|
map <span class="org-string">'<any> enter_bookmark %any</span>
|
|
<span class="org-string">map m<any> set_bookmark %any</span>
|
|
<span class="org-string">map um<any> unset_bookmark %any</span>
|
|
|
|
<span class="org-string">map m<bg> draw_bookmarks</span>
|
|
<span class="org-string">copymap m<bg> um<bg> `<bg> '</span><bg>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org49ef9ef" class="outline-4">
|
|
<h4 id="org49ef9ef">Custom Mapping</h4>
|
|
<div class="outline-text-4" id="text-org49ef9ef">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">map <C-f> fzf_select
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org7fe9653" class="outline-4">
|
|
<h4 id="org7fe9653">Generate all the chmod bindings with some python help:</h4>
|
|
<div class="outline-text-4" id="text-org7fe9653">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map +u{0} shell -f chmod u+{0} %s"</span>.format(arg))
|
|
eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map +g{0} shell -f chmod g+{0} %s"</span>.format(arg))
|
|
eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map +o{0} shell -f chmod o+{0} %s"</span>.format(arg))
|
|
eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map +a{0} shell -f chmod a+{0} %s"</span>.format(arg))
|
|
eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map +{0} shell -f chmod u+{0} %s"</span>.format(arg))
|
|
|
|
eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map -u{0} shell -f chmod u-{0} %s"</span>.format(arg))
|
|
eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map -g{0} shell -f chmod g-{0} %s"</span>.format(arg))
|
|
eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map -o{0} shell -f chmod o-{0} %s"</span>.format(arg))
|
|
eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map -a{0} shell -f chmod a-{0} %s"</span>.format(arg))
|
|
eval for arg in <span class="org-string">"rwxXst"</span>: cmd(<span class="org-string">"map -{0} shell -f chmod u-{0} %s"</span>.format(arg))
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgdcee9fb" class="outline-3">
|
|
<h3 id="orgdcee9fb">Define keys for the console</h3>
|
|
<div class="outline-text-3" id="text-orgdcee9fb">
|
|
</div>
|
|
<div id="outline-container-org895632b" class="outline-4">
|
|
<h4 id="org895632b">Basic</h4>
|
|
<div class="outline-text-4" id="text-org895632b">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">cmap <tab> eval fm.ui.console.tab()
|
|
cmap <s-tab> eval fm.ui.console.tab(-1)
|
|
cmap <ESC> eval fm.ui.console.close()
|
|
cmap <CR> eval fm.ui.console.execute()
|
|
cmap <C-l> redraw_window
|
|
|
|
copycmap <ESC> <C-c>
|
|
copycmap <CR> <C-j>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb9d20bd" class="outline-4">
|
|
<h4 id="orgb9d20bd">Move around</h4>
|
|
<div class="outline-text-4" id="text-orgb9d20bd">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">cmap <up> eval fm.ui.console.history_move(-1)
|
|
cmap <down> eval fm.ui.console.history_move(<span class="org-highlight-numbers-number">1</span>)
|
|
<span class="org-variable-name">cmap <left> eval fm.ui.console.move(left</span>=<span class="org-highlight-numbers-number">1</span>)
|
|
<span class="org-variable-name">cmap <right> eval fm.ui.console.move(right</span>=<span class="org-highlight-numbers-number">1</span>)
|
|
<span class="org-variable-name">cmap <home> eval fm.ui.console.move(right</span>=<span class="org-highlight-numbers-number">0</span>, absolute=True)
|
|
<span class="org-variable-name">cmap <end> eval fm.ui.console.move(right</span>=-1, absolute=True)
|
|
<span class="org-variable-name">cmap <a-left> eval fm.ui.console.move_word(left</span>=<span class="org-highlight-numbers-number">1</span>)
|
|
<span class="org-variable-name">cmap <a-right> eval fm.ui.console.move_word(right</span>=<span class="org-highlight-numbers-number">1</span>)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org357eb3a" class="outline-4">
|
|
<h4 id="org357eb3a">Line Editing</h4>
|
|
<div class="outline-text-4" id="text-org357eb3a">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">cmap <backspace> eval fm.ui.console.delete(-1)
|
|
cmap <delete> eval fm.ui.console.delete(<span class="org-highlight-numbers-number">0</span>)
|
|
cmap <C-w> eval fm.ui.console.delete_word()
|
|
<span class="org-variable-name">cmap <A-d> eval fm.ui.console.delete_word(backward</span>=False)
|
|
cmap <C-k> eval fm.ui.console.delete_rest(<span class="org-highlight-numbers-number">1</span>)
|
|
cmap <C-u> eval fm.ui.console.delete_rest(-1)
|
|
cmap <C-y> eval fm.ui.console.paste()
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgd6a7ee3" class="outline-4">
|
|
<h4 id="orgd6a7ee3">And of course the emacs way</h4>
|
|
<div class="outline-text-4" id="text-orgd6a7ee3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">copycmap <up> <C-p>
|
|
copycmap <down> <C-n>
|
|
copycmap <left> <C-b>
|
|
copycmap <right> <C-f>
|
|
copycmap <home> <C-a>
|
|
copycmap <end> <C-e>
|
|
copycmap <delete> <C-d>
|
|
copycmap <backspace> <C-h>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org19abab4" class="outline-4">
|
|
<h4 id="org19abab4">Others</h4>
|
|
<div class="outline-text-4" id="text-org19abab4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-comment-delimiter"># </span><span class="org-comment">Note: There are multiple ways to express backspaces. <backspace> (code 263)</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">and <backspace2> (code 127). To be sure, use both.</span>
|
|
copycmap <backspace> <backspace2>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">This special expression allows typing in numerals:</span>
|
|
cmap <allow_quantifiers> false
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org6e5bd62" class="outline-3">
|
|
<h3 id="org6e5bd62">Pager Keybindings</h3>
|
|
<div class="outline-text-3" id="text-org6e5bd62">
|
|
</div>
|
|
<div id="outline-container-org5c6c444" class="outline-4">
|
|
<h4 id="org5c6c444">Movement</h4>
|
|
<div class="outline-text-4" id="text-org5c6c444">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-variable-name">pmap <down> pager_move down</span>=<span class="org-highlight-numbers-number">1</span>
|
|
<span class="org-variable-name">pmap <up> pager_move up</span>=<span class="org-highlight-numbers-number">1</span>
|
|
<span class="org-variable-name">pmap <left> pager_move left</span>=<span class="org-highlight-numbers-number">4</span>
|
|
<span class="org-variable-name">pmap <right> pager_move right</span>=<span class="org-highlight-numbers-number">4</span>
|
|
<span class="org-variable-name">pmap <home> pager_move to</span>=<span class="org-highlight-numbers-number">0</span>
|
|
<span class="org-variable-name">pmap <end> pager_move to</span>=-1
|
|
<span class="org-variable-name">pmap <pagedown> pager_move down</span>=<span class="org-highlight-numbers-number">1.0</span> pages=True
|
|
<span class="org-variable-name">pmap <pageup> pager_move up</span>=<span class="org-highlight-numbers-number">1.0</span> pages=True
|
|
<span class="org-variable-name">pmap <C-d> pager_move down</span>=<span class="org-highlight-numbers-number">0.5</span> pages=True
|
|
<span class="org-variable-name">pmap <C-u> pager_move up</span>=<span class="org-highlight-numbers-number">0.5</span> pages=True
|
|
|
|
copypmap <UP> k <C-p>
|
|
copypmap <DOWN> j <C-n> <CR>
|
|
copypmap <LEFT> h
|
|
copypmap <RIGHT> l
|
|
copypmap <HOME> g
|
|
copypmap <END> G
|
|
copypmap <C-d> d
|
|
copypmap <C-u> u
|
|
copypmap <PAGEDOWN> n f <C-F> <Space>
|
|
copypmap <PAGEUP> p b <C-B>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org4cc656f" class="outline-4">
|
|
<h4 id="org4cc656f">Basic</h4>
|
|
<div class="outline-text-4" id="text-org4cc656f">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">pmap <C-l> redraw_window
|
|
pmap <ESC> pager_close
|
|
copypmap <ESC> q Q i <F3>
|
|
pmap E edit_file
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org6675602" class="outline-3">
|
|
<h3 id="org6675602">Taskview Keybindings</h3>
|
|
<div class="outline-text-3" id="text-org6675602">
|
|
</div>
|
|
<div id="outline-container-org87aa8b8" class="outline-4">
|
|
<h4 id="org87aa8b8">Movement</h4>
|
|
<div class="outline-text-4" id="text-org87aa8b8">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-variable-name">tmap <up> taskview_move up</span>=<span class="org-highlight-numbers-number">1</span>
|
|
<span class="org-variable-name">tmap <down> taskview_move down</span>=<span class="org-highlight-numbers-number">1</span>
|
|
<span class="org-variable-name">tmap <home> taskview_move to</span>=<span class="org-highlight-numbers-number">0</span>
|
|
<span class="org-variable-name">tmap <end> taskview_move to</span>=-1
|
|
<span class="org-variable-name">tmap <pagedown> taskview_move down</span>=<span class="org-highlight-numbers-number">1.0</span> pages=True
|
|
<span class="org-variable-name">tmap <pageup> taskview_move up</span>=<span class="org-highlight-numbers-number">1.0</span> pages=True
|
|
<span class="org-variable-name">tmap <C-d> taskview_move down</span>=<span class="org-highlight-numbers-number">0.5</span> pages=True
|
|
<span class="org-variable-name">tmap <C-u> taskview_move up</span>=<span class="org-highlight-numbers-number">0.5</span> pages=True
|
|
|
|
copytmap <UP> k <C-p>
|
|
copytmap <DOWN> j <C-n> <CR>
|
|
copytmap <HOME> g
|
|
copytmap <END> G
|
|
copytmap <C-u> u
|
|
copytmap <PAGEDOWN> n f <C-F> <Space>
|
|
copytmap <PAGEUP> p b <C-B>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgc3a5d1e" class="outline-4">
|
|
<h4 id="orgc3a5d1e">Changing priority and deleting tasks</h4>
|
|
<div class="outline-text-4" id="text-orgc3a5d1e">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">tmap J eval -q fm.ui.taskview.task_move(-1)
|
|
tmap K eval -q fm.ui.taskview.task_move(<span class="org-highlight-numbers-number">0</span>)
|
|
tmap dd eval -q fm.ui.taskview.task_remove()
|
|
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
|
|
tmap <pageup> eval -q fm.ui.taskview.task_move(<span class="org-highlight-numbers-number">0</span>)
|
|
tmap <delete> eval -q fm.ui.taskview.task_remove()
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org4d175ab" class="outline-4">
|
|
<h4 id="org4d175ab">Basic</h4>
|
|
<div class="outline-text-4" id="text-org4d175ab">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">tmap <C-l> redraw_window
|
|
tmap <ESC> taskview_close
|
|
copytmap <ESC> q Q w <C-c>
|
|
default_linemode devicons
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org2e76cf4" class="outline-2">
|
|
<h2 id="org2e76cf4">Rifle</h2>
|
|
<div class="outline-text-2" id="text-org2e76cf4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf"><span class="org-comment-delimiter"># </span><span class="org-comment">This is the configuration file of "rifle", ranger's file executor/opener.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Each line consists of conditions and a command. For each line the conditions</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">are checked and if they are met, the respective command is run.</span>
|
|
<span class="org-comment-delimiter">#</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Syntax:</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment"><condition1> , <condition2> , ... = command</span>
|
|
<span class="org-comment-delimiter">#</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">The command can contain these environment variables:</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">$1-$9 | The n-th selected file</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">$@ | All selected files</span>
|
|
<span class="org-comment-delimiter">#</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">If you use the special command "ask", rifle will ask you what program to run.</span>
|
|
<span class="org-comment-delimiter">#</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Prefixing a condition with "!" will negate its result.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">These conditions are currently supported:</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">match <regexp> | The regexp matches $1</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">ext <regexp> | The regexp matches the extension of $1</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">mime <regexp> | The regexp matches the mime type of $1</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">name <regexp> | The regexp matches the basename of $1</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">path <regexp> | The regexp matches the absolute path of $1</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">has <program> | The program is installed (i.e. located in $PATH)</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">env <variable> | The environment variable "variable" is non-empty</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">file | $1 is a file</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">directory | $1 is a directory</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">number <n> | change the number of this command to n</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">terminal | stdin, stderr and stdout are connected to a terminal</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">X | $DISPLAY is not empty (i.e. Xorg runs)</span>
|
|
<span class="org-comment-delimiter">#</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">There are also pseudo-conditions which have a "side effect":</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">flag <flags> | Change how the program is run. See below.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">label <label> | Assign a label or name to the command so it can</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">| be started with :open_with <label> in ranger</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">| or `rifle -p <label>` in the standalone executable.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">else | Always true.</span>
|
|
<span class="org-comment-delimiter">#</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Flags are single characters which slightly transform the command:</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">f | Fork the program, make it run in the background.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">| New command = setsid $command >& /dev/null &</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">r | Execute the command with root permissions</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">| New command = sudo $command</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">t | Run the program in a new terminal. If $TERMCMD is not defined,</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">| rifle will attempt to extract it from $TERM.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">| New command = $TERMCMD -e $command</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Note: The "New command" serves only as an illustration, the exact</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">implementation may differ.</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Note: When using rifle in ranger, there is an additional flag "c" for</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">only running the current file even if you have marked multiple files.</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Websites</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Rarely installed browsers get higher priority; It is assumed that if you</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">install a rare browser, you probably use it. Firefox/konqueror/w3m on the</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">other hand are often only installed as fallback browsers.</span>
|
|
|
|
<span class="org-variable-name">ext x?html?, has qutebrowser, X, flag f</span> = qutebrowser -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext x?html?, has firefox, X, flag f</span> = firefox -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext x?html?, has elinks, terminal</span> = elinks <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext x?html?, has links2, terminal</span> = links2 <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext x?html?, has links, terminal</span> = links <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext x?html?, has lynx, terminal</span> = lynx -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext x?html?, has w3m, terminal</span> = w3m <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">Spreadsheets for scim</span>
|
|
<span class="org-variable-name">ext sc|csv|sxc|xlsx?|xlt|xlw|gnm|gnumeric,</span> = sc-im -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Misc</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Define the "editor" for text files as first action</span>
|
|
<span class="org-variable-name">mime ^text, label editor</span> = $EDITOR -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^text, label pager</span> = <span class="org-string">"$PAGER"</span> -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php</span> = $EDITOR -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php</span> = <span class="org-string">"$PAGER"</span> -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-variable-name">ext org</span> = emacsclient -create-frame --alternate-editor=<span class="org-string">""</span> -n <span class="org-string">"$1"</span>
|
|
|
|
ext <span class="org-highlight-numbers-number">1</span> = man <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">ext s[wmf]c, has zsnes, X</span> = zsnes <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">ext s[wmf]c, has snes9x-gtk,X</span> = snes9x-gtk <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">ext nes, has fceux, X</span> = fceux <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">ext exe</span> = wine <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">name ^[mM]akefile$</span> = make
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">--------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Code</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-variable-name">ext py</span> = python -- <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">ext pl</span> = perl -- <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">ext rb</span> = ruby -- <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">ext js</span> = node -- <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">ext sh</span> = sh -- <span class="org-string">"$1"</span>
|
|
<span class="org-variable-name">ext php</span> = php -- <span class="org-string">"$1"</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">--------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Video/Audio with a GUI</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-variable-name">mime ^video, has mpv, X, flag f</span> = mpv -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^video, has mpv, X, flag f</span> = mpv --fs -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^video, has mpv, X, flag f</span> = mpv --loop -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">--------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Audio without X</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-variable-name">mime ^audio|ogg$, terminal, has mpv</span> = mpv --no-audio-display -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^audio|ogg$</span> = tag <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^audio|ogg$, terminal, has mpv</span> = mpv -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">--------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Video without X:</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-variable-name">mime ^video, terminal, !X, has mpv</span> = mpv -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^video, terminal, !X, has mplayer2</span> = mplayer2 -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^video, terminal, !X, has mplayer</span> = mplayer -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Documents</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-variable-name">ext pdf, has zathura, X, flag f</span> = zathura -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has llpp, X, flag f</span> = llpp <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has mupdf, X, flag f</span> = mupdf <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has mupdf, X, flag f</span> = mupdf -I <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has mupdf-x11,X, flag f</span> = mupdf-x11 <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has apvlv, X, flag f</span> = apvlv -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has xpdf, X, flag f</span> = xpdf -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has evince, X, flag f</span> = evince -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has atril, X, flag f</span> = atril -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has okular, X, flag f</span> = okular -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has epdfview, X, flag f</span> = epdfview -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pdf, has qpdfview, X, flag f</span> = qpdfview <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-variable-name">ext epub, has zathura, X, flag f</span> = zathura -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext epub, has mupdf, X, flag f</span> = mupdf <span class="org-string">"$@"</span>
|
|
|
|
|
|
<span class="org-variable-name">ext docx?, has wps, X, flag f</span> = wps <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-variable-name">ext docx?, has catdoc, terminal</span> = catdoc -- <span class="org-string">"$@"</span> | <span class="org-string">"$PAGER"</span>
|
|
|
|
<span class="org-variable-name">ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has wpp, X, flag f</span> = wpp <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f</span> = gnumeric -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f</span> = kspread -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f</span> = libreoffice <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f</span> = soffice <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f</span> = ooffice <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-variable-name">ext djvu, has zathura,X, flag f</span> = zathura -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext djvu, has evince, X, flag f</span> = evince -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext djvu, has atril, X, flag f</span> = atril -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Image Viewing:</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-variable-name">mime ^image/svg, has inkscape, X, flag f</span> = inkscape -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image/svg, has display, X, flag f</span> = display -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image/gif, has mpv, X, flag f</span> = mpv --loop -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image/gif, has viewnior, X, flag f</span> = viewnior -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image/gif, has qutebrowser, X, flag f</span> = qutebrowser -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-variable-name">ext xcf, X, flag f</span> = gimp -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has sxiv, X, flag f</span> = sxiv -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has feh, X, flag f</span> = feh --scale-down --auto-zoom --image-bg black -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has feh, X, flag f</span> = feh --scale-down --auto-zoom -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has mirage, X, flag f</span> = mirage -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has ristretto, X, flag f</span> = ristretto <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has eog, X, flag f</span> = eog -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has eom, X, flag f</span> = eom -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has gimp, X, flag f</span> = gimp -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has pinta, X, flag f</span> = pinta -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has mypaint, X, flag f</span> = mypaint -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">mime ^image, has kolourpaint, X, flag f</span> = kolourpaint -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Archives</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">This requires atool</span>
|
|
<span class="org-variable-name">ext jar</span> = java -jar <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-variable-name">ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has als</span> = als -- <span class="org-string">"$@"</span> | <span class="org-string">"$PAGER"</span>
|
|
<span class="org-variable-name">ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has als</span> = als -- <span class="org-string">"$@"</span> | <span class="org-string">"$PAGER"</span>
|
|
<span class="org-variable-name">ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has aunpack</span> = aunpack -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has aunpack</span> = aunpack -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Fallback:</span>
|
|
<span class="org-variable-name">ext tar|gz, has tar</span> = tar vvtf <span class="org-string">"$@"</span> | <span class="org-string">"$PAGER"</span>
|
|
<span class="org-variable-name">ext tar|gz, has tar</span> = tar vvxf <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Misc</span>
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
label wallpaper, number <span class="org-highlight-numbers-number">11</span>, mime ^image, has feh, X = feh --bg-scale <span class="org-string">"$1"</span>
|
|
label wallpaper, number <span class="org-highlight-numbers-number">12</span>, mime ^image, has feh, X = feh --bg-tile <span class="org-string">"$1"</span>
|
|
label wallpaper, number <span class="org-highlight-numbers-number">13</span>, mime ^image, has feh, X = feh --bg-center <span class="org-string">"$1"</span>
|
|
label wallpaper, number <span class="org-highlight-numbers-number">14</span>, mime ^image, has feh, X = feh --bg-fill <span class="org-string">"$1"</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Define the editor for non-text files + pager as last action</span>
|
|
<span class="org-variable-name">!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php</span> = ask
|
|
<span class="org-variable-name">label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php</span> = $EDITOR -- <span class="org-string">"$@"</span>
|
|
<span class="org-variable-name">label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php</span> = <span class="org-string">"$PAGER"</span> -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-variable-name">ext blend, has blender, X, flag f</span> = blender -- <span class="org-string">"$@"</span>
|
|
|
|
<span class="org-variable-name">has dragon-drag-and-drop, X, flag f</span> = dragon-drag-and-drop -a -x <span class="org-string">"$@"</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orga4ef9e0" class="outline-2">
|
|
<h2 id="orga4ef9e0">Ranger Commands</h2>
|
|
<div class="outline-text-2" id="text-orga4ef9e0">
|
|
</div>
|
|
<div id="outline-container-orgb5beb5c" class="outline-3">
|
|
<h3 id="orgb5beb5c">Import</h3>
|
|
<div class="outline-text-3" id="text-orgb5beb5c">
|
|
<div class="org-src-container">
|
|
<pre class="src src-python"><span class="org-keyword">from</span> ranger.api.commands <span class="org-keyword">import</span> *
|
|
|
|
<span class="org-keyword">import</span> os
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org72e240f" class="outline-3">
|
|
<h3 id="org72e240f">fzf<sub>select</sub></h3>
|
|
<div class="outline-text-3" id="text-org72e240f">
|
|
<div class="org-src-container">
|
|
<pre class="src src-python"><span class="org-keyword">class</span> <span class="org-type">fzf_select</span>(Command):
|
|
<span class="org-doc">"""</span>
|
|
<span class="org-doc"> :fzf_select</span>
|
|
|
|
<span class="org-doc"> Find a file using fzf.</span>
|
|
|
|
<span class="org-doc"> With a prefix argument select only directories.</span>
|
|
|
|
<span class="org-doc"> See: https://github.com/junegunn/fzf</span>
|
|
<span class="org-doc"> """</span>
|
|
<span class="org-keyword">def</span> <span class="org-function-name">execute</span>(<span class="org-keyword">self</span>):
|
|
<span class="org-keyword">import</span> subprocess
|
|
<span class="org-keyword">import</span> os.path
|
|
<span class="org-keyword">if</span> <span class="org-keyword">self</span>.quantifier:
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">match only directories</span>
|
|
<span class="org-variable-name">command</span>=<span class="org-string">"find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \</span>
|
|
<span class="org-string"> -o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"</span>
|
|
<span class="org-keyword">else</span>:
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">match files and directories</span>
|
|
<span class="org-variable-name">command</span>=<span class="org-string">"find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \</span>
|
|
<span class="org-string"> -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"</span>
|
|
<span class="org-variable-name">fzf</span> = <span class="org-keyword">self</span>.fm.execute_command(command, universal_newlines=<span class="org-constant">True</span>, stdout=subprocess.PIPE)
|
|
<span class="org-variable-name">stdout</span>, <span class="org-variable-name">stderr</span> = fzf.communicate()
|
|
<span class="org-keyword">if</span> fzf.returncode == <span class="org-highlight-numbers-number">0</span>:
|
|
<span class="org-variable-name">fzf_file</span> = os.path.abspath(stdout.rstrip(<span class="org-string">'\n'</span>))
|
|
<span class="org-keyword">if</span> os.path.isdir(fzf_file):
|
|
<span class="org-keyword">self</span>.fm.cd(fzf_file)
|
|
<span class="org-keyword">else</span>:
|
|
<span class="org-keyword">self</span>.fm.select_file(fzf_file)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="postamble" class="status">
|
|
<p class="author">Author: Dehaeze Thomas</p>
|
|
<p class="date">Created: 2020-01-12 dim. 17:28</p>
|
|
</div>
|
|
</body>
|
|
</html>
|