Re: quit the dock - possible?
Re: quit the dock - possible?
- Subject: Re: quit the dock - possible?
- From: Martin Orpen <email@hidden>
- Date: Thu, 24 Jun 2004 07:50:58 +0100
on 24/6/04 3:26 am, Jonathan Levi, M.D. at email@hidden wrote:
>
On Wed, 23 Jun 2004 15:24:09 +0100, Martin Orpen
>
<email@hidden> wrote:
[snip]
>
> Wow, what a great idea!
>
>
>
> I've written the script for you:
>
>
>
> repeat
>
> set kDock to do shell script "top -l 1 | awk '/Dock/ { print $1 }'"
>
> do shell script "kill " & kDock
>
> delay 2
>
> end repeat
>
>
Very cute, indeed.
Err, the script *was* posted in jest...
>
For fanatics about minimizing lines, one can contract that script to
>
>
repeat
>
do shell script "kill $(top -l 1 | awk '/Dock/ { print $1 }')"
>
delay 2
>
end repeat
Which I'm glad you did, because it helps me cut a line from this script:
tell application "System Events"
if "KeyboardViewerServer" is in name of every process then
do shell script "kill $(top -l 1 | awk '/KeyboardVi/ { print $1
}')"
delay 1
end if
end tell
tell application "KeyboardViewerServer" to activate
Which allows me to use Keyboard Viewer without having an annoying flag in
the Finder menu bar. I'm presuming that I could stop the app hiding if I
could be bothered - but killing it is more satisfying ;-)
>
Reducing the delay to 1 second makes the Dock appear to stay shut,
>
but the script dies when a kill command finds the Dock closed. You
>
can get around that with
>
>
repeat
>
try
>
do shell script "kill $(top -l 1 | awk '/Dock/ { print $1 }')"
>
delay 1
>
end try
>
end repeat
>
>
but you'd best be sure that not letting the Dock revive is really
>
what you want: I put that script into ScriptMenu.menu and now I can't
>
kill it!
Personally, I like the dock. I've customised it a bit by replacing the
Finder and Trash icons with alternatives of my own liking and written a bad
script to rearrange the icons in alphabetical or random order (to make
finding my favourite apps more interesting).
The best solution has already been posted - replace the dock.app with
something else so that the system is fooled into thinking that the dock is
running.
Alternatively you could kill off the call that keeps the dock running - my
logs were full of:
SystemUIServer[13117] _initWithWindowNumber: error creating graphics ctxt
object for ctxt:30467, window:18307
As a result of running that script.
Regards
--
Martin Orpen
Idea Digital Imaging Ltd -- The Image Specialists
http://www.idea-digital.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.