You are not logged in.
Thank you for the excellent file manager that he is incomparable
But I do not have enough in him for one thing - the integration with Dropbox - sync status file, and an external reference (if the file Share) in the preview file, for example. And a couple of console commands - something like ":dbox share". As far as I know, there is a console application to manage Dropbox written in Python, maybe it will help you.
Offline
jumper: Thank you. I have no experience with dropbox but I'd be glad to give you some hints if you wanna try to add it yourself.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ok, I'm all ears. I do not know how to program, only
wrote a couple of simple bash scripts. But I'll try to figure out, suddenly come out:)
Offline
Ok, I'm all ears. I do not know how to program, only
wrote a couple of simple bash scripts. But I'll try to figure out, suddenly come out:)
I guess the dropbox program can do everything you want ranger to do? If so, take a look at the file ranger/defaults/keys.py. You can map keys to commands there. You could take the mapping "du" as a reference.
For previews: Do you know about scope.sh? that's a bash script that generates the preview by taking the file name (and some other information) as the argument and printing the preview to the standard output. It's not active by default, but you can activate it by running "ranger --copy-config=scope" and then edit it at ~/.config/ranger/scope.sh.
Last edited by hut (2011-08-24 19:07:14)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Thanks for the wonderful program. I'm liking it better than mc. But is there any way to select files based on a pattern? And is there a way to sort according to atime?
Offline
Thanks for the wonderful program. I'm liking it better than mc. But is there any way to select files based on a pattern? And is there a way to sort according to atime?
1. The :mark command, and 2. no. But sorting by atime is trivially implemented, try upgrading in a few minutes.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Thank you for the quick reply!
One thing I miss from mc is that in mc, when I press Enter, the file directly under the cursor is opened, whatever other files I have already marked.
Is ranger, wherever I press, Enter, it opens all the files that are marked. Is there a way to get the mc behaviour?
Offline
I thought the "r" key does that... but it doesn't ;(
Let me fix that, i dont have much time atm tho
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Hi. I discovered ranger two days ago and its awesome. Does anyone have a script for extracting and compressing archives using tar ? Thanks.
Offline
Hi. I discovered ranger two days ago and its awesome. Does anyone have a script for extracting and compressing archives using tar ? Thanks.
I just use use ":shell atool -x %s" with unrar (and atool) installed to extract.
You can bind it to a key, if you want (replace KEY wih your preferred shortcut key):
# WARNING: UNTESTED
map('KEY', fm.execute_console("shell atool -x %s"))
Use atool's -a to compress (with -f to set format).
Offline
Press "1l" to extract with atool. (thats a one and a lowercase L.)
To compress, I use "@apack name.tar" after selecting the files i want to store.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
I've been trying this for a while, but I can't figure out how to achive this:
I use
if f.audio:
c.flags += 'sd'
return tup('nohup', 'urxvtc', '-e', 'mplayer', *c)
to playback audio files. Now, I have an external soundcard, which is used by mplayer with
mplayer -ao alsa:device=plughw=2.0
Now, what do I have to put in the apps.py to make "1l" use the line
return tup('nohup', 'urxvtc', '-e', 'mplayer', '-ao', 'alsa:device=plughw=2.0', *c)
? It can be done this way
if f.audio:
c.flags += 'sd'
return self.either(c, 'mplayer')
[...]
@depends_on('mplayer')
def app_mplayer(self, c):
if c.mode is 1:
return tup('mplayer', '-ao', 'alsa:device=plughw=2.0', *c)
else:
return tup('mplayer', *c)
But I like mplayer to start in a new shell so I can still work in ranger.
Thanks for your help!
Last edited by Army (2011-09-05 14:30:08)
Offline
if f.audio:
c.flags += 'sd'
if c.mode == 1:
return tup('nohup', 'urxvtc', '-e', 'mplayer', '-ao', 'alsa:device=plughw=2.0', *c)
else:
return tup('nohup', 'urxvtc', '-e', 'mplayer', *c)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Oh this can be done this way? Nice!! Now that I see it it makes perfect sense, thanks hut!
Offline
Hi Hut,
I just experienced the following crash that I wanted to report :
***
Ranger version: 1.4.3, executed with python 3.2.2
Locale: fr_FR.UTF-8
Current file: /home/julien/Téléchargements/5622441calendrier-2011-2012-pdf.pdf
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/ranger/core/main.py", line 90, in main
fm.loop()
File "/usr/lib/python3.2/site-packages/ranger/core/fm.py", line 198, in loop
ui.redraw()
File "/usr/lib/python3.2/site-packages/ranger/gui/ui.py", line 221, in redraw
self.draw()
File "/usr/lib/python3.2/site-packages/ranger/gui/ui.py", line 242, in draw
DisplayableContainer.draw(self)
File "/usr/lib/python3.2/site-packages/ranger/gui/displayable.py", line 268, in draw
displayable.draw()
File "/usr/lib/python3.2/site-packages/ranger/gui/widgets/browserview.py", line 102, in draw
DisplayableContainer.draw(self)
File "/usr/lib/python3.2/site-packages/ranger/gui/displayable.py", line 268, in draw
displayable.draw()
File "/usr/lib/python3.2/site-packages/ranger/gui/widgets/browsercolumn.py", line 143, in draw
self._draw_file()
File "/usr/lib/python3.2/site-packages/ranger/gui/widgets/browsercolumn.py", line 172, in _draw_file
Pager.draw(self)
File "/usr/lib/python3.2/site-packages/ranger/gui/widgets/pager.py", line 78, in draw
self._draw_line(i, line)
File "/usr/lib/python3.2/site-packages/ranger/gui/widgets/pager.py", line 114, in _draw_line
self.win.move(i, 0)
_curses.error: wmove() returned ERR
Ranger crashed. Please report this traceback at:
http://savannah.nongnu.org/bugs/?group= … nc=additem
Offline
Is it possible to edit the "user@host:path" at the top left to match ones actual shell prompt?
Offline
Hi Hut,
I just experienced the following crash that I wanted to report :
Fixed, thank you
Is it possible to edit the "user@host:path" at the top left to match ones actual shell prompt?
To change the title once:
1. Open rangerdir/gui/widgets/titlebar.py and copy the function _get_left_part (line 110) into your ~/.config/ranger/options.py.
btw, "rangerdir" is where you get when you type gR in ranger.
2. You will need to remove one tab per line for correct indentation.
3. Below the function, write:
from ranger.gui.widgets.titlebar import TitleBar
TitleBar._get_left_part = _get_left_part
4. Now modify the function to fit your needs.
Here's an example
To change it to your bash prompt:
Either do it manually by translating the bash PS1 to python, or write a little parser. A parser would obviously be shell-dependent. To access the prompt in python you need to export it in your shell rc file first, then access it with os.environ['PS1']
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Sirsurthur wrote:Hi Hut,
I just experienced the following crash that I wanted to report :
Fixed, thank you
totte wrote:Is it possible to edit the "user@host:path" at the top left to match ones actual shell prompt?
To change the title once:
1. Open rangerdir/gui/widgets/titlebar.py and copy the function _get_left_part (line 110) into your ~/.config/ranger/options.py.
btw, "rangerdir" is where you get when you type gR in ranger.
2. You will need to remove one tab per line for correct indentation.
3. Below the function, write:from ranger.gui.widgets.titlebar import TitleBar TitleBar._get_left_part = _get_left_part
4. Now modify the function to fit your needs.
Here's an example
To change it to your bash prompt:
Either do it manually by translating the bash PS1 to python, or write a little parser. A parser would obviously be shell-dependent. To access the prompt in python you need to export it in your shell rc file first, then access it with os.environ['PS1']
Wicked, ta.
Offline
Hi, I have a question: how can I keep the filter setting after changing directory (e.g. through [ and ])?
Offline
Hi, I have a question: how can I keep the filter setting after changing directory (e.g. through [ and ])?
It's a hackish method - all it does is move the filter when you move directory if the setting 'permanant_filter' is True - but I've done this.
I assume you have made a copy of your settings using ranger's --copy-config here.
In your options.py add:
permanant_filter = BOOL
..where BOOL is either True or False. This will choose whether it's on by default.
In your keys.py, add:
map('YOUR KEY', fm.toggle_boolean_option('permanant_filter'))
...where YOUR KEY is the shortcut you want to use ('ze' for me).
The rest is done in ranger's source.
In the enter_dir function of core/environment.py, after the line self.cwd = new_cwd add:
if self.settings['permanant_filter']:
self.cwd.filter = previous.filter
previous.filter = ""
previous.load_content()
In container/settingsobject.py add to ALLOWED_SETTINGS:
'permanant_filter': bool,
I think that's it. Tell me if it's not working. There's probably an easier way to do this, but I don't know it.
Offline
Thank you for the quick reply!
One thing I miss from mc is that in mc, when I press Enter, the file directly under the cursor is opened, whatever other files I have already marked.
Is ranger, wherever I press, Enter, it opens all the files that are marked. Is there a way to get the mc behaviour?
Sorry for the not-so-quick reply. I added the "c" flag to open the current file only, even when other files are marked. To use it, type "rc<enter>".
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Man, i really love ranger :3 i just have a quick requests: it should check if the free space on the device is enough before copying as i messed up badly my usb drive many times because of this
Thanks and keep up the good work
Offline
Hello Hut,
Just for you to know that with the latest updates, the pkgbuild gives the following error :
Best regards,
***
packer -S ranger-git
warning: ranger-git-20110926-1 is up to date -- reinstalling
Aur Targets (1): ranger-git
Proceed with installation? [Y/n] y
Edit ranger-git PKGBUILD with $EDITOR? [Y/n]
==> Détermination de la dernière révision git...
-> Version trouvée : 20110929
==> Création du paquet ranger-git 20110929-1 (jeu. sept. 29 20:37:10 CEST 2011)
==> Vérification des dépendances pour l'exécution...
==> Vérification des dépendances pour la compilation...
==> Récupération des sources...
==> Extraction des sources...
==> Entre dans l'environnement fakeroot...
==> Lancement de build()...
==> Connecting to GIT server...
Cloning into ranger...
remote: Counting objects: 13826, done.
remote: Compressing objects: 100% (3398/3398), done.
remote: Total 13826 (delta 10637), reused 13474 (delta 10375)
Receiving objects: 100% (13826/13826), 2.46 MiB | 490 KiB/s, done.
Resolving deltas: 100% (10637/10637), done.
==> GIT checkout done or server timeout
Cloning into /tmp/packerbuild-1000/ranger-git/ranger-git/src/ranger-build...
done.
==> Running setup.py...
error: package directory 'ranger/help' does not exist
==> ERREUR: Une erreur s'est produite dans build().
Abandon...
The build failed.
Offline
Fixed
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
quatrix wrote:Thank you for the quick reply!
One thing I miss from mc is that in mc, when I press Enter, the file directly under the cursor is opened, whatever other files I have already marked.
Is ranger, wherever I press, Enter, it opens all the files that are marked. Is there a way to get the mc behaviour?Sorry for the not-so-quick reply. I added the "c" flag to open the current file only, even when other files are marked. To use it, type "rc<enter>".
Thanks!
Offline