|
24 | 24 |
|
25 | 25 | # Global vars |
26 | 26 | argopts = {} |
27 | | - |
| 27 | +colortheme = None |
28 | 28 | #Load custom parameters from ~/mygitcheck.py |
29 | 29 | configfile = expanduser('~/mygitcheck.py') |
30 | 30 | if os.path.exists(configfile): |
31 | 31 | sys.path.append(expanduser('~')) |
32 | 32 | import mygitcheck as userconf |
33 | 33 |
|
34 | | - # Try to load colorthemme |
| 34 | + # Try to load colortheme |
35 | 35 | if hasattr(userconf, 'colortheme'): |
36 | 36 | colortheme = userconf.colortheme |
37 | | - else: |
38 | | - # Default theme |
39 | | - defaultcolor = attr('reset') + fg('white') |
40 | | - colortheme = { |
41 | | - 'default': defaultcolor, |
42 | | - 'prjchanged': attr('reset') + attr('bold') + fg('deep_pink_1a'), |
43 | | - 'prjremote': attr('reverse') + fg('light_cyan'), |
44 | | - 'prjname': attr('reset') + fg('chartreuse_1'), |
45 | | - 'reponame': attr('reset') + fg('light_goldenrod_2b'), |
46 | | - 'branchname': defaultcolor, |
47 | | - 'fileupdated': attr('reset') + fg('light_goldenrod_2b'), |
48 | | - 'remoteto': attr('reset') + fg('deep_sky_blue_3b'), |
49 | | - 'committo': attr('reset') + fg('violet'), |
50 | | - 'commitinfo': attr('reset') + fg('deep_sky_blue_3b'), |
51 | | - 'commitstate': attr('reset') + fg('deep_pink_1a'), |
52 | | - 'bell': "\a", |
53 | | - 'reset': "\033[2J\033[H" |
54 | | - } |
| 37 | +if colortheme is None: |
| 38 | + # Default theme |
| 39 | + defaultcolor = attr('reset') + fg('white') |
| 40 | + colortheme = { |
| 41 | + 'default': defaultcolor, |
| 42 | + 'prjchanged': attr('reset') + attr('bold') + fg('deep_pink_1a'), |
| 43 | + 'prjremote': attr('reverse') + fg('light_cyan'), |
| 44 | + 'prjname': attr('reset') + fg('chartreuse_1'), |
| 45 | + 'reponame': attr('reset') + fg('light_goldenrod_2b'), |
| 46 | + 'branchname': defaultcolor, |
| 47 | + 'fileupdated': attr('reset') + fg('light_goldenrod_2b'), |
| 48 | + 'remoteto': attr('reset') + fg('deep_sky_blue_3b'), |
| 49 | + 'committo': attr('reset') + fg('violet'), |
| 50 | + 'commitinfo': attr('reset') + fg('deep_sky_blue_3b'), |
| 51 | + 'commitstate': attr('reset') + fg('deep_pink_1a'), |
| 52 | + 'bell': "\a", |
| 53 | + 'reset': "\033[2J\033[H" |
| 54 | + } |
55 | 55 |
|
56 | 56 |
|
57 | 57 | class html: |
|
0 commit comments