You are not logged in.

#2101 2018-02-02 23:18:55

Ronan Bell
Member
Registered: 2018-02-02
Posts: 2

Re: Ranger, a textbased filemanager

hut wrote:

Hey people, I just wanted to let you know that v1.9.0 finally out: https://github.com/ranger/ranger/releases/tag/v1.9.0

Changelog: https://github.com/ranger/ranger/blob/m … ANGELOG.md

Thanks for all the great work.

I have a little problem with the latest version. I have some keybindings for console commands that end with a space (e.g.  map r console rename<space> ) but now the space no longer registers and I have to press the spacebar manually every time before I can start typing. What can I do?

Offline

#2102 2018-03-31 19:28:11

bartekb81
Member
From: Stuttgart/Ostfildern, Germany
Registered: 2018-03-31
Posts: 1

Re: Ranger, a textbased filemanager

Ronan Bell wrote:

I have a little problem with the latest version. I have some keybindings for console commands that end with a space (e.g.  map r console rename<space> ) but now the space no longer registers and I have to press the spacebar manually every time before I can start typing. What can I do?

Replace the <space> with %space string, i.e.:

map r console rename%space

Offline

#2103 2018-03-31 23:14:08

Ronan Bell
Member
Registered: 2018-02-02
Posts: 2

Re: Ranger, a textbased filemanager

bartekb81 wrote:

Replace the <space> with %space string, i.e.:

map r console rename%space

It worked, thanks!

Offline

#2104 2018-09-20 02:18:21

bilabila
Member
Registered: 2018-08-07
Posts: 18
Website

Re: Ranger, a textbased filemanager

Hi, I have a question
I use the script from wiki to avoid nesting

function r
	if test -z $RANGER_LEVEL
        ranger $argv
    else
        exit
    end
end

However, if I change dir in the nest shell then enter r to return, the ranger dir is still.
Without this workaround, the ranger dir is current shell dir.
Is there any better workaround or hack?

Offline

#2105 2018-09-20 02:22:50

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 439

Re: Ranger, a textbased filemanager

bilabila wrote:

s there any better workaround or hack?

Seems like your other thread about this has been closed so I will repost my answer here.

Different approach but I think it does what you want. I have the following in my ~/.bashrc:

if type ranger &>/dev/null; then
    if [[ -f /usr/share/doc/ranger/examples/bash_automatic_cd.sh ]] ;then
        source /usr/share/doc/ranger/examples/bash_automatic_cd.sh
        alias r='ranger-cd'
    else
        alias r='ranger'
    fi
fi

So I always start ranger with `r` as you do. Then just type `q` to quit ranger instead of `S` and you will be in the last dir selected by ranger. Then just `r` to start ranger again in that dir or wherever you have cd to.

Last edited by bulletmark (2018-09-20 02:35:26)

Offline

#2106 2018-09-20 03:24:15

bilabila
Member
Registered: 2018-08-07
Posts: 18
Website

Re: Ranger, a textbased filemanager

bulletmark wrote:

So I always start ranger with `r` as you do. Then just type `q` to quit ranger instead of `S` and you will be in the last dir selected by ranger. Then just `r` to start ranger again in that dir or wherever you have cd to.

Sorry for delete and repost
Thanks, this method fit my need but has one drawback, toggle from shell to ranger need more time then `exit`

Offline

#2107 2018-09-20 04:27:19

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 439

Re: Ranger, a textbased filemanager

bilabila wrote:

Thanks, this method fit my need but has one drawback, toggle from shell to ranger need more time then `exit`

You really notice a difference?!

In theory you are correct of course but in practice ranger starts so quickly I can't see it being a valid concern.

Offline

#2108 2018-09-20 05:47:32

bilabila
Member
Registered: 2018-08-07
Posts: 18
Website

Re: Ranger, a textbased filemanager

bulletmark wrote:

You really notice a difference?!

In theory you are correct of course but in practice ranger starts so quickly I can't see it being a valid concern.

Yes, there is a little but noticable difference to me.
BTW, I figure it out using

map s chain shell $SHELL; eval fm.cd(open('/tmp/rangerdir').readline().strip())

and alias

function r
	if test -z $RANGER_LEVEL
        ranger $argv
    else
        echo (pwd) > /tmp/rangerdir
        exit
    end
end

Last edited by bilabila (2018-09-20 05:47:53)

Offline

#2109 2019-04-01 18:59:28

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

After tirelessly working on designing a new concept for ranger, I am proud to announce that we have finalized the new default ranger color scheme!  The vaporwave-inspired color scheme "aesthetic":

https://raw.githubusercontent.com/range … thetic.png

Best served with cold Arizona Ice Tea, Kung Fury playing from a VHS on a flickering CRT, with the volume cranked up to 11. Just upgrade ranger from github and enjoy.


moderator edit -- replaced oversized image with link.
Pasting pictures and code

Last edited by 2ManyDogs (2019-04-01 19:07:54)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#2110 2019-05-01 17:09:56

brwnoman
Member
Registered: 2017-11-01
Posts: 1

Re: Ranger, a textbased filemanager

ISSUE
I would like to open vim via ranger and, if necessary, to be able to suspend vim with CTRL+Z and go back to ranger.
However, what actually happens is that either:
1. if vim was opened with ranger's ':shell vim' command, CTRL+Z sends me to terminal that is itself suspended, so that all I can do is open another terminal window and do 'kill -18 vim';
2. or, if vim was opened via a terminal opened with ranger's 'S' keybinding, CTRL+Z leads me to that same terminal, from which I cannot quit because vim is backgrounded.
Is there a way to obtain the desired behaviour of comming to-and-from between vim and ranger?

Offline

#2111 2019-10-31 16:48:12

walteweiss
Member
Registered: 2019-09-07
Posts: 2

Re: Ranger, a textbased filemanager

Hello everyone,

I have found a great use-case for ranger recently: managing my notes! I have been struggling to find my ideal note-taking software for years, but had no luck with it. Recently I realized that vim and plain text files is enough for me, really. Ranger takes it to the new level, as it’s a joy to use it as my file manager! I simply organize my notes with the logic I want, and that’s enough!

But I would also like to encrypt the text files. I’ve tried to make a gpg-file, but it doesn’t behave like I want it to. I would like to enter my password once per session, or every N minutes, and be able to access the entire tree of files, otherwise the files should be encrypted. I want this only because I’m considering syncing to 3rd party servers (either via git with GitLab, or maybe even via Dropbox). At this point I use ResilioSync, but I think Git could be better for this.

I’m very new to ranger, so it may be even obvious to some of you. Also I’m new to encryption, so I may not understand some concepts.

Please point me in the right direction, if you know.

Thanks.

P.S. As an alternative scenario I think I can start a git-server on my homelab, with encrypted file-system. Will it excuse unencrypted plain text files then? Not that I keep top-secrets there, just an average Joe’s notes, like ‘took my dog to vet clinic today,’ but I would like to implement good habits from the start.

Offline

#2112 2019-10-31 17:01:32

walteweiss
Member
Registered: 2019-09-07
Posts: 2

Re: Ranger, a textbased filemanager

Also, I have another type of a question. There is a file preview on the very right. Can I make it break lines for me, on a text-based files? I mean when I have a long line, I want it to be readable via preview, not opening them, because it’s more useful for short files. Is it possible? I couldn’t find anything relevant in the settings, and I don’t know whether I should keep looking (say, it is achievable via a plug-in), or it’s something that won’t work because of something I don’t understand.

A visual example of what I mean, the first line is cut, but I want it to be shown as the next lines, like any terminal-based text fills the space, regardless of the column size.

Offline

#2113 2019-10-31 19:13:29

firecat53
Member
From: Lake Stevens, Wa
Registered: 2007-05-14
Posts: 1,510
Website

Re: Ranger, a textbased filemanager

Here's a similar solution to edit an encrypted file when working ansible vault. Because the file is gpg encrypted and I use gpg-agent, I only get asked my password once until it times out (depending on the setting in ~/.gnupg/gpg-agent.conf. I added this class to ~/.config/commands.py:

class ave(Command):
    """:ave

    Edit the current selection with ansible-vault edit
    """
    def execute(self):
        action = ["ansible-vault", "edit","--vault-password-file="
                    "/usr/local/bin/ansible_vault_password.py",
                    self.fm.thistab.get_selection()[0].path]
        self.fm.execute_command(action)

Then just typing `:ave` with the current file highlighted will launch the editor to edit the decrypted file. The script 'ansible_vault_password.py' decrypts the password file and provides it to the vault command. Same principle as you want, but different commands to decrypt your note file. Another command `:avv` decrypts and views the file in the default pager without opening it for editing.

I can't answer your second questions about wrapping the preview lines.

Offline

#2114 2019-11-03 15:15:47

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,168

Re: Ranger, a textbased filemanager

walteweiss wrote:

...
But I would also like to encrypt the text files. I’ve tried to make a gpg-file, but it doesn’t behave like I want it to. I would like to enter my password once per session, or every N minutes, and be able to access the entire tree of files, otherwise the files should be encrypted. I want this only because I’m considering syncing to 3rd party servers (either via git with GitLab, or maybe even via Dropbox). At this point I use ResilioSync, but I think Git could be better for this.

I use "pass" to manage my passwords and password protected notes with a bash wrapper script to simplify it, you may find it here https://github.com/Docbroke/pass_rofi/b … /pass_rofi

Last edited by Docbroke (2019-11-03 15:17:47)


Arch is home!
sway rofi qutebrowser vifm vim mutt lizzy pass

Offline

Board footer

Powered by FluxBB