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

xfdesktop4: eOS7's background dim feature is not supported #2

Open
1280px opened this issue Sep 7, 2023 · 1 comment
Open

xfdesktop4: eOS7's background dim feature is not supported #2

1280px opened this issue Sep 7, 2023 · 1 comment
Labels
integration For features that need to be integrated with OG eOS Desktop 🔹 low priority

Comments

@1280px
Copy link
Owner

1280px commented Sep 7, 2023

opened on May 3

Due to gala rendering it by applying opacity over wallpaper instead of altering an actual image, it's impossible to get the dimmed variant by just using the actual file path. I think it should be possible to implement using imagemagick, but sounds like way too much hassle for now.

@1280px 1280px added integration For features that need to be integrated with OG eOS Desktop 🔶 high priority labels Sep 7, 2023
@1280px
Copy link
Owner Author

1280px commented Feb 12, 2024

A draft I made:

...
    # change wallpaper image for given desktop on all displays
    /usr/bin/xfconf-query -l -c xfce4-desktop | grep "/backdrop/screen0/monitor.*/workspace${currWorkspaceID}/last-image" |
        while read -r line; do
            # check whether both dark mode and wallpaper dim are ON;
            # see https://github.com/doomemacs/doomemacs/issues/6027#issuecomment-1019373126
            if (echo $(gsettings get io.elementary.desktop.background dim-wallpaper-in-dark-style) | grep -q "true") &&
                (dbus-send --session --dest=org.freedesktop.portal.Desktop --type=method_call \
                    --print-reply /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read \
                    string:org.freedesktop.appearance string:color-scheme);
                then
                    input_image="$1"
                    convert $input_image \
                        -fill "rgba(0,0,0,0.45)" \  # see https://github.com/elementary/gala/pull/1651
                        -draw "rectangle 0,0 $(identify -format "%w,%h" $input_image)" \
                        ~/.xfdesktopWU_dimmed.png
                fi
            else
                /usr/bin/xfconf-query -c xfce4-desktop -p "$line" -s "$wpImage"
            fi
        done
...

However, for the logic to work correctly, we need to somehow monitor dbus color scheme signal changes as well.

@1280px 1280px changed the title eOS7's background dim feature is not supported xfdesktop4: eOS7's background dim feature is not supported Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration For features that need to be integrated with OG eOS Desktop 🔹 low priority
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant