mirror of
https://github.com/nicolargo/glances.git
synced 2024-09-11 12:47:14 +03:00
Catch exception when init colors in TMUX
This commit is contained in:
parent
d8c5a72387
commit
0447e210e5
@ -287,10 +287,13 @@ class _GlancesCurses(object):
|
|||||||
self.filter_color = curses.color_pair(9) | A_BOLD
|
self.filter_color = curses.color_pair(9) | A_BOLD
|
||||||
self.selected_color = curses.color_pair(10) | A_BOLD
|
self.selected_color = curses.color_pair(10) | A_BOLD
|
||||||
# Define separator line style
|
# Define separator line style
|
||||||
curses.init_color(11, 500, 500, 500)
|
try:
|
||||||
curses.init_pair(11, curses.COLOR_BLACK, -1)
|
curses.init_color(11, 500, 500, 500)
|
||||||
self.separator = curses.color_pair(11)
|
curses.init_pair(11, curses.COLOR_BLACK, -1)
|
||||||
|
self.separator = curses.color_pair(11)
|
||||||
|
except Exception:
|
||||||
|
# Catch exception in TMUX
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
# The screen is NOT compatible with a colored design
|
# The screen is NOT compatible with a colored design
|
||||||
# switch to B&W text styles
|
# switch to B&W text styles
|
||||||
|
Loading…
Reference in New Issue
Block a user