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

Fix code example in timer.lua #3960

Closed
wants to merge 1 commit into from
Closed

Conversation

elig0n
Copy link
Contributor

@elig0n elig0n commented Sep 30, 2024

I believe this is what is meant

@@ -38,7 +38,7 @@
-- awful.spawn.easy_async(
-- {"sh", "-c", "acpi | sed -n 's/^.*, \([0-9]*\)%/\1/p'"},
-- function(out)
-- mybatterybar.battery = out
-- mybatterybar.set_battery(out)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't both work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Like any other widget, this has the __newindex handler for it.

Copy link
Contributor

@sclu1034 sclu1034 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project's preferred style is to use properties via the __newindex handler of gears.object. This usage snippet should reflect that and should therefore stay as it was.

@elig0n elig0n closed this Oct 1, 2024
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.

3 participants