DeskAttendant

by Kris Finkenbinder
deskattendant@redbearnet.com

A set of scripts for managing shortcuts in the Deskbar
and refreshing the system (i.e., Deskbar and Tracker).


Download


Current version of DeskAttendant is 0.7
Keep an eye on BeBits for updates.

What's New in version 0.7
     I rewrote the script almost completely, ending up reducing the size by about half (but then added a bunch of help text), increasing the efficiency quite a lot (i.e., the time it takes to restart the Deskbar/Tracker), and made it far more robust when attempting to restart or kill a system that's bogged down and slow. The latter two come from the use of while loops and wait_for functions in place of the former "wait x seconds and see if you can restart it". Relying on conditionals rather than time makes things work better under unusual conditions.

     I've also added support for the Be mailbox icon, through the help of some of the friendly folks on BeDevTalk. Until now I couldn't figure out how to get it back on demand. If you don't use the mailbox icon, it won't appear suddenly, as the script contains some conditionals that check to see if the mail_daemon is running.

     This version has a couple of help boxes that will pop up if the script runs into trouble while trying to restart the system. A nice feature I've been thinking about doing for quite a while. Oh, and I also simplified the alert box interface, cutting down on the number of questions the user has to click through, which makes DeskAttendant even easier to use and faster. If nothing goes wrong, the user only sees one (count it, one) dialog box. All in all, I'm pretty proud of this version, which is why it's no longer in beta status. :-)

What's New in version 0.6 Beta
     This version is updated to work around a bug in BeOS R5 (yes, a bug, as far as I can tell) where desklink is unable to grab the correct icon from a symlink. Also included is a line in the UserReplicants file to call ReloadDeskbarIcons automatically, if it's installed. Get ReloadDeskbarIcons here, and put a symlink to it in /boot/home/config/bin.

What's Included
     Three main files are included in this archive: DeskAttendant, LoadReplicants and UserReplicants. DeskAttendant is used to refresh the Deskbar and Tracker when necessary. When DeskAttendant gets finished restarting the Deskbar, it runs LoadReplicants. When LoadReplicants is run from either DeskAttendant or from the UserBootscript, it loads all the shortcuts found in UserReplicants into the Deskbar tray. Included in the UserReplicants.sample script are commands to reload the Dial up networking modem icon, the volume control speaker icon, and several shortcuts to various useful programs, documents and folders. Just try it out by installing and running DeskAttendant from the desktop and reloading the Deskbar.

Installation
     Well, you are reading this, so you've already unpacked the archive. Good job. Now double-click on the "Install" file. Answer the questions it asks, and you're done. *golf clapping* "bravo" "daring" "exquisite technique" *more golf clapping*

     Since LoadReplicants is a completely separate script from DeskAttendant, you can easily forego using DeskAttendant at all and use something better like ProcessController or BackOnTrack to restart the Deskbar. After restarting the Deskbar by any means, just open a terminal and type: "LoadReplicants &"

Customizing Your Deskbar Replicants
     The UserReplicants file can be used as-is with no configuration at all, and will load some generic shortcuts to system files and folders and applications. For the brave and/or those who have a little experience with shell scripts, adding and removing shortcuts is relatively simple. Entries for ProcessController, WorkspaceSwitcher, the DUN modem icon and the volume control speaker icon are all included in the script already. For other applications, you'll have to look in their documentation to see if there is a way to reload their icon without restarting the application. For just general shortcuts, there is a command-line function called "desklink" that was included with BeOS R4.5. The syntax for desklink shortcuts is thus:

desklink \
cmd="Name:/path/to/application &" \
cmd="Name2:/path/to/another/application &" \
label="Name" \
/path/to/application
or:
desklink label="Name" /path/to/application
or simply:
desklink /path/to/application
     For the sake of clarity, in the script I have put each part of the command on a new line, just like I've done with the first example here. This is possible by "escaping" the newline character by typing a backslash before hitting return. Using the backslash technique, the shortcuts are much easier to read and to work with. Everything that comes after a "cmd" will appear in a right-click menu, while the very last line is the application that will be launched when the icon is clicked on directly, and the label is what will show up in the tooltip when the mouse is held over the icon. Any number of "cmd's" can be added to the list, and arguments can be passed to the applications inside the quotes. You can even put more than one command in one "cmd" by separating them with semicolons. This is how some of the commands in DeskCD work. (Don't have DeskCD? Download it from BeBits.) Experiment. Have fun.
     In most scripts it's a good idea to put an ampersand (&) after each command, but in this case doing so will cause the icons to load in a different order almost every time. Caveat user.

--Kris Finkenbinder
--deskattendant@redbearnet.com
--http://www.redbearnet.com/software.html


Recommended Downloads from BeBits:
Hit&Run - http://www.bebits.com/app/98
WorkspaceSwitcher - http://www.bebits.com/app/27
ProcessController - http://www.bebits.com/app/313
Click here!
This site is hosted for FREE on HyperMart -- yours can be, too! Click here for more information.