Skip to content

feat!(bluelight): refactor bluelight to use factory method #476

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

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

Conversation

Dynge
Copy link

@Dynge Dynge commented Jul 7, 2025

This is a breaking change for the bluelight filter widget.

It refactors the widget to use a factory in order to allow the user to pass in options.
Thus the user does not have to edit the source code of the widget to pass other arguments to redshift.

I've also added the -P flag to the night_cmd in order to clear any existing redshift hue. This ensures that the redshift does not append if any filter already exists.

The new way to use the bluelight widget would be the following:

local bluelight_widget = require("awesome-wm-widgets.bluelight-widget")
local margin = require("awesome-wm-widgets.margin") -- In case you use my wrapper

s.mytasklist, -- Middle widget
    { -- Right widgets
        layout = wibox.layout.fixed.horizontal,
        ...
        bluelight_widget(), -- Add the widget here
        margin(bluelight_widget(), true), -- Add the widget with my wrapper
        bluelight_widget({night_args = "-O 3500 -P"}), -- Add options to widget
        ...
    }

@Dynge Dynge requested a review from streetturtle as a code owner July 7, 2025 08:51
This allows the user of the widget to pass options without having to
edit the source code to change the parameters
@Dynge Dynge force-pushed the mdl/push-nwynrsxknvkk branch from 982202e to ed05655 Compare July 7, 2025 08:54
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