#!/bin/sh # When hidden files (.emacs, etc) are hidden, shows "Show Hidden Files" option. # When hidden files are shown, shows "Hide Hidden Files" option. # Uses gconf to toggle between the two Nautilus options. # Should be placed in ~/.gnome2/nautilus-scripts/ with executable permission. OLDSTATE=$(gconftool-2 --get "/desktop/gnome/file_views/show_hidden_files") if [ "$OLDSTATE" == "false" ] ; then NEWSTATE="True" mv ~/.gnome2/nautilus-scripts/Show\ Dot\ Files ~/.gnome2/nautilus-scripts/Hide\ Dot\ Files else NEWSTATE="False" mv ~/.gnome2/nautilus-scripts/Hide\ Dot\ Files ~/.gnome2/nautilus-scripts/Show\ Dot\ Files fi gconftool-2 --set "/desktop/gnome/file_views/show_hidden_files" --type boolean $NEWSTATE