You are not logged in.
I'm trying to use qiv as the default image viewer, since it can handle exif rotation, and to queue all the image files in the current directory. With plain qiv, the command line I want is:
qiv -film *
But if I try to add the following to apps.py:
@depends_on('qiv')
def app_qiv(self, c):
c.flags += 'd'
return tup('qiv', '-film', '*', *c)
It doesn't work: only the current image is loaded. What am I doing wrong?
Offline
try:
return "qiv -film *"
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ah - was it that simple? I thought it had to be a tuple line. Thanks, works perfectly.
Offline
I should have made it simpler from the start:
return "mplayer -arg1 -arg2 %s"
rather than:
return tup("mplayer", "-arg1", "-arg2", *c)
But right now, %s is not substituted with the selected files, so you gotta use *c (which just gives you a tuple of all selected files.)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Hi. Thanks for this impressive piece of software. I was growing tired of pressing jjjhhllkkk in mc
I've two questions, if you don't mind.
1) There will be some support for dual panel view? Like mc.
2) There're plans to do ranger in client / server mode with a daemon? Like urxvt.
Thanks!
Sorry for my English. Feel free to point out my errors.
Offline
Hi rb. Unfortunately the answer is "no" to both questions.
But nobody knows what the future will bring
You can still use "ranger /bin /usr/bin" to open both directories, and use TAB to toggle between them, similar to mc
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
I guess I'll stay in mc, I just can't live without dual panel view
Either way, I'll stay tuned Thanks for your reply!
Sorry for my English. Feel free to point out my errors.
Offline
dude this ranger is awesome! great work!
Offline
Sorry if I've glazed past if this was already brought up, but could
map('du', fm.execute_command('du --max-depth=1 -h | less'))
(defaults/keys.py +184) be altered to use what is given in CustomApplications.app_pager? I have this fixed for myself in my user keys.py, so this is not a big issue for me. I just thought the single config point might be better.
Thanks for reading this, and thanks for ranger!
Offline
Sure. How did you fix it though? (or did you just replace "less" with your pager ^^?)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Exactly:
map = keymanager.get_context('browser')
map('du', fm.execute_command('du --max-depth=1 -mh | vimpager'))
Offline
Hello, I want to launch movie files with a special bash script:
#!/bin/sh
#Script to turn off monitor modes that will power down, standby or blank the screen
#
#Disable modes
/usr/bin/xset -dpms &
/usr/bin/xset s off &
#Open VLC
/usr/bin/vlc $1
#Re-enable modes
/usr/bin/xset dpms
/usr/bin/xset s on
I have used an alias in bashrc,
alias vlc='vlc.sh' # vlc.sh is the script above
In Ranger, I use this:
if f.extension in (c, 'tp', 'wav', 'asf', 'vob', 'ts', 'mpg', 'mpeg', 'mp3', 'flv', 'wmv'):
return self.either(c, 'vlc')
However when I load files from Ranger it doesn't appear the script is loaded because my screens still shut off after 5 minutes, but if I load the script manually or by running 'vlc' in the command line, it works perfectly.
I can only assume Ranger isn't calling vlc in a typical way, is there any easy fix for this?
One user has suggested:
I'm guessing that Ranger is still running the actual vlc. I'm going to take a stab at it and say that you could either change that line to be
if f.extension in (c, 'tp', 'wav', 'asf', 'vob', 'ts', 'mpg', 'mpeg', 'mp3', 'flv', 'wmv'): return self.either(c, 'vlc.sh')
Or, rename vlc.sh to just vlc and make sure it's in your path (the directory it's in must also be before the /usr/bin directory, so that it will take precedence). If it is, anything trying to execute vlc from your user should execute the script without needing any aliases or other work-arounds.
But I should think it would be possible just by changing Ranger, no?
Offline
Aliases defined in the bashrc have no effect on ranger
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Yes, I came to that conclusion when it didn't work. The real question is how can ranger open a script without changing the original /usr/bin/vlc file?
Offline
jac gives the answer already
My bashrc contains this:
export PATH="$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/games"
and there is a script at ~/bin/mplayer which is used instead of the /usr/bin/mplayer
Last edited by hut (2010-07-05 08:12:43)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ahh, so setting that should take priority before it's ran via somewhere else. How can i be sure i included all the excutable paths on my system? I only have one extra one I want to add. I won't break anything if I forget something will I? ):
Offline
export PATH="$HOME/bin:$PATH"
this will prepend ~/bin to your original path. (the problem is, it will do this again each time you write "source ~/.bashrc", resulting in something like PATH="$HOME/bin:$HOME/bin:$HOME/bin:....." which is not harmful but annoying.)
Or just replace the variable $PATH above with the output of the command echo $PATH
Last edited by hut (2010-07-05 09:10:46)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
I will give it a shot! I may as well make a few more. custom script for ranger. I need to make some for uncompressing files on opening them. thanks
Ps, writing on mobile is tough
Last edited by Google (2010-07-05 09:13:38)
Offline
Ok, I did it. Now it opens my script and starts VLC, but it doesn't load the file I clicked on in Ranger, it simply opens Ranger. I posted the bash script above. Can anyone tell me why it wouldn't load the file based on that script?
/usr/bin/vlc $1 # This should load the file clicked on, right?
Offline
That should play the file if ranger only passes the file name to vlc and it's full path contains no spaces.
First, I would try putting quotes around the variable. Then, if it has spaces in it it will all be one token instead of being broken up and trying to open multiple files.
Then, I would change 1 to be an @ symbol, so it uses all the arguments ranger is trying to pass to vlc, so you get
/usr/bin/vlc "$@"
This will fix the problem with the script in the case that the file name has a space in it, or if the file name is not the first thing ranger passes to vlc.
If that doesn't fix it, mention if the file does indeed have a space in it.
Last edited by jac (2010-07-05 11:24:50)
Offline
Hello, I tried a file with and without spaces. Nothing is different. It opens and stays open but doesn't play anything. Also, it shoots me an error when I attempt to open a .vob/.ts DVD file saying it is encrypted and will not play, can't find the directory or something of the sort.
#!/bin/sh
#Script to turn off monitor modes that will power down, standby or blank the screen
#
#Disable modes
/usr/bin/xset -dpms &
/usr/bin/xset s off &
#Open VLC
/usr/bin/vlc "$@"
#Re-enable modes
/usr/bin/xset dpms
/usr/bin/xset s on
VLC media player 1.1.0 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
Warning: call to signal(13, 0x1)
Blocked: call to setlocale(6, "")
Blocked: call to sigaction(17, 0xb0fc9058, 0xb0fc90e4)
Warning: call to signal(13, 0x1)
Blocked: call to setenv("ORBIT_SOCKETDIR", "/tmp/orbit-corey", 1)
Warning: call to srand(1278531838)
Warning: call to rand()
Blocked: call to setlocale(6, "")(process:2854): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Warning: call to signal(13, 0x1)
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't stat /mnt/storage/Videos/Music
No such file or directory
libdvdnav: vm: failed to open/read the DVD
[0xb0e01084] filesystem access error: cannot open file /mnt/storage/Videos/Music (No such file or directory)
[0x9b58914] main input error: open of `file:///mnt/storage/Videos/Music' failed: (null)
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't stat /mnt/storage/Videos/Music Videos/Videos/BoA-Bewithyou.vob
No such file or directory
libdvdnav: vm: failed to open/read the DVD
[0xb0e01084] filesystem access error: cannot open file /mnt/storage/Videos/Music Videos/Videos/BoA-Bewithyou.vob (No such file or directory)
[0x9b4edf4] main input error: open of `file:///mnt/storage/Videos/Music%20Videos/Videos/BoA-Bewithyou.vob' failed: (null)
Offline
libdvdread: Can't stat /mnt/storage/Videos/Music
I notice this is wrong, it should be
/mnt/storage/Videos/Music Videos/
The folder has a space in it. Could this be the reason? How can we fix this?
edit:
I renamed my folder without a space, and the file without a space and it works. Now the question is how can we get it to read a filename with spaces (and the directory, if possible!)?
Last edited by Google (2010-07-05 11:44:54)
Offline
Just wanted to say "Thank You!" for this awesome filemanager!
Offline
Great work so far!
I'm not sure whether this question has been asked already or if it is kind of stupid :-).
Is a default action ('l' command or <Enter>) for mouse doubleclick implemented? Can i configure this?
Offline
You can do a "l" with the mouse by clicking into the preview, just like with directories. Even if there's no preview, there will be some whitespace at the right which you can click at.
Double clicks are not supported yet.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline