Tag Archives: power

rtcwake and the ghetto alarm clock: Wake up on time

This one comes from Alfredo Palhares, and I don’t have much to add to his description: It’s essentially a one-liner using rtcwake to power up a machine from suspend, and immediately begin playing music. Setting the exact time makes it into an alarm clock, of sorts.

I’m shamelessly copy-and-pasting here:

sudo rtcwake -m disk $(date +%s -d 'tomorrow 08:30') && amixer -c 0 set Master 100% && mpv /home/masterkorp/Music//Mozart\ Discography\ \(5\ CDs\)\ 320kbps//

I see that it uses mpv for playback, but I suppose almost any music player would work, so long as it takes a music file or folder as a target. And I suppose it’s worth saying it will require some ALSA support. 😉

I have to be honest on two points. First, I haven’t actually tried this personally, mostly because I almost never use suspend on any machine, despite the fact that I only work with laptops. Suspend has never been of much interest to me; I prefer to zip from cold boot to command prompt. :mrgreen:

The second issue is geographical: I keep my arsenal of junky laptops in a completely different part of the house, and even while belching out their best tinny volume, I doubt the sound would carry. So I’ll probably stick with the old-fashioned beeping clock alarm. 🙄

For those reasons and reasons of protocol, if you have questions or suggestions, you should probably direct them to Alfredo. 😉

rtcwake, by the way, is in util-linux, which is probably, maybe, possibly … on your system already. 🙂

tpp: Pulling it all together

After mentioning textdraw the other day, I listed a few other artistic applications that might intrigue you.

But between toilet (and figlet), cadubi, and img2txt, the only thing that’s missing is something to pull it all together.


tpp is an analogue for PowerPoint at the console, translating marked-up text files into frame-by-frame presentations. All that with no more requirements than a screen to look at.

And a keyboard I suppose, since you’ll need something to control the presentation. And since tpp is written in ruby, you’ll want something that can handle that without too much stress; I’ve had machines in the past that suffered a little under ruby.

But in all truth, even the process of putting together a tpp presentation is child’s play. Take a look at the examples in the documentation, and tell me that the markup is difficult. I dare you. 😉

As you can see above, tpp works straightaway with figlet. It also has color, can manage some simple transitions (which means you can do some fundamental animation) and can even send commands to the underlying shell and redirect the output into the presentation. That’s rather impressive.

So what that means is, we have one tool capable of drawing and editing lines and shapes, two that can handle banner text output (one with color), another that can render color images into text versions, another that can draw in color in stamp-pad style, and now tpp, which can convert text into simple presentations, complete with color and basic animation.

What are you waiting for? The audience is listening. 😉

acpitool: Information, please

A while back I showed you powertop and yacpi, in way of something to keep you busy, powerwise, at the console.

Here’s another one, although I suspect you might find it less appealing than the others: acpitool.


Reason being, that’s all I can seem to make it do. Even on a machine with much newer specs, it shows only a few more flags and bells.


I suppose there’s nothing wrong with that; (insert divine entity here) knows I’ve shown off programs that had far less to boast in terms of visual appeal.

Perhaps just from my standpoint though, it’s tough to see what would draw anyone to this, over the other two tools.

You try it though and if you get more out of it than I did, please tell me how. 😐

yacpi: Maybe more useful to you than me

I run into a lot of tools that are either over my head, or beyond my frame of reference.

For example, yacpi.


As you can see — and as you might see even better if you visit the home page — yacpi shows acpi information (battery, AC adapter, thermal zones, etc.) for the host machine.

Or it would, if I weren’t using such an old computer, I suppose. yacpi works great on a newer machine, as you can see.


And is actually quite useful, in an oblique and monitoring fashion. As far as I can tell, beyond showing information like that you see above, yacpi doesn’t control, tweak, adjust or mangle anything on your system.

Apparently, it’s just got to be a slightly newer system. Than this one, anyways. 🙂

powertop: Not just a pretty name

There is no guarantee that suffixing the name of your program with “-top” will endear it to me.

On the other hand, I do like top. And even better is htop. And iftop. And iotop. And now powertop.


I’m not a power freak; I get no pleasure from tuning the power consumption on a 12-year-old laptop. But I do enjoy seeing what uses what, where the system priorities are, and — in a bit of a twist — to be able to toggle a few switches and adjust behavior.

That powertop does in its far right tab, the aptly-named “Tunables.” If you need to manhandle the settings on your machine, you could check out what’s available there. I’m afraid I have no advice in that respect.

But it is fun to poke around with them. 😉