20100114

.Pacman-emotion-pill

Got archlinux and a script that tells you when to update your system? Well that script probably say pretty boring standard things like "Update your system!".

But pacman has feelings too, or maybe not, but he wants to. This script will give him that:

Copy this and put it in your home directory, name it .pacman-emotion-pill


#!/usr/bin/perl
use strict;
use warnings;
my $n = (`pacman -Qu | wc -l`);
chomp ($n);
if ($n == 0)
{
print "Pacman is happy! :)"
}
else
{
print "Pacman is sad! :("
}

Create /etc/cron.hourly/syncpacman and put this in it:


#!/bin/sh
/usr/bin/pacman -Sy

And do chmod +x syncpacman

Download conky, configure it according to the man-pages and put something like this in .conkyrc:


${color}${texeci 300 /home/jonas/.pacman-emotion-pill}


Execute conky and pacman should now show you feelings.

0 kommentarer: