Add a check for terminals not supporting 256 colors

This commit is contained in:
mathieui 2020-05-24 22:37:34 +02:00
parent cf131af4a8
commit d3e237811c

View file

@ -543,6 +543,12 @@ class Core:
default_tab.on_gain_focus() default_tab.on_gain_focus()
self.tabs.append(default_tab) self.tabs.append(default_tab)
self.information('Welcome to poezio!', 'Info') self.information('Welcome to poezio!', 'Info')
if curses.COLORS < 256:
self.information(
'Your terminal does not appear to support 256 colors, the UI'
' colors will probably be ugly',
'Error',
)
if firstrun: if firstrun:
self.information( self.information(
'It seems that it is the first time you start poezio.\n' 'It seems that it is the first time you start poezio.\n'