ultrabug / py3status

py3status is an extensible i3status wrapper written in python
https://ultrabug.github.io/py3status/
BSD 3-Clause "New" or "Revised" License
893 stars 261 forks source link

[RFC] version 4.0 #1584

Open ultrabug opened 5 years ago

ultrabug commented 5 years ago

This is me writing down my wishes (and dreams) for version 4.0 and I hope I won't hurt anyone in doing so because I'm a rather drastic person...

As always, I'd love your ideas too. I'll edit this post if something else comes into my mind.

python

drop the formatter

seamless configuration updates

make i3status a module like any other

usage tracking (opt-out by default)

make thresholds & borders general options

implement a dbus event handler for modules

add default short_text support

maximbaz commented 5 years ago

drop the formatter & use python f-strings formatting only

Looking at my config, I use nothing else except conditionals (which are supported by f-strings), setting specific color (e.g. color=degraded) and setting color based on threshold (e.g. color=free_disk_space with thresholds={'free_disk_space': [(0, 'bad'), (10, 'degraded'), (20, 'good')]} ) - if it's possible to support these use-cases with f-strings, I would be happy.

lasers commented 5 years ago

ability to import Xresources colors

sensible config paths

Nothing to do with i3status or i3 config paths. Users should move them over. Right now, we have 6 or 7 different places to check. It is good time to make our own config directory.

simplify configs

ultrabug commented 5 years ago

Looking at my config, I use nothing else except conditionals (which are supported by f-strings), setting specific color (e.g. color=degraded) and setting color based on threshold (e.g. color=free_disk_space with thresholds={'free_disk_space': [(0, 'bad'), (10, 'degraded'), (20, 'good')]} ) - if it's possible to support these use-cases with f-strings, I would be happy.

thresholds going core will have to cover this topic I suppose

L0ric0 commented 5 years ago

minimal version of python = 3.6

is there a reason to use 3.6 as minimal version? If not I would be in favor to set the minimal python version to the python3 version in debian stable (3.5.3).

lasers commented 5 years ago

I believe it was because of f-Strings in Python 3.6.

See if we can use native Python's {name.lower()} and some others instead of keep expanding our (rather basic) block formatter (i.e. [\?lower {name}]). I'm guessing we would treat placeholders as variables... or go one level deeper to deal with a whole format string.

It's likely faster, more clean, and probably fewer errors, etc... and we might be able to do more with that such as adding, subtracting, multiplying, cutting off things.

Also because Python 2.7 will be retiring in 2020 https://pythonclock.org/. Py3status have several codes to deal with Python2 and other unrelated codes. Better to make a leap right away to 3.6 and clean up things we don't need.

It looks like the full freeze date for Debian Buster is right around March 12, so Debian Buster might be released sometimes around middle of 2019.

Honestly, I don't know. This might be confusing as hell for the users... just the same.

thiagokokada commented 5 years ago

Some other nice improvements that you can get going to Python 3 only:

thiagokokada commented 5 years ago

Just an idea to get some progress in this issue: merge all remaining PRs, starting to remove all compatibility code for Python 2 and make the code Python 3 only (after the release o 3.16, of course). The rest of the improvements can come later.

AnwariasEu commented 5 years ago

There are plenty of great ideas moving forward to version 4.0!

My personal favorites are:

To clarify the state of the proposed usage-behavior:

Ditching older python versions:

ultrabug commented 5 years ago

To clarify the state of the proposed usage-behavior

Just to be sure that everyone is on the same page: nothing has been done on this subject and even more: we will never to collect anything behind the back of users.

ultrabug commented 5 years ago

As a heads up I wanted to share that I've started working on the future py3status v4 configuration parser. I thought it would be a good starting point to define how the next generation of our project should work

I think I'm gonna open a Gitlab repo to work on it openly to separate from here until we reach something we like there... sounds good?

ultrabug commented 5 years ago

I have finally set up the gitlab repository with preliminary code to work on py3status v4 :hugs:

https://gitlab.com/ultrabug/py3status_v4

CI pipeline includes : flake8, black, mypy

I'm now focusing on the configuration parser refactoring and I need to add more tests. Discussions to be conducted there please!

bitozoid commented 4 years ago

For me, it would be nice to have audio warnings. Audio warnings may be triggered by:

I wonder whether visual effects may also be possible e.g. a flashing on change, or blinking text.

ultrabug commented 4 years ago

TODO for v4: check #1401 option 3