Questions tagged [ranger]

Ranger is a terminal-based file manager with vi-style key bindings.

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

Change firefox's file selection dialog

When pressing Control+O firefox opens a file browser. I believe it's the GTK file selection dialog. I would like firefox to use my default file browser (ranger in my case) to open or save files. So ...
  • 1
1 vote
0 answers
43 views

How to send Alt+1 to CLI when multiple tabs are open in gnome-terminal?

Both ranger and the gnome-terminal use Alt + 1, Alt + 2 etc to switch to the corresponding tab. So if a gnome-terminal window only has one tab and ranger is open, then pressing Alt + 2 will go the ...
  • 113
0 votes
1 answer
116 views

How do I reset the tags in the ranger file browser?

I have made a small script to list all my tagged files with ranger with ranger --list-tagged-files=* and put that list into another file (called todo). After a while I deleted and changed the name of ...
0 votes
0 answers
20 views

How to cleanly take input to a ranger binding

I would like to take an input to a ranger binding. Right now, my config looks like this: map nm shell read FILENAME && touch ${FILENAME}.md This works, but when I take the input it looks ...
1 vote
0 answers
12 views

Ranger: difficulties passing strings to `open_console`

I am starting to use ranger on linux, and I want to bind a key \ to place the string scout -ft in the ranger console. I added in rc.conf the following: map open_console scout -ft this does open the ...
  • 111
1 vote
0 answers
68 views

ranger chain commands in config

I am using ranger as my terminal file manager and now that I understand the basics, I wanted to get a bit deeper into customizing the rc for my purposes. One thing I like to do is to map a command to ...
  • 9
0 votes
0 answers
38 views

Ranger is laggy and crashing while using in directory mounted by SSHFS

I mount directory from my server it gets super laggy. It shows all directories and files but It is irresponsive. after quiting it I see this error: Exception ignored in: <generator object Directory....
0 votes
1 answer
219 views

Ranger file manager as the singleton instance on shell startup

Problem: I use zsh and added to its config file a line of launching ranger on startup. .zshrc # A few other settings and commands. ZSH_TMUX_AUTOSTART="true" plugins=(tmux ...) source ranger ...
  • 15
0 votes
1 answer
127 views

html file to picture on cli of ranger preview

I would like to preview html files in ranger as pictures similarly how pdf files can be previewed. I imagine first it would be needed to force it into A4 page or something of the like, so it's a ...
  • 445
1 vote
1 answer
172 views

Ranger File Manager as Default File Manager Errors

I could not get Ranger to be my default file manager using every tutorial I could find. Help is appreciated - I'll describe my attempts below: In Default Application -> Utilities -> Other... -&...
0 votes
1 answer
126 views

ranger does not show filepreview when in tmux

I just discovered a strange behavior in my ranger-setup. When browsing through source-files with ranger (where I started ranger from within tmux) I realized that the preview-pane does not show my text-...
0 votes
0 answers
101 views

i3wm - Problem starting terminal app in floating mode in Arco Linux

im trying to run ranger file manager in floating mode with a keybinding. Ranger is a file manager that runs on a terminal, im currently using urxvt I put this lines in my i3 config: bindsym $mod+Shift+...
  • 3
0 votes
1 answer
198 views

Opening current directory with explorer within file manager ranger (WSL)

I'm using WSL and i want a keybinding to opening windows explorer on the current directory path within ranger (file manager (https://github.com/ranger/ranger). In the shell i can open a explorer ...
0 votes
1 answer
138 views

How to list all tagged files in ranger

I have a nested directory with tagged files across the subdirectories. Is there any way to list all marked files in this nested hierarchy?
0 votes
1 answer
1k views

Ranger: set default apps for files

I use arch linux, ranger and nvim. When I try to open any text file, ranger does not do anything and this is on output: /bin/sh: line 1: vim: command not found What can i do to open file in neovim ?
0 votes
1 answer
264 views

Ranger: custom file sorting (dotfiles at the end of listing)

I am using ranger as cli file manager. I would love to order files in this way: Folders alphabetically Files alphabetically Folders starting with . alphabetically Files starting with . alphabetically ...
3 votes
1 answer
3k views

Alacritty Ranger w3m: Images are not showing or disappear after few seconds

I am using Alacritty and ranger. I have also installed w3m. This is part of my ~/.config/ranger/rc.conf: set preview_images true set preview_images_method w3m set w3m_offset 0 Most of the time images ...
2 votes
0 answers
229 views

Ranger image preview not working in URXVT running Fish shell until I open an image in Feh

I recently started using the Fish shell, and after opening a new URXVT instance I cannot get image previews in Ranger until I open an image first (using feh, in my case). Once an image has been opened ...
0 votes
2 answers
1k views

Ranger: ModuleNotFoundError: No module named 'ranger'

I have ranger on Arch linux. When I try to run it throws error: Traceback (most recent call last): File "/usr/bin/ranger", line 35, in <module> import ranger # NOQA pylint: ...
1 vote
1 answer
647 views

How to have ranger for linux open up files that are images or videos?

I'm a complete noob to sudo commands or even bash but I have no direction in how to start opening files with ranger. Barely experience with linux, but I do know how to install using sudo apt install. ...
1 vote
1 answer
346 views

strange situation when running ranger as: "terminal -e ranger"

when I open ranger in the terminal as: ranger, everything is Ok. However, when I open it for example as: alacritty -e ranger the strange situation happens (1st figure). for fixing it i have to ...
  • 132
1 vote
1 answer
133 views

Ranger key mapping move multiple selected file and move without enter the return key

I want to fast move things to different folder here is my mapping map mh shell -f mv %f /home/sln map mw shell -f mv %f /home/sln/Work map md shell -f mv %f /home/sln/Documents map mk shell -f mv %f /...
  • 279
2 votes
1 answer
467 views

ranger file explorer — how to change the font (ie, to this linked example)

My question: how do I change the font in Ranger? The custom colorscheme files I have downloaded don’t seem to ‘include’ their font (ie, see this one from this theme)? I suspect it may involve ...
  • 87
3 votes
3 answers
1k views

ranger: how to disable the preview column entirely

My question: How to turn off the preview-column (right-most column in ranger) entirely? I can’t use the solution set column_ratio 1, since I want > 1 columns for showing as parent directories. In ...
  • 87
1 vote
1 answer
968 views

ranger file explorer: how to change into 2 panes at most (for vertically narrow console)

I’ve scanned the ? commands inside ranger as well as some cheat sheets people made online, but to no avail. How do I change ranger to only use 2 panes (or less)? I don’t mind getting rid of the ...
  • 87
1 vote
2 answers
672 views

Neomutt run command to attach file on macro key press

I'm trying to use ranger to attach files to a mail in NeoMutt. What I have so far is Run ranger to select the file to attach and save its name to /tmp/muttattach with ranger --choosefile=/tmp/...
  • 123
0 votes
1 answer
156 views

Ranger: How can I yank the selected files from commands.py?

I copied this snipped from the arch wiki. But instead of extracting the selected files, it extracts the yanked files. So I'd like to know one of this two things: How can I make extract_here using the ...
0 votes
1 answer
268 views

Opening an interactive terminal from ranger

Let's say I want to open xfce4-terminal from ranger with a keybind, like map XX shell myterm Is it possible? How?
0 votes
1 answer
251 views

What package do I need to install to get video-previews in Debian's ranger?

What package does Ranger require to generate video-image previews in Debian? I'm using the ranger from apt and when I try to view a video's thumbnail I get, Image previews in kitty require PIL (...
4 votes
1 answer
540 views

How to send key bind occupied/interpreted by tmux to program running in tmux?

Let's say I'm running ranger inside tmux session, but I want to send a keyboard shortcut to ranger (e.g. Ctrl+H) which is already used in tmux. Is there a passthrough mode to send key binding to ...
  • 143
3 votes
0 answers
512 views

Copy any kind of file to clipboard with xclip

So, I want to be able to copy any kind of file to an X clipboard with a shell script (mostly as a means to copy files in ranger, to gui applications). So far i have this script: TYPE=$(file -b --mime-...
  • 31
6 votes
3 answers
7k views

Search and select all matching files in Ranger

Say that I have the following files in the current directory : aa01.txt aa02.txt bb01.txt bb02.txt cc01.txt ... Is there a way I can search for a given pattern and select ALL the matching files at ...
  • 161
2 votes
1 answer
281 views

Check if I'm in a shell through ranger

In ranger, you can hit S to jump into a shell and ctrl+D to get back to ranger. When I've been in a shell for a while and I want to jump to ranger, I'm unsure if this is a regular shell and I should ...
1 vote
1 answer
395 views

Recovering mutt attachment filenames

I have a small mutt macro to save attachments using my file manager (ranger, as it happens). It looks like this: macro attach S "<pipe-message>muttsaveattach"<enter> where ...
  • 123
0 votes
1 answer
26 views

Pass multiple directories to be opened by ranger in single instance?

Is there some way I can pass a "list" of unrelated directories for example: /tmp/ /home/chris /home/chris/example Into ranger's interface? Similar to what can be done with ls with the -d argument.
4 votes
2 answers
669 views

Remove the leftmost column from ranger file manager

There is a way I can remove the rightmost column: # Preview files on the rightmost column? # And collapse (shrink) the last column if there is nothing to preview? set preview_files false set ...
  • 777
0 votes
1 answer
231 views

Ranger - cd into nth folder

I found the command I want to use: cd $(ls -d */|head -n 1) and it works as expected when I do it in the terminal. However when I map it in ranger (either with map g1 cd... or map g1 shell cd...) I ...
3 votes
1 answer
363 views

Ranger Run Custom .bash_profile Command

Suppose I have the following in my ~/.bash_profile file: function lazygit() { git add . git commit -a -m "$1" git push } I have run source .bash_profile and it works well in terminal on ...
2 votes
1 answer
481 views

Ranger: How to Remap hjkl Keys?

I using Ranger and I am a Colemak Keyboard Layout user. I want to remap the h, j, k, and l keys to n, u, e, i keys. I tried this: issue #8 and Ranger doesn't seem to read from ~/.config/ranger/keys.py....
  • 133
2 votes
0 answers
690 views

jump to a directory inside of ranger

I tried :cd path but it does literally nothing. Imagine I open ranger while inside of ~/dir/, now I want to go to ~/somewhere/else/ while inside of ranger. I know I can hjjjj(whatever)lj/k(whatever)...
3 votes
3 answers
7k views

Use ranger as my default file manager in i3wm

When download a file via browser, the download status message box has an option named show in folder, How can I configure it to open ranger when I click it? Reason I want to do it: I'm currently ...
  • 279
1 vote
1 answer
328 views

Ranger: Add Foxit pdf reader to rifle.conf

I've Zathura as my default pdf viewer which is fine. I've also installed Foxit Reader but it doesn't show up when I try to open any pdf file in ranger with r key. I tried adding following line in my ...
3 votes
1 answer
2k views

ranger "set preview_files true" does not work

Since quite some time the file-preview-window in ranger stays empty. I.e. it indeed shows up but does not preview the content of text-files. Image preview and .pdf preview however does work. The ...
1 vote
2 answers
395 views

How to create multiple directories in Ranger?

As in the equivalent of mkdir dir1 dir2 when running in bash. This creates two separate directories, dir1 and dir2. If you run :mkdir dir1 dir2 in ranger, it simply creates a directory called 'dir1 ...
5 votes
1 answer
1k views

How do you go back to the previous directory in Ranger?

In Ranger you can go to a directory with g. When you type g it gives you a list of places you can very easily go. For example g, and then p takes me to /tmp. How do I get back to the directory I was ...
1 vote
1 answer
1k views

How do I delete a single file without affecting the marked files in ranger?

As a follow up to this question, how do I delete a single file without losing the selection that I've already got? for i in $(seq 1 5); do touch "$i.jpg"; done; mkdir subdir Let's say you marked 1....
0 votes
0 answers
42 views

Batch moving a custom set of images with Ranger? [duplicate]

This is a question for the Ranger (file manager) Let's say that I have a directory with five files.. for i in $(seq 1 5); do touch "$i.jpg"; done; mkdir subdir How would I move 1.jpg, and 4.jpg, ...
1 vote
2 answers
2k views

Where is the editor choice kept in ranger?

On a fresh ranger install I tried to open neofetch config with ranger and selected ed to see what is it. I am glad Ctrl+D worked to exit the ed, but now ranger opens all files with it. Restarting ...
0 votes
2 answers
220 views

How to change relative symlinked path to "actual" one (in ranger or terminal)

What is actual path? Consider folder A in the file system and a symlinked B to it. Consider currently in ranger (or terminal) inside a sub-directory within B such as /home/B/sub1/sub2 which is in fact ...
  • 205
3 votes
1 answer
155 views

How can I view current file only instead of all marked files in ranger?

In the ranger file manager, https://github.com/ranger/ranger, how can I open the currently selected file instead of all marked files? I'd like to iterate through a directory and choose whether I mark ...
  • 415