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

feature/custom themes #1396

Merged
merged 4 commits into from
Apr 4, 2025
Merged

Conversation

alex-ds13
Copy link
Contributor

@alex-ds13 alex-ds13 commented Apr 2, 2025

  • Apply wallpaper only on the workspace monitor
  • Properly update border colors
  • Add option for setting wallpaper per-monitor
  • Read the current wallpaper on each monitor on startup and set that monitor's wallpaper to a new Wallpaper with that path and generate_theme set to false
    • This however has the downside that the generate_theme behaves as if it was false by default, since if you don't set it on the workspace nor on the monitor it will use the default one from the start which is false

@LGUG2Z LGUG2Z force-pushed the feature/custom-themes branch 2 times, most recently from d8e6897 to 4968b0f Compare April 2, 2025 20:49
@LGUG2Z LGUG2Z changed the base branch from feature/custom-themes to master April 3, 2025 01:02
@LGUG2Z LGUG2Z force-pushed the feature/custom-themes branch from c395d26 to 2427398 Compare April 3, 2025 01:14
@LGUG2Z
Copy link
Owner

LGUG2Z commented Apr 3, 2025

Changed the target branch to master and rebased with all the latest changes there 🤞

@alex-ds13 alex-ds13 force-pushed the feature/custom-themes branch from 2427398 to afff346 Compare April 3, 2025 18:27
This commit changes the border manager notification to an enum that can
be a `Notification::Update(Option<isize>)` which should work like before
or a `Notification::ForceUpdate` which will always update the borders
and it will also update the border's brushes. To do so, this commit
moved the brush creation from the `create()` function to a new
`update_brushes` function on the `Border` itself and it changed the
`Border` `render_target` from a `OnceLock` to an `Option<RenderTarget>`
so that we can always change it when we need to.
This commit also adds a new function called `send_force_update()` to the
border manager to make it easier to send this notification.

This commit also added a check for `force_update_borders` on the
`process_command` function so that any command that reloads the
configuration, changes the theme or changes any border config can set it
to `true`. When this is true we send the `ForceUpdate` notification, if
false we send the normal `Update` notification as before.

The theme manager now always sends the `ForceUpdate` notification to the
border manager.

This commit adds a new function to the window manager called
`apply_wallpaper_for_monitor_workspace` which in turn calls the
`apply_wallpaper` function for the workspace specified with the
`monitor_idx` and `workspace_idx` given (if the workspace in question
doesn't have a wallpaper defined this won't do anything).

All these changes make it so the wallpaper theme generation colors are
properly applied in all situations.
This commit adds the option to set `Wallpaper` per monitor. When
changing workspaces it will first check for a workspace wallpaper, if
there is none it then checks for a monitor wallpaper.
@alex-ds13 alex-ds13 force-pushed the feature/custom-themes branch from afff346 to 7203325 Compare April 4, 2025 08:41
@LGUG2Z LGUG2Z merged commit 03e3cb3 into LGUG2Z:master Apr 4, 2025
7 checks passed
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.

2 participants