[Nautilus-list] apm hack



Folks,
	Ok, you might have thought of this before, but someone felt I
should post it.  I'm not on the list, so feel free to reply directly.
	I use Nautilus on a 300MHz laptop.  It can get a little heavy,
though it is useable.  However, some of the nice features don't make
sense on battery power.  I cooked up (with the suggestions of yakk) the
following two scripts:

/home/jlbec/bin/naut-power:
--8<---------------------------------------------------------------------
#!/bin/sh

if on_ac_power
then

    gconftool --type int --set /apps/nautilus/preferences/show_directory_item_counts 1
    gconftool --type int --set /apps/nautilus/preferences/show_icon_text 1
    gconftool --type int --set /apps/nautilus/preferences/preview_sound 1

else

    gconftool --type int --set /apps/nautilus/preferences/show_directory_item_counts 2
    gconftool --type int --set /apps/nautilus/preferences/show_icon_text 2
    gconftool --type int --set /apps/nautilus/preferences/preview_sound 2

fi
-->8---------------------------------------------------------------------

/etc/apm/event.d/jlbecnaut:
--8<---------------------------------------------------------------------
#!/bin/sh

case "$1,$2" in
change,power)
	su - jlbec -c '/home/jlbec/bin/naut-power'
esac
-->8---------------------------------------------------------------------


	Change 'jlbec' to your username, put them where you want, and
all the 'tradeoff' options get shut down when you are on battery power.

Joel

-- 

Life's Little Instruction Book #109

	"Know how to drive a stick shift."

			http://www.jlbec.org/
			jlbec evilplan org




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]