Skip to content

fix: make monochromeIcons:false actually disable workspace icon tinting - #32

Open
Andrew-Velox wants to merge 2 commits into
pctrade:mainfrom
Andrew-Velox:mine
Open

fix: make monochromeIcons:false actually disable workspace icon tinting#32
Andrew-Velox wants to merge 2 commits into
pctrade:mainfrom
Andrew-Velox:mine

Conversation

@Andrew-Velox

Copy link
Copy Markdown

The Colorizer on workspace app icons was always active, with colorization switching between 0.8 and 0.5. That meant bar.workspaces.monochromeIcons: false still applied a 50% tint toward colOnSecondaryContainer/colOnPrimary, so app icons could never render in their true colors.

Stock ii wraps the whole Desaturate + ColorOverlay effect in a Loader gated on active: monochromeIcons, so off means off. Restore that behaviour by using 0 instead of 0.5 for the disabled case.

The Colorizer on workspace app icons was always active, with colorization
switching between 0.8 and 0.5. That meant `bar.workspaces.monochromeIcons:
false` still applied a 50% tint toward colOnSecondaryContainer/colOnPrimary,
so app icons could never render in their true colors.

Stock ii wraps the whole Desaturate + ColorOverlay effect in a Loader gated
on `active: monochromeIcons`, so off means off. Restore that behaviour by
using 0 instead of 0.5 for the disabled case.
Two issues left the android night light toggle claiming "on" while the
screen was unchanged, only correcting after a manual off/on cycle:

1. AndroidNightLightToggle never reconciled with reality. The classic
   toggle calls Hyprsunset.fetchState() in Component.onCompleted; the
   android one had no such call, and fetchState() had exactly one caller
   in the whole tree. So it rendered Hyprsunset.temperatureActive, a value
   only ever set optimistically, and could never self-correct.

2. enableTemperature() raced. startHyprsunset() and the hyprctl call were
   two independent detached processes with no ordering. With hyprsunset not
   yet running, the temperature call hit a missing IPC socket, failed
   silently, and temperatureActive was set true regardless. load() already
   guarded against this with a sleep; enableTemperature() did not.

Fix both: add the fetchState() call for parity with classic, and collapse
the start+set into one command that polls until hyprsunset's IPC answers
before setting the temperature.
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