Tuesday, February 14, 2006

FIRST POST!!!!!!!!!!!11111

Oh SWEET! I am so lucky! I get to be the first person to post here!!!!!!!

Okay, junk-wrangling aside (no, that's not a reference to Brokeback Mountain), here's what I'm working on now:

I'm trying to write a pair of scripts, both to control amaroK. One of these jives should wake me up in the morning (at a given time) and the other should play sleepy music, while slowly reducing in volume.

Right now they work... kinda. At least, they worked last night, because they put me to sleep and woke me up. However, on Sunday morning, the alarm script failed to work, because amaroK crashed or something, and blahblahjunker. The problem is, I don't think I changed anything between when I went to bed on Saturday night and today when I woke up.

Here's the alarm script: (it gets called with 'at -f alarmscript1.sh X:XXam')

DISPLAY=:0.0
export DISPLAY
aumix -v 20
dcop amarok player enableRandomMode true
dcop amarok playlist clearPlaylist
amarok -s
dcop amarok playlist addMedia file:///home/paithan/Awaken.m3u
dcop amarok player setVolume 100
amarok -p
firefox http://www.wunderground.com/cgi-bin/findweather/getForecast?query=Boston%2C+MA

I don't recall why those first two lines are there, but Debajyoti worked out that they were necessary... at one point in time. Deb showed me the coolness of dcop, while radsaq helped me figure out how to make the call to addMedia. Note that after it's all done it also gives me my sexy weather:)

Here's the sleepythyme script: (I just call this junker with './sleepscript1.sh')

killall -9 firefox
DISPLAY=:0.0
export DISPLAY
aumix -v 6
dcop amarok player enableRandomMode true
dcop amarok playlist clearPlaylist
amarok -s
dcop amarok playlist addMedia file:///home/paithan/Sleep.m3u
amarok -p
for i in $(seq 101)
do
j=$((101-i))
dcop amarok player setVolume $j
sleep 10
done
amarok -s

Note that the first thing this wants to do is kill any instances of firefox. It'd be great to get that working. Stupid firefox crashes my computer if it's left idle for too long. Well... it doesn't crash it... but it does get X to start using 99% of my CPU, overheating my laptop, and melting a hole in my desk:-P (Thank you Lapinator for preventing that hole from actually occuring!) Of course, this also prevents anything else from running properly;)

The changes that I made at the end on Saturday night was moving the (first instance of the) line 'amarok -s' further down in the script. I think amaroK was unhappy about being given some command (at which point it starts up if it hadn't already been) then immediately stopping. But, like I said, I think this version of the scripts caused it to crash on Sunday morning (and I woke up an hour late, egads!).
These are the first scripts I've ever (really) written, and any help with these would be great. I will try to do most of the writing of them myself as I update them (I want to end up calling at somehow inside the script instead of using at to call the script).

In other news, I want to get an alphasmart neo. Yay. Also in other news, I'm already annoyed with Blogger. Here are my annoyances so far:

1) I can't seem to turn off Italics at the end of my text using the hot keys. Is this a problem with my version of Firefox?

2) I can't edit an existing link just by placing the cursor inside the linked text and clicking on the link button. This is annoying, because in order to decide where the link will be, I have to highlight text. As soon as I click the link button, it opens a window over Firefox, so I can't go and highight the actual url I want to put in there (generally the url from another Firefox tab).

There's probably an easy work around, but I don't want to have to use Windowy hotkeys to copy-paste:-P

Similarly annoying, is that then when I then close that little window, my cursor has the little link attached to it, and if I put it somewhere it throws it in my text box here. Awesome. Just plain awesome.

Okay, it's just about time for bed for me. Indeed, Kyle is sleepy. Or, he will be if his sleepythyme(pizzapie) script works.

0 Comments:

Post a Comment

<< Home