You are not logged in.

#1776 2013-08-25 23:10:56

Herbstfreud
Member
Registered: 2013-08-25
Posts: 1

Re: Ranger, a textbased filemanager

How can I achieve that .svg and .eps files are previewed? I just love my workflow with ranger but I am not really able to edit the scope.sh suitably...

Offline

#1777 2013-08-27 15:57:24

havoc
Member
Registered: 2009-04-10
Posts: 9

Re: Ranger, a textbased filemanager

After some debugging using "echo"s and searching.  I found the problem is Wine cannot accept absolute path as input file name.  See http://forum.winehq.org/viewtopic.php?t=14623

So i change my "word" script to:

#!/bin/bash
cd $(dirname $1)
env WINEPREFIX="/home/havoc/win32" wine C:\\Program\ Files\\Microsoft\ Office\\Office12\\WINWORD.EXE $(basename $1)

And it works !

havoc wrote:

How to use wine program in rifle.conf?

I have Microsoft Office installed in wine, and there is simple scripts ~/bin/word:

#!/bin/bash
env WINEPREFIX="/home/havoc/win32" wine C:\\Program\ Files\\Microsoft\ Office\\Office12\\WINWORD.EXE $@

In ranger, i can correctly open docx file using command

:shell word %f 

Then i add settings in rifle.conf:

ext docx?,   X, flag f = word "$@" 

But in ranger, when open a docx file, there is just an empty Word. The file name is not passed to Word.

What's the correct way? thanks

Offline

#1778 2013-08-27 16:04:02

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Ranger, a textbased filemanager

havoc wrote:

After some debugging using "echo"s and searching.  I found the problem is Wine cannot accept absolute path as input file name.  See http://forum.winehq.org/viewtopic.php?t=14623

So i change my "word" script to:

#!/bin/bash
cd $(dirname $1)
env WINEPREFIX="/home/havoc/win32" wine C:\\Program\ Files\\Microsoft\ Office\\Office12\\WINWORD.EXE $(basename $1)

You should be using winepath I guess:

exec env WINEPREFIX="/home/havoc/win32" wine C:\\Program\ Files\\Microsoft\Office\\Office12\\WINWORD.EXE "$(WINEPREFIX="/home/havoc/win32" winepath -w "$1")"

Edit: By the way, I'd love it if there was an archive manager in the style of ranger (maybe call it rover)

Last edited by progandy (2013-08-27 16:08:51)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#1779 2013-09-13 13:08:44

havoc
Member
Registered: 2009-04-10
Posts: 9

Re: Ranger, a textbased filemanager

Thank you very much.  I think winepath is the right way. I am now using it.

progandy wrote:
havoc wrote:

After some debugging using "echo"s and searching.  I found the problem is Wine cannot accept absolute path as input file name.  See http://forum.winehq.org/viewtopic.php?t=14623

So i change my "word" script to:

#!/bin/bash
cd $(dirname $1)
env WINEPREFIX="/home/havoc/win32" wine C:\\Program\ Files\\Microsoft\ Office\\Office12\\WINWORD.EXE $(basename $1)

You should be using winepath I guess:

exec env WINEPREFIX="/home/havoc/win32" wine C:\\Program\ Files\\Microsoft\Office\\Office12\\WINWORD.EXE "$(WINEPREFIX="/home/havoc/win32" winepath -w "$1")"

Edit: By the way, I'd love it if there was an archive manager in the style of ranger (maybe call it rover)

Offline

#1780 2013-09-17 21:47:51

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: Ranger, a textbased filemanager

The image preview feature has recently stopped working. I get the following error: "Failed to execute w3mimagedisplay []" I do have w3m installed and w3mimagedisplay is located at /usr/lib/w3m/w3mimgdisplay. Any ideas?

Offline

#1781 2013-09-17 22:17:42

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Ranger, a textbased filemanager

bslackr wrote:

The image preview feature has recently stopped working. I get the following error: "Failed to execute w3mimagedisplay []" I do have w3m installed and w3mimagedisplay is located at /usr/lib/w3m/w3mimgdisplay. Any ideas?

Did you change your terminal emulator? I know that it doesn't work with termite.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#1782 2013-09-17 22:40:13

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: Ranger, a textbased filemanager

progandy wrote:
bslackr wrote:

The image preview feature has recently stopped working. I get the following error: "Failed to execute w3mimagedisplay []" I do have w3m installed and w3mimagedisplay is located at /usr/lib/w3m/w3mimgdisplay. Any ideas?

Did you change your terminal emulator? I know that it doesn't work with termite.

Nope, I am still using urxvt.

Offline

#1783 2013-09-18 03:29:47

Veedrac
Member
Registered: 2011-07-19
Posts: 81

Re: Ranger, a textbased filemanager

bslackr wrote:

The image preview feature has recently stopped working. I get the following error: "Failed to execute w3mimagedisplay []" I do have w3m installed and w3mimagedisplay is located at /usr/lib/w3m/w3mimgdisplay. Any ideas?

Did you change anything? Update Ranger, perhaps?

I'd just like to know what the failure points are, 'cause image previews are an unholy hack and for all intents and purposes shouldn't work anyway. *wink*

Offline

#1784 2013-09-18 08:20:35

manolomartinez
Member
Registered: 2011-04-29
Posts: 66
Website

Re: Ranger, a textbased filemanager

Hello, I was thinking of ways to integrate locate with ranger; perhaps a ranger function that displayed an extra column with the outcome of searching for a string, so that entries in that column could then be opened, copied, etc. the way ranger does it.

I will try to put something together that does something like this, but before: am I missing some standard ranger functionality that does approximately what I want?

Thanks
Manolo

Last edited by manolomartinez (2013-09-18 08:21:01)

Offline

#1785 2013-09-18 13:03:26

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: Ranger, a textbased filemanager

Veedrac wrote:
bslackr wrote:

The image preview feature has recently stopped working. I get the following error: "Failed to execute w3mimagedisplay []" I do have w3m installed and w3mimagedisplay is located at /usr/lib/w3m/w3mimgdisplay. Any ideas?

Did you change anything? Update Ranger, perhaps?

I'd just like to know what the failure points are, 'cause image previews are an unholy hack and for all intents and purposes shouldn't work anyway. *wink*

I changed my wm (shouldn't have any effect, I'd imageine), changed a few things in my .zshrc (mainly switched to vim mode) but I reverted those changes to see if that fixed it. It didn't. I did update ranger, but that was after the issue started to see if that would fix it. It didn't. I think those are the only changes I've made.

Offline

#1786 2013-09-18 15:18:26

Veedrac
Member
Registered: 2011-07-19
Posts: 81

Re: Ranger, a textbased filemanager

bslackr wrote:
Veedrac wrote:
bslackr wrote:

The image preview feature has recently stopped working. I get the following error: "Failed to execute w3mimagedisplay []" I do have w3m installed and w3mimagedisplay is located at /usr/lib/w3m/w3mimgdisplay. Any ideas?

Did you change anything? Update Ranger, perhaps?

I'd just like to know what the failure points are, 'cause image previews are an unholy hack and for all intents and purposes shouldn't work anyway. *wink*

I changed my wm (shouldn't have any effect, I'd imageine), changed a few things in my .zshrc (mainly switched to vim mode) but I reverted those changes to see if that fixed it. It didn't. I did update ranger, but that was after the issue started to see if that would fix it. It didn't. I think those are the only changes I've made.

Did you update from the Git repo?

Offline

#1787 2013-09-18 16:41:55

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: Ranger, a textbased filemanager

Veedrac wrote:

Did you update from the Git repo?

Yes. I also just tried copying clean config files and only changing the image preview to true. Still get the same error.

Last edited by bslackr (2013-09-18 16:45:30)

Offline

#1788 2013-09-23 15:12:50

Mr_Kartoffelsalat
Member
Registered: 2012-04-17
Posts: 29

Re: Ranger, a textbased filemanager

I'm using ranger 1.6.1-1 and I can't use the bulkrename function. I mark the files I want to bulkrename with the spacebar, then I type in a colon followed by the word bulkrename. After hitting the enterkey I get:

No module named 'ranger.fsobject.file'; ranger.fsobject is not a package

I'm not sure about what I'm doing wrong here.

edit: found the solution

I found out that I kinda borked rangers command.py. It now works fine again. I just copied the default from /usr/share/doc/ranger/config/commands.py back to my ~/.config/ranger folder.

Last edited by Mr_Kartoffelsalat (2013-09-23 23:56:00)

Offline

#1789 2013-10-05 03:04:32

Ovion
Member
Registered: 2013-02-24
Posts: 78

Re: Ranger, a textbased filemanager

Is there a way to make ranger use zsh instead of sh? Preferrably including the user's zshrc (whose functions to be able to use inside of ranger I'm mainly interested in).

Offline

#1790 2013-10-05 03:49:44

loop
Member
Registered: 2011-05-06
Posts: 58

Re: Ranger, a textbased filemanager

@Ovion, you can do it. Just trade a line inside your commands.py:

self.fm.execute_command(command, flags=flags)

for

self.fm.execute_command(["zsh", "-ic", "--no-monitor", command], flags=flags)

Offline

#1791 2013-10-06 04:46:55

Ovion
Member
Registered: 2013-02-24
Posts: 78

Re: Ranger, a textbased filemanager

Excellent, works, thanks!

And is there maybe a way to filter the actual view? What I want to archive is I have a folder full of files and I only want to show and navigate through files matching a filter-pattern
Or, in other words, I want to change the view I'm using from "ls" to more or less "ls | grep filter-pattern" and then just navigate through the filtered files. Is there a way already built-in to do this?

Offline

#1792 2013-10-06 05:10:40

vik_k
Member
From: Pune, India
Registered: 2009-07-12
Posts: 227
Website

Re: Ranger, a textbased filemanager

Ovion wrote:

Excellent, works, thanks!

And is there maybe a way to filter the actual view? What I want to archive is I have a folder full of files and I only want to show and navigate through files matching a filter-pattern
Or, in other words, I want to change the view I'm using from "ls" to more or less "ls | grep filter-pattern" and then just navigate through the filtered files. Is there a way already built-in to do this?

see zf keybinding.


"First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack." ~ George Carrette

Offline

#1793 2013-10-06 05:41:54

Ovion
Member
Registered: 2013-02-24
Posts: 78

Re: Ranger, a textbased filemanager

RANGER IS SO AWESOME!

Just felt an urgend need to say that. big_smile

Thanks, vik_k!

Other issue:
I wanted to take a look to the implementation of fm.execute_command(), because as I changed one of its calls in my commands.py (see three posts above) I wanted to take a look how the command is processed (the part with the list that is built up to a command-string is quite obvious, I'm interested what is done with this string).
However, I cloned the git-repo but was unable to find this function, even when grepping recursively (with pattern "execute") through all files in this repo. oO
Does someone know where the fm-functions are implemented?

Last edited by Ovion (2013-10-06 05:54:45)

Offline

#1794 2013-10-06 11:48:59

PotatoesMaster
Member
From: France
Registered: 2010-08-26
Posts: 54

Re: Ranger, a textbased filemanager

Ovion wrote:

Does someone know where the fm-functions are implemented?

Some of these functions, like execute_command, are inherited from 'Actions' (defined in ranger/core/actions.py).

I wanted to take a look to the implementation of fm.execute_command()

You want to take a look at the function __call__ in ranger/core/runner.py.

Explanations:
execute_command() calls self.run().
self.run is an instance of 'Runner' (assigned in fm.py).
self.run() translates to self.run.__call__() (Python doc).

Offline

#1795 2013-10-10 10:48:37

JoKo
Member
Registered: 2010-04-09
Posts: 37

Re: Ranger, a textbased filemanager

Hello,

When I transfer files through cifs/nfs mounts, ranger becomes unresponsive (e.g. can't switch to other tabs) until the transfers are complete. Is there any way to avoid this?

Offline

#1796 2013-10-10 15:52:47

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: Ranger, a textbased filemanager

bslackr wrote:

The image preview feature has recently stopped working. I get the following error: "Failed to execute w3mimagedisplay []" I do have w3m installed and w3mimagedisplay is located at /usr/lib/w3m/w3mimgdisplay. Any ideas?

For anyone curious, I figured out the problem. Apparently w3mimgdisplay won't work with true transparency (at least in urxvt). I turned off transparency in my Xresources, and all is golden.

Offline

#1797 2013-10-16 16:11:56

orbspider
Member
Registered: 2013-10-16
Posts: 1

Re: Ranger, a textbased filemanager

it works ok with native transparency

URxvt*.transparent: true
URxvt*.shading: 26

Offline

#1798 2013-10-17 00:17:46

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: Ranger, a textbased filemanager

orbspider wrote:

it works ok with native transparency

URxvt*.transparent: true
URxvt*.shading: 26

Yeah, I think I'll use that. I mean, I need to have some way to show off my wallpaper.

Offline

#1799 2013-10-23 19:30:29

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: Ranger, a textbased filemanager

suija wrote:

Hi, ranger is great, but it would be pefect if I could fix a certain issue:
there needs to be a tiny delay before the preview kicks in, so that your browsing doesn't lag when you are swinging up and down the tree.
...
I would really appreciate help on the first issue, thanks.

i only just started using ranger but immediately noticed the same.
i could not find any 'delay' option...
i guess putting a 'sleep 0.2' in the right place might help, but where.

Offline

#1800 2013-10-24 10:42:06

markoer
Member
Registered: 2010-12-15
Posts: 57

Re: Ranger, a textbased filemanager

suija wrote:
Hi, ranger is great, but it would be pefect if I could fix a certain issue:
there needs to be a tiny delay before the preview kicks in, so that your browsing doesn't lag when you are swinging up and down the tree.
...
I would really appreciate help on the first issue, thanks.
i only just started using ranger but immediately noticed the same.
i could not find any 'delay' option...
i guess putting a 'sleep 0.2' in the right place might help, but where.

you can use try or dump function, i recommended to use try function as is fisrt executed upon every statement.
ex:

try() { sleep 1; output=$(eval '"$@"'); }

or if you need delay for specific filetype, you can insert sleep 1 before specific try function inside $mimetype or $extension
ex;

 rar)
       sleep 2; try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;

but better way would be to modify ranger source, and insert there a delay as this method always call preview script which is by default scope.sh

Offline

Board footer

Powered by FluxBB