pühapäev, 12. oktoober 2008

Väike skript OSX dashboardi kinnipanekuks

Tegin just sellise shelli skripti:

#!/bin/sh
#
# Switches OSX dashboard off and on
#
# @author Sven Varkel
# @version $Id$
dashboardoff(){
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock
}
dashboardon(){
defaults write com.apple.dashboard mcx-disabled -boolean NO
killall Dock
}
case "$1" in
off)
dashboardoff
;;
on)
dashboardon
;;
*)
echo $"Usage $0 {off|on} to turn dashboard off or on"
;;
esac
exit 0


Salvesta see omale faili ~/scripts/dashboardswitch.sh ja siis on seda sealt hea kasutada dashboardi kinnipanekuks. Ma enamasti DB ei kasuta ja see õgib mõttetult ressurssi lihtsalt, sellest ka ajend skripti loomiseks.

Kommentaare ei ole: