|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<!-- 2021-01-03 dim. 22:51 -->
|
|
|
|
|
<!-- 2021-01-08 ven. 01:33 -->
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
|
|
|
<title>Ranger</title>
|
|
|
|
|
<meta name="generator" content="Org mode" />
|
|
|
|
@ -38,7 +38,7 @@
|
|
|
|
|
</li>
|
|
|
|
|
<li><a href="#orgd57ea4e">Define keys for the browser</a>
|
|
|
|
|
<ul>
|
|
|
|
|
<li><a href="#org5ba4b89">Basic</a></li>
|
|
|
|
|
<li><a href="#org49c5be5">Basic</a></li>
|
|
|
|
|
<li><a href="#org1c6f91a">Open Shell in current directory</a></li>
|
|
|
|
|
<li><a href="#orgdf72b75">Open With</a></li>
|
|
|
|
|
<li><a href="#org8e148cf">Filter</a></li>
|
|
|
|
@ -62,7 +62,7 @@
|
|
|
|
|
</li>
|
|
|
|
|
<li><a href="#org7e7a4ec">Define keys for the console</a>
|
|
|
|
|
<ul>
|
|
|
|
|
<li><a href="#org49c5be5">Basic</a></li>
|
|
|
|
|
<li><a href="#org527bd08">Basic</a></li>
|
|
|
|
|
<li><a href="#orga9f3972">Move around</a></li>
|
|
|
|
|
<li><a href="#org6265874">Line Editing</a></li>
|
|
|
|
|
</ul>
|
|
|
|
@ -280,7 +280,7 @@ alias travel scout -aefiklst
|
|
|
|
|
Extract
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,x shell ~/.config/ranger/scripts/extract.sh %f
|
|
|
|
|
<pre class="src src-conf">map ,x shell ~/.config/ranger/scripts/extract.sh %f
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -288,7 +288,7 @@ Extract
|
|
|
|
|
Compress
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,z shell ~/.config/ranger/scripts/compress.sh %f
|
|
|
|
|
<pre class="src src-conf">map ,z shell ~/.config/ranger/scripts/compress.sh %f
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -296,7 +296,7 @@ Compress
|
|
|
|
|
Get Bibtex from PDF
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,b shell pdf2bib %f
|
|
|
|
|
<pre class="src src-conf">map ,b shell pdf2bib %f
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -304,7 +304,7 @@ Get Bibtex from PDF
|
|
|
|
|
Delete first page of pdf
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,d shell pdf-delete-first-page %f
|
|
|
|
|
<pre class="src src-conf">map ,d shell pdf-delete-first-page %f
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -312,8 +312,8 @@ Delete first page of pdf
|
|
|
|
|
Convert images/pdf/…
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,cp shell pdf2png %f
|
|
|
|
|
map ,cc shell convert-file %f
|
|
|
|
|
<pre class="src src-conf">map ,cp shell pdf2png %f
|
|
|
|
|
map ,cc shell convert-file %f
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -321,7 +321,7 @@ Convert images/pdf/…
|
|
|
|
|
Magit Status
|
|
|
|
|
</p>
|
|
|
|
|
<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 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>
|
|
|
|
|
|
|
|
|
@ -329,7 +329,7 @@ Magit Status
|
|
|
|
|
Open SXIV on current directory
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,s shell nohup sxiv -t %d &
|
|
|
|
|
<pre class="src src-conf">map ,s shell nohup sxiv -t %d &
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -337,8 +337,8 @@ Open SXIV on current directory
|
|
|
|
|
Upload with 0x0 / self hosted Tansfer.sh
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,t shell upload %f
|
|
|
|
|
map ,T shell share %f
|
|
|
|
|
<pre class="src src-conf">map ,t shell upload %f
|
|
|
|
|
map ,T shell share %f
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -346,7 +346,7 @@ Upload with 0x0 / self hosted Tansfer.sh
|
|
|
|
|
Open current folder with PCManFM
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,o shell nohup pcmanfm %d &
|
|
|
|
|
<pre class="src src-conf">map ,o shell nohup pcmanfm %d &
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -354,7 +354,7 @@ Open current folder with PCManFM
|
|
|
|
|
Open with Emacs
|
|
|
|
|
</p>
|
|
|
|
|
<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 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>
|
|
|
|
|
|
|
|
|
@ -362,7 +362,7 @@ Open with Emacs
|
|
|
|
|
Print on Rnice
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,p shell print-rnice %f &
|
|
|
|
|
<pre class="src src-conf">map ,p shell print-rnice %f &
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -370,7 +370,7 @@ Print on Rnice
|
|
|
|
|
Backup to NAS
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ,B shell ~/.config/ranger/scripts/backup-to-nas.sh %s &
|
|
|
|
|
<pre class="src src-conf">map ,B shell ~/.config/ranger/scripts/backup-to-nas.sh %s &
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -384,11 +384,11 @@ Backup to NAS
|
|
|
|
|
<h4 id="org7681c16">Extract Script</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org7681c16">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-bash"> <span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
|
|
|
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
|
|
|
tmux split -v -l <span class="org-highlight-numbers-number">2</span> atool -x $<span class="org-highlight-numbers-number">1</span> && tmux select-pane -U
|
|
|
|
|
<span class="org-keyword">else</span>
|
|
|
|
|
<span class="org-keyword">else</span>
|
|
|
|
|
atool -x $<span class="org-highlight-numbers-number">1</span>
|
|
|
|
|
<span class="org-keyword">fi</span>
|
|
|
|
|
<span class="org-keyword">fi</span>
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -398,11 +398,11 @@ Backup to NAS
|
|
|
|
|
<h4 id="orgd110a48">Compress Script</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-orgd110a48">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-bash"> <span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
|
|
|
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
|
|
|
tmux split -v -l <span class="org-highlight-numbers-number">2</span> apack $<span class="org-rainbow-delimiters-depth-1">{</span><span class="org-variable-name">1</span>%.*<span class="org-rainbow-delimiters-depth-1">}</span>.zip $<span class="org-highlight-numbers-number">1</span> && tmux select-pane -U
|
|
|
|
|
<span class="org-keyword">else</span>
|
|
|
|
|
<span class="org-keyword">else</span>
|
|
|
|
|
apack $<span class="org-rainbow-delimiters-depth-1">{</span><span class="org-variable-name">1</span>%.*<span class="org-rainbow-delimiters-depth-1">}</span>.zip $<span class="org-highlight-numbers-number">1</span>
|
|
|
|
|
<span class="org-keyword">fi</span>
|
|
|
|
|
<span class="org-keyword">fi</span>
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -417,11 +417,11 @@ Backup to NAS
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-bash"> <span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
|
|
|
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
|
|
|
tmux split -v -l <span class="org-highlight-numbers-number">2</span> rsync -a --inplace --info=progress2 --rsh=<span class="org-string">'ssh -p10022'</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">@</span></span><span class="org-string">"</span> nas:/volume1/Data/Downloads/Backup/ && tmux select-pane -U
|
|
|
|
|
<span class="org-keyword">else</span>
|
|
|
|
|
<span class="org-keyword">else</span>
|
|
|
|
|
rsync -a --info=progress2 --inplace --rsh=<span class="org-string">'ssh -p10022'</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">@</span></span><span class="org-string">"</span> nas:/volume1/Data/Downloads/Backup/
|
|
|
|
|
<span class="org-keyword">fi</span>
|
|
|
|
|
<span class="org-keyword">fi</span>
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -436,11 +436,11 @@ Backup to NAS
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-bash"> <span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
|
|
|
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
|
|
|
tmux split -v -l <span class="org-highlight-numbers-number">1</span> rsync -a --info=progress2 <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">{@:2}</span></span><span class="org-string">"</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> && tmux select-pane -U
|
|
|
|
|
<span class="org-keyword">else</span>
|
|
|
|
|
<span class="org-keyword">else</span>
|
|
|
|
|
rsync -a --info=progress2 <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">{@:2}</span></span><span class="org-string">"</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span>
|
|
|
|
|
<span class="org-keyword">fi</span>
|
|
|
|
|
<span class="org-keyword">fi</span>
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -452,40 +452,40 @@ Backup to NAS
|
|
|
|
|
<h3 id="orgd57ea4e">Define keys for the browser</h3>
|
|
|
|
|
<div class="outline-text-3" id="text-orgd57ea4e">
|
|
|
|
|
</div>
|
|
|
|
|
<div id="outline-container-org5ba4b89" class="outline-4">
|
|
|
|
|
<h4 id="org5ba4b89">Basic</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org5ba4b89">
|
|
|
|
|
<div id="outline-container-org49c5be5" class="outline-4">
|
|
|
|
|
<h4 id="org49c5be5">Basic</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org49c5be5">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map Q quit!
|
|
|
|
|
map q eval fm.execute_console(<span class="org-string">"shell tmux detach"</span>) if <span class="org-string">'TMUX'</span> in os.environ.keys() else fm.execute_console(<span class="org-string">"quit"</span>)
|
|
|
|
|
<pre class="src src-conf">map Q quit!
|
|
|
|
|
map q eval fm.execute_console(<span class="org-string">"shell tmux detach"</span>) if <span class="org-string">'TMUX'</span> in os.environ.keys() else fm.execute_console(<span class="org-string">"quit"</span>)
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map <C-c> abort
|
|
|
|
|
map <esc> change_mode normal
|
|
|
|
|
map ~ set viewmode!
|
|
|
|
|
<pre class="src src-conf">map <C-c> abort
|
|
|
|
|
map <esc> change_mode normal
|
|
|
|
|
map ~ set viewmode!
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ? help
|
|
|
|
|
<pre class="src src-conf">map ? help
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map : console
|
|
|
|
|
map ; console
|
|
|
|
|
<pre class="src src-conf">map : console
|
|
|
|
|
map ; console
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ! console shell%space
|
|
|
|
|
<pre class="src src-conf">map ! console shell%space
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map @ console -p6 shell %%s
|
|
|
|
|
<pre class="src src-conf">map @ console -p6 shell %%s
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -495,8 +495,8 @@ Backup to NAS
|
|
|
|
|
<h4 id="org1c6f91a">Open Shell in current directory</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org1c6f91a">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map s shell $SHELL
|
|
|
|
|
map S shell nohup $TERMINAL &
|
|
|
|
|
<pre class="src src-conf">map s shell $SHELL
|
|
|
|
|
map S shell nohup $TERMINAL &
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -506,7 +506,7 @@ Backup to NAS
|
|
|
|
|
<h4 id="orgdf72b75">Open With</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-orgdf72b75">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map O chain draw_possible_programs; console open_with%space
|
|
|
|
|
<pre class="src src-conf">map O chain draw_possible_programs; console open_with%space
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -516,9 +516,9 @@ Backup to NAS
|
|
|
|
|
<h4 id="org8e148cf">Filter</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org8e148cf">
|
|
|
|
|
<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 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>
|
|
|
|
@ -528,8 +528,8 @@ Backup to NAS
|
|
|
|
|
<h4 id="org29cf3e5">Tagging / Marking</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org29cf3e5">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> <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
|
|
|
|
|
<pre class="src src-conf"><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
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -539,12 +539,12 @@ Backup to NAS
|
|
|
|
|
<h4 id="org8818767">VIM-like</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org8818767">
|
|
|
|
|
<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
|
|
|
|
|
<pre class="src src-conf">copymap <UP> k
|
|
|
|
|
copymap <DOWN> j
|
|
|
|
|
copymap <LEFT> h
|
|
|
|
|
copymap <RIGHT> l
|
|
|
|
|
copymap <HOME> gg
|
|
|
|
|
copymap <END> G
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -554,24 +554,24 @@ Backup to NAS
|
|
|
|
|
<h4 id="org093bc04">Jumping around</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org093bc04">
|
|
|
|
|
<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>
|
|
|
|
|
<pre class="src src-conf">map H history_go -1
|
|
|
|
|
map L history_go <span class="org-highlight-numbers-number">1</span>
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map ] move_parent <span class="org-highlight-numbers-number">1</span>
|
|
|
|
|
map [ move_parent -1
|
|
|
|
|
<pre class="src src-conf">map ] move_parent <span class="org-highlight-numbers-number">1</span>
|
|
|
|
|
map [ move_parent -1
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map } traverse
|
|
|
|
|
<pre class="src src-conf">map } traverse
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map cd console cd%space
|
|
|
|
|
<pre class="src src-conf">map cd console cd%space
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -581,15 +581,15 @@ Backup to NAS
|
|
|
|
|
<h4 id="org20acc37">Go to special folders</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org20acc37">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map gh cd ~/
|
|
|
|
|
map gb cd ~/Cloud/brain
|
|
|
|
|
map gm cd ~/Cloud/thesis
|
|
|
|
|
map gp cd ~/Pictures
|
|
|
|
|
map gP cd ~/Cloud/personal
|
|
|
|
|
map gT cd ~/.local/share/Trash/files
|
|
|
|
|
map gd cd ~/Downloads
|
|
|
|
|
map gc cd ~/Cloud
|
|
|
|
|
map gV cd ~/.config/literate-dotfiles
|
|
|
|
|
<pre class="src src-conf">map gh cd ~/
|
|
|
|
|
map gb cd ~/Cloud/brain
|
|
|
|
|
map gm cd ~/Cloud/thesis
|
|
|
|
|
map gp cd ~/Pictures
|
|
|
|
|
map gP cd ~/Cloud/personal
|
|
|
|
|
map gT cd ~/.local/share/Trash/files
|
|
|
|
|
map gd cd ~/Downloads
|
|
|
|
|
map gc cd ~/Cloud
|
|
|
|
|
map gV cd ~/.config/literate-dotfiles
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -599,10 +599,10 @@ Backup to NAS
|
|
|
|
|
<h4 id="orga3a9ba6">Get size of folders</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-orga3a9ba6">
|
|
|
|
|
<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 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>
|
|
|
|
@ -612,12 +612,12 @@ Backup to NAS
|
|
|
|
|
<h4 id="org8fee5b5">Yank path of directory/file</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org8fee5b5">
|
|
|
|
|
<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 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>
|
|
|
|
@ -627,7 +627,7 @@ Backup to NAS
|
|
|
|
|
<h4 id="orgf653bf2">Drag and Drop</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-orgf653bf2">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map D shell dragon-drag-and-drop -a -x %p
|
|
|
|
|
<pre class="src src-conf">map D shell dragon-drag-and-drop -a -x %p
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -637,10 +637,10 @@ Backup to NAS
|
|
|
|
|
<h4 id="orgf520032">Rename files</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-orgf520032">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map a rename_append
|
|
|
|
|
map C 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>)
|
|
|
|
|
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 class="src src-conf">map a rename_append
|
|
|
|
|
map C 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>)
|
|
|
|
|
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>
|
|
|
|
@ -650,14 +650,14 @@ Backup to NAS
|
|
|
|
|
<h4 id="org402e074">Paste files</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org402e074">
|
|
|
|
|
<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 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>
|
|
|
|
|
|
|
|
|
@ -665,7 +665,7 @@ Backup to NAS
|
|
|
|
|
Paste with Rsync
|
|
|
|
|
</p>
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map pr shell ~/.config/ranger/scripts/paste-rsync.sh %d %c
|
|
|
|
|
<pre class="src src-conf">map pr shell ~/.config/ranger/scripts/paste-rsync.sh %d %c
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -675,9 +675,9 @@ Paste with Rsync
|
|
|
|
|
<h4 id="org5c2f844">Delete and move files</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org5c2f844">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map dD shell -s trash-put %s
|
|
|
|
|
map dd cut
|
|
|
|
|
map du uncut
|
|
|
|
|
<pre class="src src-conf">map dD shell -s trash-put %s
|
|
|
|
|
map dd cut
|
|
|
|
|
map du uncut
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -687,8 +687,8 @@ Paste with Rsync
|
|
|
|
|
<h4 id="org8c6e09d">Copy files</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org8c6e09d">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map yy copy
|
|
|
|
|
map yu uncut
|
|
|
|
|
<pre class="src src-conf">map yy copy
|
|
|
|
|
map yu uncut
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -698,9 +698,9 @@ Paste with Rsync
|
|
|
|
|
<h4 id="org9bae784">Searching</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org9bae784">
|
|
|
|
|
<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
|
|
|
|
|
<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
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -710,14 +710,14 @@ Paste with Rsync
|
|
|
|
|
<h4 id="org179497a">Tabs</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org179497a">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map <C-n> tab_new ~
|
|
|
|
|
map <C-w> tab_close
|
|
|
|
|
<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 <TAB> tab_move <span class="org-highlight-numbers-number">1</span>
|
|
|
|
|
map <S-TAB> tab_move -1
|
|
|
|
|
|
|
|
|
|
map gn tab_new ~
|
|
|
|
|
map gt tab_move <span class="org-highlight-numbers-number">1</span>
|
|
|
|
|
map gn tab_new ~
|
|
|
|
|
map gt tab_move <span class="org-highlight-numbers-number">1</span>
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -727,10 +727,10 @@ Paste with Rsync
|
|
|
|
|
<h4 id="org9362376">Settings</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org9362376">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map zh set show_hidden!
|
|
|
|
|
<pre class="src src-conf">map zh set show_hidden!
|
|
|
|
|
|
|
|
|
|
map zi set preview_images!
|
|
|
|
|
map zv set use_preview_script!
|
|
|
|
|
map zi set preview_images!
|
|
|
|
|
map zv set use_preview_script!
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -740,13 +740,13 @@ Paste with Rsync
|
|
|
|
|
<h4 id="org3d82580">Bookmarks</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org3d82580">
|
|
|
|
|
<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>
|
|
|
|
|
<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>
|
|
|
|
|
<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>
|
|
|
|
@ -756,7 +756,7 @@ Paste with Rsync
|
|
|
|
|
<h4 id="orgc3db4a0">FZF</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-orgc3db4a0">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-conf"> map <C-f> fzf_select
|
|
|
|
|
<pre class="src src-conf">map <C-f> fzf_select
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -767,9 +767,9 @@ Paste with Rsync
|
|
|
|
|
<h3 id="org7e7a4ec">Define keys for the console</h3>
|
|
|
|
|
<div class="outline-text-3" id="text-org7e7a4ec">
|
|
|
|
|
</div>
|
|
|
|
|
<div id="outline-container-org49c5be5" class="outline-4">
|
|
|
|
|
<h4 id="org49c5be5">Basic</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org49c5be5">
|
|
|
|
|
<div id="outline-container-org527bd08" class="outline-4">
|
|
|
|
|
<h4 id="org527bd08">Basic</h4>
|
|
|
|
|
<div class="outline-text-4" id="text-org527bd08">
|
|
|
|
|
<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)
|
|
|
|
@ -820,209 +820,209 @@ copycmap <end> <C-e>
|
|
|
|
|
<h2 id="org9007d23">Rifle</h2>
|
|
|
|
|
<div class="outline-text-2" id="text-org9007d23">
|
|
|
|
|
<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>
|
|
|
|
|
<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-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-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">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-variable-name">ext org</span> = emacsclient -c <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">Misc</span>
|
|
|
|
|
<span class="org-comment-delimiter">#</span><span class="org-comment">-------------------------------------------</span>
|
|
|
|
|
<span class="org-variable-name">ext org</span> = emacsclient -c <span class="org-string">"$1"</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-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>
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
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">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">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">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">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-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 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 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 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 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-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-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-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-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-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">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">-------------------------------------------</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-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">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">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>
|
|
|
|
|
<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>
|
|
|
|
@ -1036,9 +1036,9 @@ copycmap <end> <C-e>
|
|
|
|
|
<h3 id="org58a0d43">Import</h3>
|
|
|
|
|
<div class="outline-text-3" id="text-org58a0d43">
|
|
|
|
|
<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> *
|
|
|
|
|
<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
|
|
|
|
|
<span class="org-keyword">import</span> os
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -1048,7 +1048,7 @@ copycmap <end> <C-e>
|
|
|
|
|
<h3 id="orgb79cde7">fzf_select</h3>
|
|
|
|
|
<div class="outline-text-3" id="text-orgb79cde7">
|
|
|
|
|
<div class="org-src-container">
|
|
|
|
|
<pre class="src src-python"> <span class="org-keyword">class</span> <span class="org-type">fzf_select</span>(Command):
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
@ -1085,7 +1085,7 @@ copycmap <end> <C-e>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="postamble" class="status">
|
|
|
|
|
<p class="author">Author: Dehaeze Thomas</p>
|
|
|
|
|
<p class="date">Created: 2021-01-03 dim. 22:51</p>
|
|
|
|
|
<p class="date">Created: 2021-01-08 ven. 01:33</p>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|