py3status: Error messages
Many modules have hard coded error strings eg no connection
I think it’d be good if we have a way of dealing with these. the simplest option in my mind would be to have error_.. config options.
What are peoples views on how best to deal with this issue
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (15 by maintainers)
I’ll chat to him tomorrow or friday, see how he wants to play things. My main concern is #610 getting released.
This project has become a bit high noise of late which has made things difficult for some contributers as they have been swamped with notifications/emails.
You need to be more clear with things. The ‘red bar’ is user notifications. I’m assuming you are using i3-nagbar rather than dbus notifications. Any colors are user configured not by py3status. We can choose the level (info, warn, error). user notifications happen for many different reasons. For the point of this issue all we care about are module driven errors, ie the module has an error that it is raising to the user. These are not the module failing and raising an Exception.
Anyhow I think to the user the error should just appear in the i3bar in
color_error or color_bad. Example errorsNo connectionAuthentication erroretc maybe justError. When the user click we then provide fuller info eg which module …I’d implement this via
raise self.py3.ModuleError('Short error', desc='longer description', fatal=True)so that the modules can be kept simple.But again I’m really interested about how we define these in a module, and how we can translate them etc.
As far as other settings are concerned. I’ll repeat myself (these are only my views)
format_...these are all processed viapy3.safe_format()they have placeholders etc.icon_..orstate_...are for users to define how things are displayed egdpms {icon_off = " disabled" icon_on = " enabled"}whilst these are not perfect they are commonly used.FORMAT ALL THE THINGS I think is really good and I much appreciate the work you have put in. However by also changing other things eg in https://github.com/ultrabug/py3status/pull/644/files you add
string_unavailablethis may be nice but we (as in the project) need to decide how we will handle these things before changing them (adding stuff is easy, undoing things is hard).temp_separatorhas been renamed (why?). These extra changes are what is blocking things. I know that it may seem petty but it is good to take things slowly and concentrate on one fix at a time.True, and some of these
format_..are correct and some are not. Slowly we fix the things.