Questions tagged [ranger]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
13 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 ...
0
votes
0answers
17 views

Exit terminal left behind by Ranger

When using Ranger and opening a pdf file it leaves a useless terminal behind. Any suggestions for how to exit Ranger/the terminal after opening the pdf? I've tried going into rifle.conf and editing ...
1
vote
1answer
78 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
0answers
61 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
1answer
253 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: ...
0
votes
0answers
30 views

Recovering a deleted folder using testdisk: Folder doesn't show up

So I accidentally deleted my documents folder (using ranger) which included all of my important files that weren't dotfiles. So I found testdisk. How I've used it so far is how I've seen people use it ...
0
votes
1answer
36 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
1answer
65 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 ...
0
votes
1answer
28 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 /...
1
vote
1answer
49 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 ...
2
votes
1answer
116 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 ...
2
votes
1answer
124 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 ...
1
vote
2answers
138 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/...
0
votes
1answer
46 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
0answers
242 views

Can't login to MX linux, possible Xsessions issue after typing 'startx' into terminal

Preface: Ages ago I wanted to try DWM, but the only way I could get it to work was by writing exec DWM in the /etc/X11 folder. But when stopped using DWM I left all the places I also wrote that in ~/ ...
0
votes
1answer
33 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
0answers
72 views

XFCE keyboard shortcut for Ranger file manager launcher won't work

So I made a .desktop launcher for the ranger.py script (the command is './ranger.py' or python 'ranger.py' and the working directory is where the ranger.py script is). Ienter image description here ...
0
votes
1answer
40 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 (...
1
vote
1answer
56 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 ...
2
votes
0answers
165 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-...
2
votes
3answers
1k 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 ...
1
vote
1answer
80 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
1answer
206 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 ...
0
votes
1answer
15 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.
1
vote
1answer
178 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 ...
0
votes
1answer
107 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 ...
2
votes
1answer
185 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 ...
1
vote
1answer
171 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....
1
vote
0answers
146 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)...
2
votes
3answers
3k 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 ...
1
vote
1answer
250 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 ...
0
votes
1answer
1k 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
2answers
253 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 ...
4
votes
1answer
621 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
1answer
569 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
0answers
39 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
2answers
1k 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
2answers
121 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 ...
2
votes
1answer
85 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 ...
-1
votes
1answer
457 views

Ranger will not preview images or text

I have tried sudo apt-get purge ranger and then reinstalling it, but I have not been able to find anything that works. My python version is 2.7.
3
votes
1answer
506 views

How to bind a keyboard shortcut in zsh to a program requiring stdin?

This is a follow-up to this question: I'm trying to create a keyboard shortcut for the terminal file manager ranger, in order to jump from the zsh prompt into the file manager with a single keystroke. ...
0
votes
1answer
506 views

Ranger, open file freeze the terminal

I set Viewnior for open image files, but when I open any image file (jpg or png) ranger stays frozen or something similar, and I only can return to ranger when I close the app that opened the file. ...
5
votes
1answer
572 views

How to “follow” symlink in Ranger to open containing directory of target?

In Ranger, I often have symlink and I want to go to the containing directory of the file that is linked to. How to do this with Ranger?
1
vote
1answer
90 views

Atom crashes after closing the file manager ranger

When I open a file with atom through ranger and than close the terminal which executes ranger, it causes the atom editor to close too, my configuration file looks like: user@computer ~ $ cat ~/....
3
votes
1answer
811 views

Default application used for “open folder” in popup menu

When I enter, for instance, xdg-mime query filetype Video/movie.mkv, the output is video/x-matroska; if I then enter xdg-mime query default video/x-matroska, the output is mplayer.desktop, and that is ...
7
votes
1answer
655 views

xmodmap key bindings reset when I open a new tab in the shell

When I open a shell in ranger with shift-s, open vim and then open a shell with :sh or open a new shell tab with ctrl-shift-t, my xmodmap keybindings (swapped caps lock and escape keys) are reset. ...
6
votes
1answer
2k views

Refresh cache of Ranger file manager

How do I refresh ranger file manager? It automatically refreshes if a file is changed/edited/created/removed inside current directory, but I want to be able to force it to do so. How would I do that?
10
votes
2answers
5k views

How to enable syntax highlighting in ranger preview?

I have seen some screenshots where ranger uses syntax-highlighting in its preview window. So I was wondering how to enable this feature and found out that I need the scope.sh file in the directory /...
1
vote
1answer
2k views

Preview files in ranger

I have been able to preview images in ranger. But for some reason I don't have file preview. Not for any type of files. Not for compressed files either. I'm running linux mint and ranger v1.7.1. How ...
4
votes
2answers
3k views

Is there a way to get ranger to syntax-highlight files using the X colorscheme of the terminal?

The file manager ranger works great, and uses the normal X resources color scheme of my terminal (urxvt). But when it shows a preview of files and highlights their syntax (presumably using highlight ...