http://techbase.kde.org/Development/Tutorials/Shell_Scripting_with_KDE_Dialogs
Recently, the thought of putting a checklist for Audacity came to my mind. It is to remind the user (whether it be myself or the church PA crew who is recording the sermons) of 3 things: check the power, check the microphone volume, and save by using "Export as MP3".
I was thinking of printing a label and pasting it on the keyboard wrist rest area, but I decided not to spoil the surface, and so, the idea of pop-ups popped up :P
I used KDialog, a built-in KDE commandline application. You can either do a "man kdialog" to read the manual or go to the URL above. It's quite powerful and versatile, but I will just focus on a simple messagebox pop-up in this post.
I created a bash script which will pop up a message. When the user presses Enter or clicks OK, Audacity will be launched. So now, I have replaced the Audacity entry in my Easy Mode GUI to call this script instead of launching Audacity directly.
- Press Ctrl-Alt-T to open the terminal console.
- Type "sudo nano /usr/bin/audacity-checklist" to create the bash script.
- Type out the contents below.
#!/bin/bash
title="Audio Recording Checklist"
msg1="1) Have you plugged in the power and SWITCHED IT ON?"
msg2="2) Check that the microphone volume is at ONE-QUARTER of the maximum value."
msg3="3) When saving, use 'Export as MP3', NOT 'Save Project As'."
myMsg=$title'\n'$msg1'\n'$msg2'\n'$msg3
nohup kdialog -msgbox "$myMsg"
nohup audacity
exit 0
- Press Ctrl-O to save and Ctrl-X to exit.
- Set the correct permissions to execute by typing
"sudo chmod 755 /usr/bin/audacity-checklist" - Try it out by typing "audacity-checklist". A pop-up will appear as following:
msg1="a"
msg2="b"
#gives "ab"
echo $msg1$msg2
#gives "a b"
echo $msg1' '$msg2
#gives "S$a - b**"
echo 'S$'$msg1' - '$msg2'**'
No comments:
Post a Comment