catsout / wallpaper-engine-kde-plugin

A kde wallpaper plugin integrating wallpaper engine
https://store.kde.org/p/1475528/
GNU General Public License v2.0
1.64k stars 64 forks source link

Add support for rendering the wallpaper via Proton #387

Open CrazyVito11 opened 3 months ago

CrazyVito11 commented 3 months ago

Wallpaper Engine supports running wallpapers inside a separate window via CLI arguments.

This means we could get support for wallpapers that contain elements that are not supported yet by this project (3D and audio visualization for example)

Would it be theoretically possible to capture a specific window, and then project that inside the Plasma extension? This could potentially be a separate option inside the plugin to run via Proton instead of rendering it natively.


I've made an example bash script on how to run a specific wallpaper inside a borderless window via Proton, which might be able to provide a starting point.

# The specific Steam Workshop ID of the scene you want to load
export SCENE_ID=1425503532

# The desired resolution
export WINDOW_WIDTH=1920
export WINDOW_HEIGHT=1080

export STEAM_APP_ID=431960
export STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.steam/steam
export STEAM_COMPAT_DATA_PATH="${STEAM_COMPAT_CLIENT_INSTALL_PATH}/steamapps/compatdata/${STEAM_APP_ID}"
export WALLPAPER_ENGINE_INSTALL_PATH="${STEAM_COMPAT_CLIENT_INSTALL_PATH}/steamapps/common/wallpaper_engine"
export CURRENT_USER=$(whoami)

export SCENE_PATH="Z:\\home\\${CURRENT_USER}\\.local\\share\\Steam\\steamapps\\workshop\\content\\${STEAM_APP_ID}\\${SCENE_ID}\\scene.pkg"

~/.local/share/Steam/steamapps/common/Proton\ 8.0/proton run "${WALLPAPER_ENGINE_INSTALL_PATH}/wallpaper64.exe" \
  -control openWallpaper \
  -file "${SCENE_PATH}" \
  -playInWindow "KDE Wallpaper Engine" \
  -borderless \
  -width "${WINDOW_WIDTH}" \
  -height "${WINDOW_HEIGHT}"
WaviestBalloon commented 3 months ago

A heads-up for anybody who is running the bash script, Proton 9 fails to render and display wallpapers, Proton 8 works perfectly fine.

yigekuyou commented 3 months ago

plasma 6.0.3 proton experimental Wallpaper Engine make kwin_wayland freeze long time

m3t4f1v3 commented 3 months ago

here's my implementation of it

vladimir-sama commented 4 weeks ago

Updates?

#!/bin/sh
export SCENE_ID=1425503532

export WINDOW_WIDTH=1600
export WINDOW_HEIGHT=900

export STEAM_APP_ID=431960
export STEAM_COMPAT_CLIENT_INSTALL_PATH=/path/SteamLibrary
export WALLPAPER_ENGINE_INSTALL_PATH="${STEAM_COMPAT_CLIENT_INSTALL_PATH}/steamapps/common/wallpaper_engine"
export CURRENT_USER=$(whoami)

export SCENE_PATH="Z:\\path\\steamapps\\workshop\\content\\431960\\3213687043\\scene.pkg"

STEAM_COMPAT_DATA_PATH="${STEAM_COMPAT_CLIENT_INSTALL_PATH}/steamapps/compatdata/${STEAM_APP_ID}" /mnt/tertiary/SteamLibrary/steamapps/common/Proton\ 8.0/proton run "${WALLPAPER_ENGINE_INSTALL_PATH}/distribution/wallpaper32.exe" -control openWallpaper -file "${SCENE_PATH}" -playInWindow "Wallpaper Engine WMCTRL" -borderless -width "${WINDOW_WIDTH}" -height "${WINDOW_HEIGHT}"
sleep 5s
wmctrl -r "Wallpaper Engine WMCTRL" -b add,fullscreen
wmctrl -r "Wallpaper Engine WMCTRL" -b add,below
wmctrl -r "Wallpaper Engine WMCTRL" -b add,skip_taskbar

I got this script but cursor does not render over window

m3t4f1v3 commented 4 weeks ago

Try using LD_PRELOAD to do something like this to fix the cursor disappearing

vladimir-sama commented 3 weeks ago

Is this repo still alive?

I would say someone to make the KDE plugin for embedding a window into desktop, I tried with ChatGPT and unfortunately failed (obviously)