Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.40 KB | None | 0 0
  1. !/usr/bin/perl
  2. print "conky.config = {\n";
  3. while(<STDIN>) {
  4.         s/^\s*(.*?)\s*$/$1/;
  5.         if(/^TEXT$/) { last; }
  6.         if(/\s+/) { s/\s+/ = /; print "$_,\n"; }
  7.         else { print "$_ = true,\n"; }
  8. }
  9. print "};\n\nconky.text = [[";
  10. while(<STDIN>) { print $_; }
  11. print "]];\n"
  12.  
  13. #a perl version of the convert script, the lua version fails on the following config:
  14. background
  15. TEXT
  16. $time
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement