Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[breaking change: fix #550] moves away from global variables #1

Open
wants to merge 1 commit into
base: soup
Choose a base branch
from

Conversation

razamatan
Copy link
Owner

  • going forward, there are a couple of ways to access state from the settings callbacks
    • settings functions should always take in widget and now as the arguments. so the signature is settings = function(widget, now)
    • use foo.widget and foo.now to access the awesome widget and current state (respectively) of foo widget
  • weather has been done in introduce helpers.uri (curl replacement) & migrate widget/weather to it lcpz/lain#549
  • sysload's state is now in a now table. access the 1, 5 and 15 min load averages via now[1], now[5], and now[15]
  • the bat and contrib/tp_smapi widgets have NOT been migrated as i do not have a laptop to verify behaviors

- going forward, there are a couple of ways to access state from
  the settings callbacks
  - `settings` functions should always take in `widget` and `now` as the
    arguments.  so the signature is `settings = function(widget, now)`
  - use `foo.widget` and `foo.now` to access the awesome widget and
    current state (respectively) of `foo` widget
- weather has been done in lcpz#549
- sysload's state is now in a `now` table.  access the 1, 5 and 15 min
  load averages via `now[1]`, `now[5]`, and `now[15]`
- the bat and contrib/tp_smapi widgets have NOT been migrated as i do
  not have a laptop to verify behaviors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant