diff --git a/.config/ranger/luke_ranger_readme.md b/.config/ranger/luke_ranger_readme.md new file mode 100644 index 00000000..c118444d --- /dev/null +++ b/.config/ranger/luke_ranger_readme.md @@ -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) diff --git a/.config/ranger/ranger.md b/.config/ranger/ranger.md deleted file mode 100644 index 93bf16b1..00000000 --- a/.config/ranger/ranger.md +++ /dev/null @@ -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) diff --git a/.config/ranger/rc.conf.base b/.config/ranger/rc.conf.base index d5f96445..978e4379 100644 --- a/.config/ranger/rc.conf.base +++ b/.config/ranger/rc.conf.base @@ -1,7 +1,7 @@ ###SETTINGS### set column_ratios 1,3,4 #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 confirm_on_delete multiple set preview_script ~/.config/ranger/scope.sh @@ -107,17 +107,18 @@ map cd console cd%space #map Mp linemode permissions #map Mt linemode metatitle -#Music -map Mc shell mocp -c -map Ma shell mocp -a %s -map Ms shell mocp -p -map MS shell mocp -S -map Mp shell mocp -G -map Mn shell mocp -f -map Mb shell mocp -r -map MN shell mocp -s && mocp -c && mocp -a %s && mocp -p -map Mo shell mocp -j 0%% -map MK shell killall mocp +#moc +#map Mc shell mocp -c +#map Ma shell mocp -a %s +#map Ms shell mocp -p +#map MS shell mocp -S +#map Mp shell mocp -G +#map Mn shell mocp -f +#map Mb shell mocp -r +#map MN shell mocp -s && mocp -c && mocp -a %s && mocp -p +#map Mo shell mocp -j 0%% +#map MK shell killall mocp + # Tagging / Marking @@ -130,7 +131,6 @@ map uv mark_files all=True val=False map vs toggle_visual_mode map uV toggle_visual_mode reverse=True -map V console shell vim%space # 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 map = chmod map cw console rename%space -map cW bulkrename %s map aa rename_append map A eval fm.open_console('rename ' + fm.thisfile.relative_path) 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 dD console delete -map D console delete -map mkd console mkdir%space map dd cut map ud uncut @@ -459,65 +456,69 @@ tmap taskview_close copytmap q Q w -#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 x shell chmod -x %s +map TT shell i3 exec urxvt "%d" +map vc shell ~/.config/Scripts/concatenate.sh %s -#MOUNTING -map mnt shell sudo ~/.config/Scripts/mount.sh -map umnt shell sudo ~/.config/Scripts/unmount.sh +#General +map V console shell vim%space +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 fzf_select +map fzf_locate -#LATEX -map TC shell ~/.config/Scripts/clear.sh -#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 +#Document Manipulation +map p1s shell lpr -o sides=one-sided %f +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 Txs console shell cp ~/Documents/LaTeX/beamer.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 -map MP shell ~/.config/Scripts/markdown-pdf.sh %f -map MD shell ~/.config/Scripts/markdown.sh %f +#Music (mpd) shortcuts +map MS shell mpd +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 fzf_select -map fzf_locate - -#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 +#Downloading +map ytv console shell youtube-dl -ic%space +map yta console shell youtube-dl -xic%space +#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 diff --git a/README.md b/README.md index e6c6b4bc..d4dc49e3 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Check other config folders for more specific documentation. For example [config [Email configuration](.config/mutt/email.md) -[ranger configuration](.config/ranger/ranger.md) +[ranger configuration](.config/ranger/luke_ranger_readme.md) ## Dynamic Configuration Files diff --git a/test.md b/test.md deleted file mode 120000 index c4820d7b..00000000 --- a/test.md +++ /dev/null @@ -1 +0,0 @@ -/home/luke/test.md \ No newline at end of file