rw-r-r- 1 cytopia staff 2624 Sep 23 01:02 commands.py Now you can go to ~/.config/ranger and see what files have been generated: cd ~/.config/rangerĭrwxr-xr-x 7 cytopia staff 238 Sep 23 01:02. If you are using ranger for the first time, generate the ranger config files.
# Download it to /usr/local/bin (requires sudo)įor all ranger previews you can optionally install the above listed dependencies via homebrew: brew install libcaca highlight atool lynx w3m elinks poppler transmission mediainfo exiftool
If you have a ~/bin directory, just put it there and it will work for your user only, otherwise put it into /usr/local/bin for all users. # Install homebrewĭownload the latest copy of imgcat from github and put it into a bin directory which is inside your $PATH variable. So we first have to install it and then simply use it to install ranger itself. On OSX most cli applications can be installed using homebrew. mediainfo or exiftool for viewing information about media files.transmission-show for viewing bit-torrent information.lynx, w3m or elinks for previews of html pages.highlight for syntax highlighting of code.img2txt (from caca-utils) for previewing images in ASCII-art.The python module chardet, in case of encoding detection problems.
You need to make sure to meet the following requirements.Īs of now, the stable release of iTerm2 does not support image preview so you will have to download the test version here.Īlso note to get the full range of previews in ranger you will need the following optional tools: Sed -e "s/set\spreview_images_method.*$/set preview_images_method iterm3/" ~/.config/ranger/rc.conf > ~/.tmp.tmp \
& mv ~/.tmp.tmp ~/.config/ranger/rc.conf & rm ~/.tmp.tmp Sed -e "s/set\spreview_images\s.*$/set preview_images true/" ~/.config/ranger/rc.conf > ~/.tmp.tmp \ Install iTerm >= 2.9 and... # Install homebrewĬommand -v brew > /dev/null 2&>1 || ruby -e "$(curl -fsSL )" Here you can see step by step how it gets done. Go to Preferences > Profiles > Text > Font and select (or type) the Droid Sans Mono for Powerline font.How to configure ranger image preview on OSX with iTerm2? Ranger’s image preview in iTerm2 does not work out of the box and you will need some additional scripts and config settings to get it working. Now configure your iTerm profile to use the Droid Sans Mono for Powerline font. It appears that the used font in the powerline uses characters which need a special / patched font. This is the solution to get rid of the squares with questionmarks in your oh-my-zsh installation. Now select this theme in your ~/.zshrc file ZSH_THEME="powerlevel9k/powerlevel9k" Install the fonts I used the powerlevel9k theme from here: git clone ~/.oh-my-zsh/custom/themes/powerlevel9k Install oh-my-zshĭirections taken from: sh -c "$(curl -fsSL )" Set the the theme oh-my-zsh now showing icons correctlyįollow the instructions on this page to get the same result.
The zsh shell was showing squares with questionmarks in it.Īfter fixing, this is what oh my zsh looks like in iterm on my Macbook Pro running macOS Catalina. When I followed the guides I found online on this topic, this was what I ended up with: zsh with powerline showing squares with questionmarksĬlearly, something went wrong.