0

Possible Duplicate:
Is there a keyboard shortcut to toggle Tree view / Places View?

I want to know if there's a hotkey in Nautilus to toggle between Tree View and Places. I googled around but I haven't found any solution... If there isn't such a hotkey, is it possible to suggest Nautilus' developers to implement this in future versions? I really like the "Places" feature, but in some occasions Tree View is more suitable to my needs.

marked as duplicate by jokerdino, Nitin Venkatesh, jrg Mar 1 '12 at 16:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

You could use a script to toggle between the commands. Here's a python script.

Copy the following into a file

#!/usr/bin/env python

from subprocess import Popen, PIPE

setting = Popen(['gsettings', 'get', 'org.gnome.nautilus.window-state', 'side-pane-view'], stdout=PIPE).communicate()[0].rstrip()

if setting == "'places'":
    Popen(['gsettings', 'set', 'org.gnome.nautilus.window-state', 'side-pane-view', '"tree"'])
elif setting == "'tree'":
    Popen(['gsettings', 'set', 'org.gnome.nautilus.window-state', 'side-pane-view', '"places"'])

Save it as ~/.pane-toggle.py. Make it executable

chmod +x ~/.pane-toggle.py

Open the Keyboard settings and go to the Shortcuts tab. On the left, choose custom shortcuts, and make a new shortcut with the '+' button. Name it whatever you want. For the command, use

/home/username/.pane-toggle.py.

Now just set the shortcut to what you want (press enter while it's highlighted).

Of course you can name the file whatever you want and put it wherever you want, just be consistent.

  • Thank you very much for the script... it worked perfectly. – Rafael Lima Nov 17 '11 at 13:21
2

Try this if instead of places you prefer a tree view of your folders placed on the left panel, use this command

gsettings set org.gnome.nautilus.window-state side-pane-view "tree"

To revert it back

gsettings set org.gnome.nautilus.window-state side-pane-view "places"

There is no shortcut that I know of but you can create a small scrip that does that for you and bind it to a kb shortcut, if you are interested drop a comment, I'll make one for you.

Not the answer you're looking for? Browse other questions tagged or ask your own question.