File: conky.py

package info (click to toggle)
conky 1.11.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 11,824 kB
  • sloc: xml: 89,480; cpp: 39,856; ansic: 2,340; python: 714; sh: 194; makefile: 130
file content (21 lines) | stat: -rw-r--r-- 649 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'''apport package hook for conky

Collect conky conf file, conky user's conf file and any specified lua script

Copyright 2009 Cesare Tirabassi <norsetto@ubuntu.com>

'''

from apport.hookutils import *
from os import path
import re

def add_info(report):
	attach_conffiles(report, 'conky')
        conkyrc_path = path.expanduser('~/.conkyrc')
        if path.exists(conkyrc_path):
            attach_file(report, conkyrc_path)
            for file in re.findall("^lua_load\s+(.*?)$",
                                   open(conkyrc_path).read(),
                                   re.MULTILINE):
                attach_file_if_exists(report, file)