dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

[BUG] ML4W windows not changing colors when changing wallpaper

Open marcchabot opened this issue 6 months ago • 12 comments

Describe the bug

ML4W side menu and wallpaper selector will remain pink colored even though I' switching to a completely different wallpaper.

Steps to reproduce

  1. change wallpaper
  2. noticed that color adjustment is not being made when opening side menu or wallpaper selector

Expected behavior

To have the color being adjusted (matugen-like)

Screenshots

Image

Distribution

Other (please specify below)

If Other, specify

CachyOS

Additional context

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

marcchabot avatar May 31 '26 23:05 marcchabot

Can you check if matugen is installed?

matugen --help

If yes, can you run

cd $HOME/.config/ml4w/scripts ./ml4w-wallpaper-app --random

and see if there are any error messages?

mylinuxforwork avatar Jun 01 '26 05:06 mylinuxforwork

I will test later on CachyOS as well.

mylinuxforwork avatar Jun 01 '26 05:06 mylinuxforwork

I will test later on CachyOS as well.

I tested it on CachyOS just now and the SideMenu color is changed according to the changed wallpaper. So are the terminal colors and (system wide) window border colors

eljejer avatar Jun 01 '26 10:06 eljejer

I have matugen installed and here is my log when trying your command (1 error):

(Same pink color will remain on the side menu, color does not change)

❯ ./ml4w-wallpaper-app --random [INFO] Random wallpaper selected: /home/marc/Pictures/wallpaper/enterprise-desert-crash.png [INFO] Cache file written with /home/marc/Pictures/wallpaper/enterprise-desert-crash.png [INFO] Setting wallpaper: /home/marc/Pictures/wallpaper/enterprise-desert-crash.png [INFO] Using wallpaper effect random error: unexpected argument '--source-color-index' found

tip: to pass '--source-color-index' as a value, use '-- --source-color-index'

Usage: matugen image

For more information, try '--help'. [INFO] Matugen updated [INFO] Quickshell Theme updated [INFO] ML4W Dotfiles Settings Theme updated [INFO] Waybar is currently running. [INFO] Waybar reloaded [INFO] nwg-dock-hyprland reloaded [INFO] pywalfox updated CSS reload success: true [INFO] SwayNC refreshed [INFO] enterprise-desert-crash.png resized to 75% -> blurred_wallpaper.png [INFO] blurred_wallpaper.png blurred with 50x30 [INFO] square_wallpaper.png created [INFO] current_wallpaper.rasi written with blurred_wallpaper.png [INFO] Wallpaper Updated: Successfully set enterprise-desert-crash.png

marcchabot avatar Jun 01 '26 12:06 marcchabot

Which version is installed on your system?

mylinuxforwork avatar Jun 01 '26 16:06 mylinuxforwork

V2.13.0 from rolling release.

marcchabot avatar Jun 01 '26 17:06 marcchabot

I Have the same problem as @marcchabot

Jeorge01 avatar Jun 01 '26 19:06 Jeorge01

Figured out the issue, in ~/.config/ml4w/scripts/ml4w-wallpaper.sh, the syntax changed for matugen here's what needs to be changed. # Execute matugen if [ "$THEME_PREF" -eq 1 ]; then $MATUGEN_BIN image "$IMAGE_PATH" --source-color-index 0 -m "dark" else $MATUGEN_BIN image "$IMAGE_PATH" --source-color-index 0 -m "light" fi info "Matugen updated" to # Execute matugen if [ "$THEME_PREF" -eq 1 ]; then $MATUGEN_BIN image "$IMAGE_PATH" -m "dark" else $MATUGEN_BIN image "$IMAGE_PATH" -m "light" fi info "Matugen updated"

IllestRat avatar Jun 02 '26 00:06 IllestRat

solution above fixed it for me - thanks!

archlinuxbits avatar Jun 05 '26 00:06 archlinuxbits

Figured out the issue, in ~/.config/ml4w/scripts/ml4w-wallpaper.sh, the syntax changed for matugen here's what needs to be changed. # Execute matugen if [ "$THEME_PREF" -eq 1 ]; then $MATUGEN_BIN image "$IMAGE_PATH" --source-color-index 0 -m "dark" else $MATUGEN_BIN image "$IMAGE_PATH" --source-color-index 0 -m "light" fi info "Matugen updated" to # Execute matugen if [ "$THEME_PREF" -eq 1 ]; then $MATUGEN_BIN image "$IMAGE_PATH" -m "dark" else $MATUGEN_BIN image "$IMAGE_PATH" -m "light" fi info "Matugen updated"

this solve for mee too

M1kele81 avatar Jun 07 '26 12:06 M1kele81

Figured out the issue, in ~/.config/ml4w/scripts/ml4w-wallpaper.sh, the syntax changed for matugen here's what needs to be changed. # Execute matugen if [ "$THEME_PREF" -eq 1 ]; then $MATUGEN_BIN image "$IMAGE_PATH" --source-color-index 0 -m "dark" else $MATUGEN_BIN image "$IMAGE_PATH" --source-color-index 0 -m "light" fi info "Matugen updated" to # Execute matugen if [ "$THEME_PREF" -eq 1 ]; then $MATUGEN_BIN image "$IMAGE_PATH" -m "dark" else $MATUGEN_BIN image "$IMAGE_PATH" -m "light" fi info "Matugen updated"

Removing --source-color-index 0 didn't work for me, I just get prompted to select a color:

matugen image ~/.config/wallpapers/1300517.png -m "dark"
Select the color you want to use as source color
Use arrow keys to navigate and Enter to select: #5bb1f0   

Adding a good old sleep did a workaround for me (My guess is the post_scripts needs to do it's Job before reloading qs)

    # Execute matugen 
    if [ "$THEME_PREF" -eq 1 ]; then 
        $MATUGEN_BIN image "$IMAGE_PATH" -m "dark" --source-color-index 0
    else 
        $MATUGEN_BIN image "$IMAGE_PATH" -m "light" --source-color-index 0
    fi 
    info "Matugen updated"
    sleep 4

    # Update Quickshell theme
    qs ipc call theme-manager reload
    info "Quickshell Theme updated"
    sleep 0.25

    # Update ML4W Dotfiles Settings theme
    qs -p $HOME/.local/share/ml4w-dotfiles-settings/quickshell ipc call theme-manager reload
    info "ML4W Dotfiles Settings Theme updated"

    ...

furudbat avatar Jun 10 '26 09:06 furudbat

I do not think that modifiying the script is the proper fix in this case. On my system simply matugen was too old and wasn't updated correctly. I had a self compiled rust version locally installed that simply did not understand the new index parameter. So I would install matugen-bin package (in your case). For me that fixed the isssue and guarantees that it will not occur again...

JohRest avatar Jun 30 '26 12:06 JohRest