I am a hat user, not Ubuntu but since it seems as if 95% of conky users are either on Ubuntu or #! thought I would post my question here.
System: Fedora 17 xfce spin on elderly Dell box.
Using a very simple conkyrc with one local modification. Wanted to be able to display information about my mounted removable drives in real-time so hacked a simple (ugly) perl script to be called by conky function ${execp}
Everything works as advertised with one exception. The last line is offset by one character and it is driving me nuts. (Just a bit OCD)
Screenshot of the relevant portion of the conky window:
The script used (I warned you it was ugly) follows and is called in the TEXT portion of conkyrc by ${execp drive-list}
Code:
#!/usr/bin/perl
use warnings;
my $directory = '/run/media/david';
opendir(DIR,$directory);
my @files = grep { $_ ne '.' && $_ ne '..' } readdir(DIR);
closedir(DIR);
foreach(@files){
print "$_", '${alignr}${fs_used /run/media/david/', "$_", '} / ${fs_size /run/media/david/', "$_", '} ${alignr}${fs_free_perc /run/media/david/', "$_", '}% Free';
print "\n";
}
If I copy the output of the script direct to conkyrc without using ${execp} it parses without the trailing space in the last line.
Not a big deal, but the lack of symmetry makes me nuts.
Any suggestions really appreciated. Let me know if any additional info would be helpful.
TIA
Cap' Couillon
Bookmarks