You are not logged in.
Thanks for pointing that out.
I fixed it, but unfortunately there is no setsid command on bsd by default, so I kept nohup as a fallback... Maybe I should implement the setsid part purely in python.
Last edited by hut (2012-03-19 21:55:47)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ok, I didn't think of bsd. Looks good now and your new implementation is really nice!
I do have to wonder about
ext od[tspfg]|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
Since when does gnumeric support e.g. odt files?
Offline
Really love this new conf file (rifle.conf) hut!.
Got a problem with newest ranger-git, everytime I use open-with I get this.
'FM' object has no attribute 'apps'
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.
Offline
Hut, there's one thing I miss in the new opener: c.mode from the appy.py! I heavily use them, especially with mplayer to be able to control the used soundcard. I have 4 Soundcards, 2 are internal (default and hdmi-audio) and 2 external ones. 1 means "soundcard 1", 2 "soundcard 2" and 3 "soundcard 3". I also have 7 to rotate to the left and 8 to rotate to the right (I have some videos which require this, because some people aren't able to correctly hold a camera... and 9 to heavily cache the movie so the harddisk can spin down, saves a lot of energy when I'm on battery with the laptop. Up to here it's possible to implement it in the new rifle.conf. But if I want to combine those, e.g. 27 to play the movie with "soundcard 2" and rotated to the left, implementing this isn't possible (or in a very ugly way)
if f.video:
if 'DISPLAY' in os.environ:
c.flags += 'sd'
if c.mode == 1:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=1.0', *c)
if c.mode == 17:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=1.0', '-vf', 'rotate=2', *c)
if c.mode == 18:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=1.0', '-vf', 'rotate=1', *c)
if c.mode == 19:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=1.0', '-cache', '1048576', '-cache-min', '99', *c)
if c.mode == 2:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=plughw=2.0', *c)
if c.mode == 27:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=2.0', '-vf', 'rotate=2', *c)
if c.mode == 28:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=2.0', '-vf', 'rotate=1', *c)
if c.mode == 29:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=2.0', '-cache', '1048576', '-cache-min', '99', *c)
if c.mode == 3:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=plughw=3.0', *c)
if c.mode == 37:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=3.0', '-vf', 'rotate=2', *c)
if c.mode == 38:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=3.0', '-vf', 'rotate=1', *c)
if c.mode == 39:
return tup('setsid', 'mplayer', '-ao', 'alsa:device=hw=3.0', '-cache', '1048576', '-cache-min', '99', *c)
if c.mode == 7:
return tup('setsid', 'mplayer', '-vf', 'rotate=2', *c)
if c.mode == 8:
return tup('setsid', 'mplayer', '-vf', 'rotate=1', *c)
if c.mode == 9:
return tup('setsid', 'mplayer', '-cache', '1048576', '-cache-min', '99', *c)
else:
return tup('setsid', 'mplayer', *c)
else:
...
Am I missing something or is this not possible anymore?
Offline
Really love this new conf file (rifle.conf) hut!.
Got a problem with newest ranger-git, everytime I use open-with I get this.'FM' object has no attribute 'apps'
what's the traceback? (run ranger --debug)
You probably have an outdated commands.py in ~/.config/ranger.
Since when does gnumeric support e.g. odt files?
Oops
Hut, there's one thing I miss in the new opener: c.mode from the appy.py!
Yes, I'll add a function that allows you to jump to a specific "mode".
Last edited by hut (2012-03-20 18:41:10)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
You probably have an outdated commands.py in ~/.config/ranger.
You're so right, again with this problem (My bad hut, I'll remember about this.). I tried again, and I got this
No action found.
Last edited by igndenok (2012-03-21 00:06:17)
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.
Offline
No action found.
Strange. By default, every file has at least one action. Maybe you have a broken/old rifle.conf? Try to remove ~/.config/ranger/rifle.conf and upgrade ranger. If the problem persists, contact me on IRC. (h00th00t on irc.freenode.net)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Hi, I'm using the newest ranger from git as well and I have the same problem. When I press "l" (ell) on everything with a gui (feh, file-roller, etc), the line is replaced with
/bin/sh: 1: Syntax error: Bad fd number
, and when I try ":open_with" and type anything it says
No action found.
.
If I try to use one of the numbers at the bottom with the predefined commands, nothing happens as to the file but ranger itself gets some weird functionality.
If it helps, I'm using ranger from the main git repo on Debian Testing.
Clever Linux quote.
Offline
Same problem, same answer: Try to remove config files and contact me on IRC. It's faster to debug with instant messaging.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
+ 1 for OpenBSD support.
Offline
No action found.
This should be fixed now. Shout if something is still broken.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Is there any way to access a samba/windows share using Ranger? Haven't been able to find an answer using search, so I guess not, and if so, any plans to support this?
Offline
It's not supported and not planned in the near future.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Allright, thanks for the answer
Offline
will ranger support unzip?
i have to switch to shell every time when i need to unzip a file.
"After you do enough distro research, you will choose Arch."
Offline
will ranger support unzip?
i have to switch to shell every time when i need to unzip a file.
I put this into my rc.conf:
map Pu shell atool -x %s
Just remember to install atool
Last edited by Baabelfish (2012-03-23 03:00:14)
usability == arch + i3 + urxvt + vim + ranger + dwb + vlc + cmus + mutt + shitload of scripts
Offline
will ranger support unzip?
i have to switch to shell every time when i need to unzip a file.
It already does. I just hit 1l on a zip file, and aunpack gets down to it.
@archun: Intel® Core™ i5-4210M • [GPU] Intel® HD Graphics 4600 • [Kernel] linux-ck-haswell
Handmade.Network • GitLab
The Life and Times of Miblo del Carpio
Offline
where do you see this in the manual?
"After you do enough distro research, you will choose Arch."
Offline
Run ranger with
$ ranger --copy-config=all
To copy all config to ~/.config/ranger, then edit
1. rc.conf = keymap
2. apps.py = list of application used for open_with (rifle.conf if you using ranger-git)
3. scope.sh = list of application used for preview
For ranger manual
$ man ranger
or press ? inside ranger
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.
Offline
Would it be highly inadvisable to use mimi (an xdg-open replacement) in ranger with rifle?
Mimi recommends that its default opener be a file manager (ranger), but if I call mimi from ranger that seems rather stupidly circular, so I'm using vim as my default.
I was hoping to use mimi from ranger so I would only need to configure one opener (I try out new applications constantly and it'd be nice to only have to change one file.)
Is this a bad idea for a reason I haven't thought of? I tried googling "ranger xdg-open" but since rifle is newer, I haven't found an answer.
Offline
If you want to use mimi (or any other file opener) in ranger, I'd suggest this rifle.conf:
else = mimi "$@"
label editor, terminal = vim -- "$@"
Don't use ranger as a fallback in mimi then, for the reason you mentioned. Just put all programs you need into the mimi config. You could copy them from the default rifle.conf.
If you want to use rifle's advanced features at the cost of a somewhat more complex configuration, you could use rifle as a standalone file opener:
python /usr/lib/python3.2/site-packages/ranger/ext/rifle.py
It currently takes around 0.4s to startup because of python, but it is still faster than using ranger.
EDIT: oops, mimi has to be the first entry in the list, not the editor. But make sure there's an editor, or the "E" key will not work.
Last edited by hut (2012-03-24 08:54:33)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
https://github.com/taylorchu/march/blob … /mime.conf
this is my current mimi setting. i hope this will help someone who wants to use mimi with ranger like me.
"After you do enough distro research, you will choose Arch."
Offline
Thanks, hut and taylorchu.
I tried using
else, flag f = xdg-open "$1"
after all the extensions, similar to hut's suggestion. It works fine. (I don't think xdg-open can take more than one argument.) I also tried
has xdg-open, flag f = xdg-open "$1"
at the top of the file, and that works fine as well.
I've edited my default in mimi as well, to
default:urxvtc -e ranger --selectfile
like taylorchu suggested. It eliminates the circular problem.
Thanks!
Offline
I guess some people miss the apps.py entry which opens all image files in sxiv and starts at the current file. Here's a script for that:
#!/bin/sh
target="$(realpath -s "$1")"
[ "$1" == '--' ] && shift
function listfiles {
find "$(dirname "$target")" -maxdepth 1 -type f -regex '.*\(jpe?g\|png\|gif\)$' -print0 | sort -z
}
count="$(listfiles | grep -m 1 -Zznx "$target" | cut -d: -f1)"
if [ -n "$count" ]; then
listfiles | xargs -0 sxiv -n "$count" --
else
sxiv -- "$@" # fallback
fi
rifle.conf entry:
ext jpe?g|png|gif, flag f, X = <scriptname> "$@"
It would be good to have in ranger by default but such a large script doesn't fit in rifle.conf. I guess i'll put it in the doc/ directory or something.
Last edited by hut (2012-03-28 00:25:39)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Hello,
Is it possible to rename a file / directory starting from its original name? E.g. I want to rename hello1 to hello , so I select the file, press a mapping and ":rename hello1" appears, I press Backspace and Enter and it's done.
Thanks in advance!
Offline