Skip to content

Request for feedback: magick_background widget (background FX) #49

@Lokaltog

Description

@Lokaltog

I've implemented an alternative way to create background effects, as CSS filters proved to be a bit wonky (the blur effect is a major hassle to implement properly, and the webview frequently crashed due to out of memory errors when testing it with various images and settings).

This feature requires graphicsmagick (switched from imagemagick due to poor performance) to work, which isn't ideal, but I don't know another better way of doing this efficiently. The bg image is generated on startup and don't use any extra resources when wkline is running.

What this widget does is crop an image of your choice, then apply a configurable amount of brightness/saturation/blur to the image, then sets it as the statusline background image.

Here's a screenshot of a test I just did with blur and lower brightness applied:

2014-03-12-184506_1920x1080_scrot

To enable this widget, make sure you have graphicsmagick installed and recompile wkline. You should now be able to enable the magick_background widget in your config.json:

        {
            "module": "magick_background",
            "config": {
                "image": "file:///path/to/your/bg-image.jpg",
                "blur_radius": 0,
                "brightness": 100,
                "saturation": 100
            }
        },

These are the options you're most likely to want to use currently, the rest are defined in the widget header file. The brightness and saturation settings are set as percentages in the range 0..100 (100 is default brightness/saturation).

You may need to tweak the values depending on your background image and preference. I found that a blur radius of 3 or 4, brightness of 70-80 and saturation of 0 looks pretty good with medium to dark images.

Anyways, it would be great if you guys could give me some feedback on this and let me know what you think, or if you have suggestions to other effects that can be added (any feature of graphicsmagick is possible).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions