Created
February 10, 2015 14:03
-
-
Save noscript/8fb40c8842a78cde4e8a to your computer and use it in GitHub Desktop.
Shortcut to show folders first in Nautilus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Version: Sun Sep 8 2013 | |
OLD_VALUE= | |
LSB_RELEASE=$(lsb_release -sr) | |
if [ $LSB_RELEASE \< '12.04' ]; then | |
OLD_VALUE=$(gconftool --get /apps/nautilus/preferences/sort_directories_first) | |
else | |
OLD_VALUE=$(dconf read /org/gnome/nautilus/preferences/sort-directories-first) | |
fi | |
NEW_VALUE='false' | |
if [ $OLD_VALUE == 'false' ]; then | |
NEW_VALUE='true' | |
fi | |
if [ $LSB_RELEASE \< '12.04' ]; then | |
gconftool --type Boolean --set /apps/nautilus/preferences/sort_directories_first $NEW_VALUE | |
else | |
dconf write /org/gnome/nautilus/preferences/sort-directories-first $NEW_VALUE | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment