You are not logged in.
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
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 !
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
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 ' |
Online
Thank you very much. I think winepath is the right way. I am now using it.
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
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
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 ' |
Online
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
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
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
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
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
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
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
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
@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
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
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
RANGER IS SO AWESOME!
Just felt an urgend need to say that.
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
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
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
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
it works ok with native transparency
URxvt*.transparent: true
URxvt*.shading: 26
Offline
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
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
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