Print your X idle time

Xprintidle is a utility that queries the X server for the user’s idle time and prints it to stdout (in milliseconds). You could use it to check if anyone was sitting on your computer while you were away 😛 or even write scripts to perfom simple tasks like limiting your total idle time or send mails and notices.

# apt-get install xprintidle


while [ 1 ];
if [ `xprintidle` -gt 120000 ];
notify-send "You have been idle for 2 mins"
sleep 1

This script will send a notification when idle is more than 2mins and stop.

Be creative 😀

Sending commands to Xchat from the command line

A nice way to send commands to xchat from the command line is by using D-Bus. D-Bus is a system for software applications to communicate with one another. A nice command tool for that job is dbus-send and comes with the “dbus” package in debian.

Continue reading Sending commands to Xchat from the command line

Sys info to image file – converter

First of all you need to install the following packages.
For debian/ubuntu users:

# aptitude install imagemagick html2ps lm-sensors

*lm-sensors needs to be configured before you can use it

Now download this script and execute it as normal user.

$ sh

A file called “Drawinfo.png” will be created and it looks something like that.