@@ -68,7 +68,16 @@ CPU {{cpu}} | MEM {{mem}} | root {{fs///}}
68
68
fs_desc = _ ("Show available space in the file system." ),
69
69
example = _ ("Example:" ))
70
70
71
+ indicator_icon = '<?xml version="1.0" encoding="UTF-8"?> \
72
+ <svg width="800px" height="800px" version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> \
73
+ <defs><style>.a{fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;}</style></defs> \
74
+ <path class="a" d="m40.5 5.5h-33a2 2 0 0 0-2 2v33a2 2 0 0 0 2 2h33a2 2 0 0 0 2-2v-33a2 2 0 0 0-2-2z" stroke="#fff"/> \
75
+ <polyline class="a" points="9.5 23.717 17.98 23.717 19.393 25.922 20.919 22.7 23.463 37.624 25.385 10.376 27.307 24.509 28.551 23.717 38.5 23.717" stroke="#fff"/></svg>'
71
76
77
+ empty_icon = '<?xml version="1.0" encoding="UTF-8" \
78
+ standalone="no"?><svg id="empty" xmlns="http://www.w3.org/2000/svg" \
79
+ height="22" width="1" version="1.0" \
80
+ xmlns:xlink="http://www.w3.org/1999/xlink"></svg>'
72
81
class IndicatorSysmonitor (object ):
73
82
SENSORS_DISABLED = False
74
83
@@ -77,12 +86,13 @@ class IndicatorSysmonitor(object):
77
86
self ._help_dialog = None
78
87
79
88
fn , self .tindicator = tempfile .mkstemp (suffix = ".svg" )
89
+ svg = empty_icon
90
+ desktop_environment = os .environ .get ('DESKTOP_SESSION' )
91
+ if desktop_environment :
92
+ if desktop_environment .lower ()[:8 ] == 'cinnamon' :
93
+ svg = indicator_icon
80
94
81
95
with open (self .tindicator , "w" ) as f :
82
- svg = '<?xml version="1.0" encoding="UTF-8" \
83
- standalone="no"?><svg id="empty" xmlns="http://www.w3.org/2000/svg" \
84
- height="22" width="1" version="1.0" \
85
- xmlns:xlink="http://www.w3.org/1999/xlink"></svg>'
86
96
f .write (svg )
87
97
f .close ()
88
98
0 commit comments