@@ -47,8 +47,6 @@ class _GlancesCurses(object):
47
47
'4' : {'handler' : '_handle_quicklook' },
48
48
'5' : {'handler' : '_handle_top_menu' },
49
49
'6' : {'switch' : 'meangpu' },
50
- '9' : {'switch' : 'theme_white' ,
51
- 'handler' : '_handle_theme' },
52
50
'/' : {'switch' : 'process_short_name' },
53
51
'a' : {'sort_key' : 'auto' },
54
52
'A' : {'switch' : 'disable_amps' },
@@ -158,9 +156,6 @@ def __init__(self, config=None, args=None):
158
156
logger .critical ("Cannot init the curses library ({})" .format (e ))
159
157
sys .exit (1 )
160
158
161
- # Load the 'outputs' section of the configuration file
162
- # - Init the theme (default is black)
163
- self .theme = {'name' : 'black' }
164
159
165
160
# Load configuration file
166
161
self .load_config (config )
@@ -202,18 +197,13 @@ def load_config(self, config):
202
197
"""Load the outputs section of the configuration file."""
203
198
if config is not None and config .has_section ('outputs' ):
204
199
logger .debug ('Read the outputs section in the configuration file' )
205
- # Load the theme
206
- self .theme ['name' ] = config .get_value ('outputs' , 'curse_theme' , default = 'black' )
207
200
# Separator ?
208
201
self .args .enable_separator = config .get_bool_value ('outputs' , 'separator' , default = True )
209
202
# Set the left sidebar list
210
203
self ._left_sidebar = config .get_list_value ('outputs' ,
211
204
'left_menu' ,
212
205
default = self ._left_sidebar )
213
206
214
- def is_theme (self , name ):
215
- """Return True if the theme *name* should be used."""
216
- return getattr (self .args , 'theme_' + name ) or self .theme ['name' ] == name
217
207
218
208
def _init_history (self ):
219
209
"""Init the history option."""
@@ -258,11 +248,7 @@ def _init_colors(self):
258
248
# ex: export TERM=xterm-256color
259
249
# export TERM=xterm-color
260
250
261
- if self .is_theme ('white' ):
262
- # White theme: black ==> white
263
- curses .init_pair (1 , - 1 , - 1 )
264
- else :
265
- curses .init_pair (1 , - 1 , - 1 )
251
+ curses .init_pair (1 , - 1 , - 1 )
266
252
if self .args .disable_bg :
267
253
curses .init_pair (2 , curses .COLOR_RED , - 1 )
268
254
curses .init_pair (3 , curses .COLOR_GREEN , - 1 )
@@ -300,10 +286,7 @@ def _init_colors(self):
300
286
try :
301
287
curses .init_pair (i + 9 , colors_list [i ], - 1 )
302
288
except Exception :
303
- if self .is_theme ('white' ):
304
- curses .init_pair (i + 9 , - 1 , - 1 )
305
- else :
306
- curses .init_pair (i + 9 , - 1 , - 1 )
289
+ curses .init_pair (i + 9 , - 1 , - 1 )
307
290
self .filter_color = curses .color_pair (9 ) | A_BOLD
308
291
self .selected_color = curses .color_pair (10 ) | A_BOLD
309
292
# Define separator line style
@@ -455,8 +438,6 @@ def _handle_top_menu(self):
455
438
else :
456
439
self .enable_top ()
457
440
458
- def _handle_theme (self ):
459
- self ._init_colors ()
460
441
461
442
def _handle_process_extended (self ):
462
443
self .args .enable_process_extended = not self .args .enable_process_extended
0 commit comments