def _set_text(self):
        """
        Update the lines array and the widget text.
        """
        # Update in case values have changed
        if self.error:
            return
        self._set_lines()
        text = ""
        if self._line_index == 0:
            if self.is_enabled:
                text = self._format_first_text(self.enabled_txt)
            else:
                text = self._format_first_text(self.disabled_txt)
        else:
            text = self._lines[self._line_index]
        self.update(text)

        Update the lines array and the widget text.
        
libqtile/widget/redshift.py