ranger improvements and documentation

This commit is contained in:
Luke 2017-09-29 20:47:41 -04:00
parent 5e9896c677
commit 4f60ab1afa
5 changed files with 150 additions and 107 deletions

View File

@ -0,0 +1,83 @@
# Luke's ranger setup
## Basic Ranger shortcuts
These are the basic key binds in ranger, even outside of my configs. Note that they are mostly vim-based.
+ h/j/k/l -- Move left/down/up/right (where left moves up in the directory structure, right moves into a folder)
+ Space -- select/highlight file
+ dd -- cut selected files
+ yy -- copy/yank selected files
+ pp -- paste/move cut/copied files
+ / -- search, when (n/N) next/previos result
+ zh or CTRL-h -- show hidden files
+ Renaming files:
+ cw -- rename file from scratch
+ A -- rename file adding to the end
+ aa -- rename file appending before the extension
+ I -- rename file adding at the beginning
## Shortcuts
I've added many folder-specific shortcuts; refer to rc.conf for the specifics, but here's the idea. There are for "verbs:"
+ g -- "go or cd"
+ t -- "new tab"
+ m -- "move file"
+ Y -- "yank or copy file"
These "verbs" take "nouns" or "arguments," like these:
+ d -- "~/Documents"
+ D -- "~/Downloads"
+ cf -- "~/.config"
+ And many others, including those you add!
Press any "verb" followed by any "argument" to perform a folder operation. "gd" will cd to ~/Documents, for example. "mD" will move the selected file(s) to ~/Downloads. "tcf" will create a new tab in ~/.config, etc. etc.
## Many little additions!
+ Basic additions:
+ V -- Make a new file and edit it in vim
+ cW -- rename *all* selected files, editing in your text editor
+ mkd -- Make a directory/folder
+ sc -- Makes a link/shortcut (ln -sT)
+ D -- delete selected file
+ X -- Extract a zip/rar/tar.gz, whatever. Runs a script that picks the right command for the right archive.
+ Z -- zips a folder up into a .tar.gz archive.
+ CTRL-f -- Fuzzy find a file
+ CTRL-l -- Fuzzy locate a file
+ Document manipulation:
+ p1s -- print this file on the default printer, one-sided (lpr)
+ p2s -- print this file on the default printer, double-sided (lpr)
+ MP -- convert to a .pdf with pandoc (I use this to convert markdown, etc.)
+ MX -- compile selected document in XeLaTeX
+ ML -- compile selected document in LaTeX
+ TC -- clear all non-visible TeX build files in this directory
+ Txa -- copy article template to new file
+ Txs -- copy slideshow/beamer template to new file
+ Txh -- copy handout template to new file
+ Image commands:
+ bg -- (for i3 users) makes an image your background (assuming i3 is looking at ~/.config/wall.png for your background)
+ bw -- runs Pywal on the selected image, making it your background and generating a color scheme based off of it.
+ C -- rotates an image (requires imagemagick)
+ F -- flips an image (requires imagemagick)
+ TR -- add transparency to image file
+ mpd/mpc shortcuts
+ MS -- Start mpd
+ MK -- kill mpd
+ MN -- Start playing selected song/folder now
+ Ma -- Enqueue selected song/folder
+ Mp -- Pause
+ Mn -- Next track
+ Mb -- Previous track
+ Mo -- Restart track
+ Audio tagging with eye3D:
+ Ta -- change artist name
+ TA -- change album name
+ Tb -- change album artist
+ Tt -- change title
+ Tn -- change track number
+ Downloading:
+ ytv -- Download online video (paste in url) (requires youtube-dl)
+ yta -- Download audio of online video (paste in url) (requires youtube-dl)

View File

@ -1,40 +0,0 @@
# Luke's ranger setup
## Shortcuts
I've added many folder-specific shortcuts; refer to rc.conf for the specifics, but here's the idea. There are four "verbs:"
+ g -- "go or cd"
+ t -- "new tab"
+ m -- "move file"
+ Y -- "yank or copy file"
These "verbs" take "nouns" or "arguments," like these:
+ d -- "~/Documents"
+ D -- "~/Downloads"
+ cf -- "~/.config"
+ And many others, including those you add!
Press any "verb" followed by any "argument" to perform a folder operation. "gd" will cd to ~/Documents, for example. "mD" will move the selected file(s) to ~/Downloads. "tcf" will create a new tab in ~/.config, etc. etc.
## Many little things!
(Some of this has been changed or depreciated. I'll update soon.)
+ bg -- (for i3 users) makes an image your background (assuming i3 is looking at ~/.config/wall.png for your background)
+ X -- Extract a zip/rar/tar.gz, whatever. Runs a script that picks the right command for the right archive.
+ Z -- zips a folder up into a .tar.gz archive.
+ C -- rotates an image (requires imagemagick)
+ F -- flips an image (requires imagemagick)
+ moc shortcuts
+ MS -- Start server
+ MK -- kill server
+ MN -- Start playing selected song/folder now
+ Ma -- Enqueue selected song/folder
+ Mp -- Pause
+ Mn -- Next track
+ Mb -- Previous track
+ MP -- Convert .md file to .pdf (requires Pandoc)
+ ytv -- Download YouTube video (paste in url) (requires youtube-dl)
+ yta -- Download audio of YouTube video (paste in url) (requires youtube-dl)

View File

@ -1,7 +1,7 @@
###SETTINGS### ###SETTINGS###
set column_ratios 1,3,4 set column_ratios 1,3,4
#set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ #set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$ set hidden_filter ^\.|\.(?:pyc|vrb|pyo|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$
set show_hidden false set show_hidden false
set confirm_on_delete multiple set confirm_on_delete multiple
set preview_script ~/.config/ranger/scope.sh set preview_script ~/.config/ranger/scope.sh
@ -107,17 +107,18 @@ map cd console cd%space
#map Mp linemode permissions #map Mp linemode permissions
#map Mt linemode metatitle #map Mt linemode metatitle
#Music #moc
map Mc shell mocp -c #map Mc shell mocp -c
map Ma shell mocp -a %s #map Ma shell mocp -a %s
map Ms shell mocp -p #map Ms shell mocp -p
map MS shell mocp -S #map MS shell mocp -S
map Mp shell mocp -G #map Mp shell mocp -G
map Mn shell mocp -f #map Mn shell mocp -f
map Mb shell mocp -r #map Mb shell mocp -r
map MN shell mocp -s && mocp -c && mocp -a %s && mocp -p #map MN shell mocp -s && mocp -c && mocp -a %s && mocp -p
map Mo shell mocp -j 0%% #map Mo shell mocp -j 0%%
map MK shell killall mocp #map MK shell killall mocp
# Tagging / Marking # Tagging / Marking
@ -130,7 +131,6 @@ map uv mark_files all=True val=False
map vs toggle_visual_mode map vs toggle_visual_mode
map uV toggle_visual_mode reverse=True map uV toggle_visual_mode reverse=True
map V console shell vim%space
# For the nostalgics: Midnight Commander bindings # For the nostalgics: Midnight Commander bindings
@ -228,7 +228,6 @@ map yn shell -f echo -n %%f | xsel -i; xsel -o | xsel -i -b
# Filesystem Operations # Filesystem Operations
map = chmod map = chmod
map cw console rename%space map cw console rename%space
map cW bulkrename %s
map aa rename_append map aa rename_append
map A eval fm.open_console('rename ' + fm.thisfile.relative_path) map A eval fm.open_console('rename ' + fm.thisfile.relative_path)
map I eval fm.open_console('rename ' + fm.thisfile.relative_path, position=7) map I eval fm.open_console('rename ' + fm.thisfile.relative_path, position=7)
@ -242,8 +241,6 @@ map phl paste_hardlink
map pht paste_hardlinked_subtree map pht paste_hardlinked_subtree
map dD console delete map dD console delete
map D console delete
map mkd console mkdir%space
map dd cut map dd cut
map ud uncut map ud uncut
@ -459,65 +456,69 @@ tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c> copytmap <ESC> q Q w <C-c>
#MUSIC TAGGING
map Tr console shell taffy %s -r%space"
map Tl console shell taffy %s -l%space"
map Tt console shell taffy %s -t%space"
map Tn console shell taffy %s -n%space"
map Ty console shell taffy %s -n%space"
#ETC
map ss shell rsync -avrP --rsh='ssh -p2222' %s USERNAME@YOURSERVER
map X shell ~/.config/Scripts/extract.sh %f
map Z shell tar -cvzf %f.tar.gz %f
map ytv console shell youtube-dl -ic%space
map yta console shell youtube-dl -xic%space
#IMAGES
map bg shell cp %f ~/.config/wall.png && feh --bg-scale %f
map C shell killall w3mimgdisplay && convert -rotate 90 %s %s
map F shell killall w3mimgdisplay && convert -flop %s %s
map bl shell killall w3mimgdisplay && convert %s -resize 1440x1080\> bl_%s
map R shell convert %s %s
map TR shell convert %s -transparent white %s
map sv shell bash ~/.config/Scripts/shrinkvid.sh %f
map sp console shell bash ~/.config/Scripts/speedvid.sh %f%space map sp console shell bash ~/.config/Scripts/speedvid.sh %f%space
map x shell chmod -x %s
map TT shell i3 exec urxvt "%d"
map vc shell ~/.config/Scripts/concatenate.sh %s
#MOUNTING #General
map mnt shell sudo ~/.config/Scripts/mount.sh map V console shell vim%space
map umnt shell sudo ~/.config/Scripts/unmount.sh map cW bulkrename %s
map mkd console mkdir%space
map sc console shell ln -sT%space
map D console delete
map X shell ~/.config/Scripts/extract %f
map Z shell tar -cvzf %f.tar.gz %f
map <C-f> fzf_select
map <C-l> fzf_locate
#LATEX #Document Manipulation
map TC shell ~/.config/Scripts/clear.sh map p1s shell lpr -o sides=one-sided %f
#map TC shell find . -maxdepth 1 -regextype gnu-awk -regex "^.*\.(pyc|pyo|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)" -delete map p2s shell lpr -o sides=two-sided-long-edge %f
map MP shell pandoc %f -o %f.pdf
map MX shell xelatex %f
map ML shell latex %f
map TC shell ~/.config/Scripts/texclear
map Txa console shell cp ~/Documents/LaTeX/article.tex%space map Txa console shell cp ~/Documents/LaTeX/article.tex%space
map Txs console shell cp ~/Documents/LaTeX/beamer.tex%space map Txs console shell cp ~/Documents/LaTeX/beamer.tex%space
map Txh console shell cp ~/Documents/LaTeX/handout.tex%space map Txh console shell cp ~/Documents/LaTeX/handout.tex%space
#Image commands
map bg shell cp %f ~/.config/wall.png && feh --bg-scale %f
map bw shell wal -c -i %f && cp %f ~/.config/wall.png
map C shell killall w3mimgdisplay && convert -rotate 90 %s %s
map F shell killall w3mimgdisplay && convert -flop %s %s
map bl shell killall w3mimgdisplay && convert %s -resize 1440x1080\> bl_%s
map TR shell convert %s -transparent white %s
#MARKDOWN #Music (mpd) shortcuts
map MP shell ~/.config/Scripts/markdown-pdf.sh %f map MS shell mpd
map MD shell ~/.config/Scripts/markdown.sh %f map MK shell killall mpd
map Ma shell mpc add "%s"
map Ms shell mpc play
map Mp shell mpc toggle
map Mn shell mpc next
map Mb shell mpc prev
map MN shell mpc stop && mpc clear && mpc add "%s"
map Mo shell mpc seek 0%
#Audio tagging (Requires eyeD3)
map Ta eval fm.open_console('shell eyeD3 -a ' + fm.thisfile.relative_path, position=15)
#Artist
map TA eval fm.open_console('shell eyeD3 -A ' + fm.thisfile.relative_path, position=15)
#Album
map Tb eval fm.open_console('shell eyeD3 -b ' + fm.thisfile.relative_path, position=15)
#Album artist
map Tt eval fm.open_console('shell eyeD3 -t "" ' + fm.thisfile.relative_path, position=16)
map Tn eval fm.open_console('shell eyeD3 -n "" ' + fm.thisfile.relative_path, position=16)
map <C-f> fzf_select #Downloading
map <C-l> fzf_locate map ytv console shell youtube-dl -ic%space
map yta console shell youtube-dl -xic%space
#Work folder
map WK shell mkdir ~/Work -p && cd ~/Work
map WAD shell rm -rf ~/Work
#Printing
map p1s shell lpr -o sides=one-sided %f
map p2s shell lpr -o sides=two-sided-long-edge %f
#Videos
map vc shell ~/.config/Scripts/concatenate.sh %s
map x shell chmod -x %s
#MOVEMENT
#My own
map sup shell ~/.config/Scripts/webupdate
map ss shell rsync -avrP --rsh='ssh -p2222' %s lukesmith@lukesmith.xyz:/home1/lukesmith/public_html
map slt shell rsync -avrP --rsh='ssh -p2222' %s lukesmith@lukesmith.xyz:/home1/lukesmith/public_html/longterm

View File

@ -29,7 +29,7 @@ Check other config folders for more specific documentation. For example [config
[Email configuration](.config/mutt/email.md) [Email configuration](.config/mutt/email.md)
[ranger configuration](.config/ranger/ranger.md) [ranger configuration](.config/ranger/luke_ranger_readme.md)
## Dynamic Configuration Files ## Dynamic Configuration Files

View File

@ -1 +0,0 @@
/home/luke/test.md