Questions tagged [ranger]
Ranger is a terminal-based file manager with vi-style key bindings.
95 questions
0
votes
0
answers
99
views
Animating GIFs as previews in File Manager "LF" or "ranger"
The desired behavior: When I'm using a file manager "LF" I would like to have animated GIFs as previews when I am over an image/gif mime-type file.
What I actually had on mind was to convert ...
0
votes
0
answers
24
views
Highlight the cursor of current directory in different color with respect to cursors higher and lower in the file system tree
I am using ranger for a few days now which I find a great piece of software and I was wondering if it possible to set the highlighting of the cursor to a different color for the one poiting to the ...
1
vote
1
answer
111
views
Select files in ranger using ranger
I am a bit confused about using regex in ranger (Arch Linux). I have a folder of files that look like this:
'sometexthere - I. - sometexthere'
'sometexthere - II. - sometexthere'
'sometexthere - III. -...
0
votes
0
answers
296
views
How can I view an image in ranger without closing ranger?
I installed ranger console file manager on Ubuntu. I'd like to view images with it in the console (which I access via JupyterLab), so I also installed caca-utils, which contains img2txt:
sudo apt-get ...
0
votes
1
answer
77
views
Certain file types not showing in Ranger preview
I have a bunch of csv files that are all just plain text csv files.
$ file ./*
file1.csv: ASCII text, with very long lines
file2.csv: CSV Text
I even generated file2.csv from file1.csv using cut. ...
1
vote
0
answers
88
views
Ranger: yank name does not copy anything to clipboard
I am using:
ranger version: ranger-master
Python version: 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801]
Locale: en_US.UTF-8
When I invoke yank name using yn, nothing happens. I use Arch ...
0
votes
0
answers
317
views
Attempting to get image preview set up in Ranger, and having an issue with images appearing off-screen
So I am attempting to get image preview setup in ranger with WezTerm on a WSL2 install of Arch. I've got images showing with imgcat:
But I am having an issue where ranger is just shoving everything ...
0
votes
1
answer
246
views
Log of actions done in ranger?
Is it possible for ranger to record file/folder actions? I'm looking for a logging feature for every file/folder action done in ranger.
0
votes
0
answers
51
views
Ranger Has incorrect colorsheme when opened with firefox
I couldn't really find a better place to ask this question and figured that if anyone would know it would be you guys.
So when I open ranger it inherits my colorscheme and styling from alacritty, ...
2
votes
0
answers
209
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 ...
0
votes
1
answer
534
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 ...
1
vote
0
answers
18
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 ...
1
vote
2
answers
331
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 ...
0
votes
1
answer
506
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
...
0
votes
1
answer
406
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 ...
1
vote
1
answer
418
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
436
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
1
answer
462
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 ...
1
vote
1
answer
653
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
3k
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 ?
1
vote
1
answer
651
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
7k
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
429
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 ...
1
vote
2
answers
3k
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
2k
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
562
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 ...
1
vote
1
answer
410
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 /...
2
votes
1
answer
956
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 ...
5
votes
3
answers
3k
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
1
answer
2k
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 ...
2
votes
2
answers
1k
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
1
answer
300
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
737
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
997
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
1k
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 ...
4
votes
0
answers
839
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-...
15
votes
3
answers
13k
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 ...
2
votes
3
answers
651
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
581
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
1
answer
39
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.
5
votes
3
answers
1k
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
1
answer
372
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
583
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 ...
3
votes
1
answer
976
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....
4
votes
2
answers
2k
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
9k
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
1
answer
394
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
3k
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
559
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 ...
6
votes
2
answers
2k
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 ...