Open carlosV2 opened 1 month ago
The most brutal way I can think of to achieving that is - hope you're sitting on a chair:
#000000
cat
#000000 into style.css
in the property window#waybar
killall -SIGUSR2 waybar
(reloads Waybar config)(only half-joking)
Hang on, this might not be that crazy!
I mean, like you said, it is a very crude way but waybar has a mechanism to reload the CSS automatically when it changes. In addition to this, I can tap onto the Hyprland socket to know what workspace I am on and what screens are in there... I might actually try it!
Only concern is the CPU usage but, by my estimates, it should not have that big of an impact actually!
Thank a lot for the half-joke that I'm taking half-seriously.
Is there a way to define the waybar's background color to match the opened app's color?
Of course this has a ton of caveats (like what happens if there are multiple windows, etc) but, in the simplest form, I'm looking for a way to set the color programmatically (even if I had to define the colors manually). For example, with a long-running process.
I've seen there are some GTK variables that can be used but they are related to the GTK theme instead of the screen's contents (unless I'm mistaken).
Here are some examples of what I mean.
This is how my bar looks like without windows open:![image](https://github.com/Alexays/Waybar/assets/2642839/fb3a3247-d61b-4d97-8353-95d53a929ad2)
The background color is set to match the one in my terminal so that when the terminal is open, it looks like this:![image](https://github.com/Alexays/Waybar/assets/2642839/41269d39-83bc-4b5d-a9d2-cd3e9fd5f053)
However, if I open Spotify (for example), the color does not adjust dynamically:![image](https://github.com/Alexays/Waybar/assets/2642839/f551a410-3a61-41ad-b265-29fc64fb6370)